0

I'm looking to reject email that is sent by mail servers thinking its a good idea to send back undeliverable messages for mails that couldn't have possibly come from my mail server.

I also want to have postfix return a proper permanent reject message back, so the sending mail server stops retrying.

Currently I'm using a header_check to rewrite all outgoing Message-IDs to something consistent, and then check on incoming mail for that specific Message-ID format and reject ones that don't match (but only ones that are clearly forged, not ones that are from legit sources). The problem with this is that the REJECT in the header_check (set on the cleanup service) isn't sending back a permanent failure, and some servers continue to retry to send the same reject over and over. It does seem to be returning a 5.7.1 code back, but I'm not seeing which main reply code it's sending back.

I don't need to fix my current method, I'd just like for my server to reject these clearly pointless backscatter emails AND let the admins know of these unwanted emails without creating my own backscatter.

Tomasu
  • 1
  • 1
  • Are you aware that some MUAs dont like message-ids getting changed, because having references like `In-Reply-To` headers match the message-ids of copies stored in the `Sent` folder helps sort threads? – anx Dec 21 '17 at 16:16
  • Yes, I'm aware. its only changing them on outgoing so at most it effects my own sent folder which isn't really a problem. But if I can get around that, great! – Tomasu Dec 21 '17 at 16:44
  • Will do. here's the config, which I have hopefully anonymized properly... https://pastebin.com/fZNNuFdQ – Tomasu Dec 21 '17 at 17:16
  • Well, I removed my ip addresses ;) but the rbl lookups are not set to reject, just warn in my logs. maybe the current server thats retrying is just misconfigured, I don't know. but its annoying. – Tomasu Dec 21 '17 at 18:13
  • Note to later readers of this old question: SRS is now a reasonably production-worthy method of identifying bounces without changing message-ids (by changing envelope address!) – anx Oct 17 '20 at 22:50

0 Answers0