[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: new hamm nmh breaks header rewriting, isp becomes irate



kotsya@u.washington.edu (David Stern) writes:

> For some unknown reason my Sender: line is no longer being rewritten, 
> and most destinations will refuse my mail because it is not DNS 
> resolvable (as an aside I'd be interested to hear the basis for such 
> refusals).  Those that don't refuse it will modify it, go figure.
> 
> So far, there's no indication why my headers aren't being rewritten.  
> If you (or anyone) have any more ideas, I'd sure appreciate hearing 
> them.

Well, I have one more idea - the smtprewriter transport as I have it
on my web page doesn't remove any Sender: header that's already there; 
it just adds a new one.  So, you'll probably want to add a line of:
remove_header="Sender"
before the line that inserts the new sender header.

Looking at your latest reply, there are indeed two Sender: lines.
Looking at those Sender: lines, however, I realize a problem.  One
program is setting your Sender: line to "kotsya@localhost" (the Debian 
mailing list software is then changing this to
"kotsya@localhost.debian.org" - interesting effect); another is adding 
a Sender: line of "kotsya@localhost@localhost.localdomain".

The most likely explanation is that nmh has started adding Sender:
lines; this is in general a good thing - we just need to be careful to 
take them out or rewrite them nicely on the way out.  It may be that
some machines are rejecting your mail for having sender lines with two 
@ signs in them.  In that case, a kludge to fix it is to change the
line that adds the sender stuff to:
  insert_header="Sender: \
     ${if def:ident_sender \
      {$ident_sender@$visible_name}{$from@$visible_name}}
This, combined with the remove_header line above, should get things
back to the way they were.

Hmm... Sender headers really shouldn't be rewritten like this if they
already exist... Perhaps something like:
from_field="From: \
   ${if def:ident_sender \
   {$ident_sender@$visible_name} \
   {$sender${if def:sender_name: ($sender_name)}}}

in /etc/smail/config and then nothing dealing with Sender: headers in
the transports file (neither adding or removing) would be better.

You may also want to ensure that the visible_name used is something
other than "localhost", which is what it appears to be set to.
Unfortunately, the only way I've found to do that (without having a
name registered with .dyn.ml.org) is to rewrite /etc/smail/config each 
time ip-up is called.  (There's one way of doing that on my webpage
http://www.math.jhu.edu/~martind/mybox.html - after I wrote that page
I figured out a cleaner method using m4)

(One of these days I'm just going to get fed up and write a mailer
designed for dialup systems which need to rewrite headers on the way
out and may well have no consistent name - the wonders of free
software that I won't have to start from scratch...)


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: