fetchmail, behaviour in response to SMTP 552 error code
Small mail server (~40 users) retrieves email from internet service provider using fetchmail.
fetchmail configuration file looks like this
poll pop.isp.example port 995 with proto pop3
user "firstname.lastname@example.org" there with password "secret" is "email@example.com" here
options fetchall ssl forcecr pass8bits norewrite;
and so on for all users.
fetchmail is called every few minutes like this
fetchmail --smtphost 127.0.0.1/25 --fetchmailrc /path/to/config
Mailserver on localhost is postfix, it is configured to accept these email addresses and deliver to local users.
Message size limit is set to 50 MB.
After running for a year without problems, one user received an email larger than the postfix message size limit in the Mailbox at the ISP.
fetchmail fetched the message via pop3 and delivered via smtp. Postfix complained about the message size (code 552) to fetchmail. Fetchmail logged the 552 code, sent a delivery failure notification to the sender, and did NOT delete the large message from the inbox at the ISP.
The events from last paragraph repeated every few minutes until the sender complained about getting hundreds of delivery failure notifications.
My question is, why did fetchmail not delete the large message from the inbox at the ISP? I generally appreciate that fetchmail makes sure that emails are correctly delivered before deleting them from the source, but in this case, as stated in the fetchmail man page, fetchmail should have deleted the message from the ISP inbox. The fetchmail man page states:
SMTP/ESMTP ERROR HANDLING
552 (message exceeds fixed maximum message size)
Delete the message from the server. Send bounce-mail to the orig‐
The "delete" part did not happen. fetchmail output:
2 message for firstname.lastname@example.org at pop.isp.example (gazillion octets).
fetchmail: SMTP error: 552 5.4.3 Message size exceeds fixed limit
fetchmail: mail from MAILER-DAEMON@internal-hostname bounced to email@example.com
reading message firstname.lastname@example.org@pop.isp.example: 1 of 2 (gazillion octets) not flushed
reading message email@example.com@pop.isp.example: 2 of 2 (61968 octets) flushed
(where gazillion was ~100MB)
Tags for this Thread