fetchmail-friends
[Top] [All Lists]

[fetchmail] Re: [PATCH] Re: bouncing on empty return-path

2003-01-06 15:36:45
Sunil Shetye wrote:

This patch will cause an error while using an mda where special shell
characters are replaced by '_'. There, the address "<>" will be
replaced by "__" (not tested this).

However, the basic idea of the patch is right. My suggestion is that a
from address of "MAILER-DAEMON" be used instead.

1) Most, if not all smtp listeners don't accept a
   MAIL FROM:<MAILER-DAEMON>
   Even more: it would be rewritten to MAILER-DAEMON(_at_)popservername in
   open_smtp_sink() [sink.c]
2) That would still cause mail to be sent out on delivery failure, while
   exactly that was what the patch tries to prevent.

Changing "<>" into "MAILER-DAEMON" would do what in most cases would have
happened anyway, as most delivery error bounces have a From: header line
with something like postmaster(_at_)somedomain or 
MAILER-DAEMON(_at_)somedomain(_dot_)

The only difference would be that "somedomain" would become
"popservername". Which raises another interesting question: what happens
with mail (especially the bounces) sent to 
MAILER-DAEMON(_at_)yourowndomain(_dot_)com
if fetchmail pops mail from yourowndomain.com:pop3? In that case you
don't even need two sites running fetchmail to create a mail loop :-)

In other places in sink.c (send_bouncemail() and open_bsmtp_sink() ) it
seems clear that a return-path of "<>" is valid (even expected in case
of a delivery error message).

I didn't check the mda and escape stuff yet, but I do think the right way
would be to replace the "<>" to "MAILER-DAEMON" only for mda transport,
right before the escaping.

I'll look into this and probably update the patch.

Regards,
  Maarten.