Quoting from Maarten Bezemer's mail on Tue, Jan 07, 2003 at 12:29:34PM +0100:
Which mailer runs on that box? I checked a few exim sites and a few
sendmail sites. Only 1 site (sendmail, and of course exactly the
one at which I don't have access to the sendmail config) does indeed add a
"Return-Path: <MAILER-DAEMON(_at_)smtpservername>" instead of a
"Return-Path: <>".
[OFFTOPIC]
You are right, of course. The sendmail mailer line was:
M..., S=EnvFromL/HdrFromL, ...
On changing it to:
M..., S=EnvFromSMTP/HdrFromSMTP, ...
the Return-Path: was preserved. Is this the correct solution? Or
should EnvFromL and HdrFromL be modified?
[END OFFTOPIC]
As I said, I didn't yet look into the mda or the escaping stuff. I still
did not do that. The only thing I know right now that "<>" needs special
treatment some way or another, as it's a special case by design. Using
"" instead of "<>" doesn't work, but escaping "<>" to "__" isn't right
either.
Then, the only method seems to be to modify the sanitize() function in
sink.c. One solution would be to put quotes around the addresses.
Attached is a patch which does that. The mda line:
/usr/sbin/sendmail -i -oem -f %F %T
will expand to:
/usr/sbin/sendmail -i -oem -f 'from-address' 'to-address'
Unfortunately, the patch does not work if the mda line already has
quotes. So, mda like these will not work after this patch:
/usr/sbin/sendmail -i -oem -f '%F' '%T'
/usr/sbin/sendmail -i -oem -f "%F" "%T"
I think it is not possible to check for all combinations of quotes. It
will be better to just put a warning in the documentation that quotes
are incorrect. Is this acceptable?
--
Sunil Shetye.
fetchmail-6.2.0-sanitize.patch
Description: Text document