Yesterday I received a mail from my ISP informing me that they had blocked my port 25 due to a spam problem. After checking my mail queue it appears to be filled with HUNDRED of delivery error emails failing to deliver to some remote mail server.
Yeah that’s not supposed to happen…
It took me the entire afternoon after troubleshooting every single part of the server (postfix, dovecot, spamassassin, postgrey,… ) to figure out what was actually going on.
I started believing that my mail server had gone rogue as the offending email would reappear on its own even after the mail queue got cleaned out.
I use fetchmail in a cron job to recover mails from some old addresses that I still occasionally use for confirmation emails that come from server that are unable to deal with postgrey.
As it turns out, one specific mail in that mailbox was being consistently rejected by postfix’s policies, generating a new error email every time and sending it back to fetchmail with a “couldn’t deliver” error message, which caused fetchmail to re-attempt delivery of that email every time.
Sure, it allowed me to review my mail server configuration and to correct a few oddities but what a waste of time.