Hi, try to reject mail that contains a Reply-To with GMail in it. Easy to set, minimal to no false-positive potential.
And see if that comes near the effect you want. My observation is that it matches around 90% of the typical Googemail spam. ps. GMail is the #1 spam/scam facilitator for years now from my point of view. Mostly due to the fact of ignoring abuses, spamcop etc. - can that be called RFC-ignorant? I am aware of the irony using it myself. For single purposes like mailing lists. Would not go there again today. 😉 Greets, Ludi -----Ursprüngliche Nachricht----- Von: owner-postfix-us...@postfix.org <owner-postfix-us...@postfix.org> Im Auftrag von li...@lazygranch.com Gesendet: Samstag, 6. November 2021 12:16 An: postfix-users@postfix.org Betreff: method to discard email with body containing gmail address Most of my spam contains a gmail address to reply to the spammer. I would like to discard email whose body contains a gmail address. Since discarding mail could get ugly, I would hope someone on the list can eyeball my plan. I added body_checks = pcre:/etc/postfix/body_checks to main.cf. I made a null body_checks file and ran postmap on it, then did a reload & restart. Postfix wouldn't send email if the file was missing. postconf -d mail_version mail_version = 3.6.2 Trawling the internet I found this regix to match gmail addresses: ^[\w.+\-]+@gmail\.com$ So if body_checks contained /^[\w.+\-]+@gmail\.com$/ DISCARD work.