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.