incorrect address rewriting during returntosender
Eric Wassenaar
e07 at nikhefh.nikhef.nl
Mon Aug 27 19:21:40 AEST 1990
Ref: All versions of sendmail up to/including 5.64
Description:
Sendmail will rewrite 'new style' addresses in the header
lines incorrectly when returning a message to the sender,
e.g. when mailing back a return receipt or an error message.
Repeat-by:
Send a message To: him at hisdomain
and ask for a Return-Receipt-To: Your Name <you at yourdomain>
Most probably (assuming his sendmail generates fully qualified
addresses, and can handle 'old style' addresses) this appears
in the return message as
To: Your at hisdomain, Name at hisdomain, <you at yourdomain>
Analysis:
Sendmail returns a message using the sequence
sendtolist(recipient_list, ...)
returntosender(...)
The recipient(s) are parsed within sendtolist(), the 'new style'
address is recognized, and the EF_OLDSTYLE bit is cleared in the
envelope e_flags field.
The actual delivery is done within returntosender(), but this
routine switches to a temporary envelope which gets the default
e_flags with the EF_OLDSTYLE bit set.
During subsequent header rewriting, in putheader() and commaize(),
the headers are handled incorrectly, with the above result.
Fix:
In the routine returntosender() in the file savemail.c, after
switching to the temporary envelope ee, add the following lines:
if (!bitset(EF_OLDSTYLE, CurEnv->e_flags))
ee->e_flags &= ~EF_OLDSTYLE;
Eric Wassenaar
--
Organization: NIKHEF-H, National Institute for Nuclear and High-Energy Physics
Address: Kruislaan 409, P.O. Box 41882, 1009 DB Amsterdam, the Netherlands
Phone: +31 20 592 0412, Home: +31 20 909449, Telefax: +31 20 592 5155
Internet: e07 at nikhef.nl
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list