#146306 fetchmail: so called "bouncing" of mail is braindead

Package:
fetchmail
Source:
fetchmail
Description:
SSL enabled POP3, APOP, IMAP mail gatherer/forwarder
Submitter:
Jeff Sheinberg
Date:
2024-04-08 06:45:07 UTC
Severity:
normal
Tags:
#146306#5
Date:
2002-05-08 21:09:53 UTC
From:
To:
Package: fetchmail
Version: 5.9.11-5
Severity: normal

Hi,

So called "bouncing" of mail by fetchmail is braindead.  Why is this?

    1. The bounce notification message has no indication
       whatsoever that fetchmail is in any way involved.

    2. The bounce notification message contains only the headers.
       The full text of the message should be included.

    3. The bounced message itself is not removed from the pop
       server.  Thus, the message is re-bounced every time that
       fetchmail queries the pop server.

According to my reading of fetchmail(1), the behavior described in
item 3 above is "by design", however, IMO, such behavior is still
braindead.

Now, why are SMTP 552 and 553 errors singled out for special
behavior (along with any so-called "antispam" error codes)?

Remember that 5xx means,

    Permanent negative completion reply.  The command was not
    accepted and should not be retried.

If you just follow my advice in items 1 and 2 above, then the user
has complete control over the offending message.

The user's pop server has *already* accepted the message.  It's
too late to reject it back to the originator, that SMTP
conversation is long dead and gone.

Now if the user's MTA rejects the message from fetchmail with a
5xx error, just be nice and bounce the full contents of the
message to the user.

Thanks,

#146306#22
Date:
2013-03-06 14:51:32 UTC
From:
To:
Note that some protocols (ETRN, ODMR) require to send non-delivery
notifications, because we cannot just "leave messages on server" with them.

#146306#27
Date:
2016-10-25 23:22:55 UTC
From:
To:
Silently bouncing messages mean messages can get lost. For example, when I fetch manually, I can see this:

fetchmail: SMTP error: 550 maximum allowed line length is 998 octets, got 1006
fetchmail: mail from MAILER-DAEMON@<host> bounced to <sender>
fetchmail: SMTP listener refused delivery

If fetchmail is running as daemon like it usually is, I get no indication that I missed a message. At the very least, in failures like this, fetchmail should send its error messages through as an email, including the subject and sender, so that the user knows they missed a message and can investigate.