Mergy Dot Org Notes and Hacks From Jonathan Mergy

Blocking garbage gTLDs with postfix header_checks

In looking at my Postfix mail.logs, I only see the new ICANN vanity gTLDs really generating garbage spam. Lots of press on the mess this all is causing. I got kind of sick of even dealing with that, so here is the header_checks lines I use to block them via postfix if you want to do that on your setup. There are a lot of articles on the internet for this, but I here is what works for me. YMMV. 

Add these lines to your active header_checks file and swap the TLD with the ones you want to block. You probably will be okay blocking the ones I have below though too. 

/^Received: .*\.party .*$/                        REJECT Stop it.
/^Received: .*\.stream .*$/                     REJECT Stop it.
/^Received: .*\.review .*$/                      REJECT Stop it.
/^Received: .*\.science .*$/                     REJECT Stop it.
/^Received: .*\.local .*$/                          REJECT Stop it.
/^Received: .*\.loan .*$/                          REJECT Stop it.
/^Received: .*\.trade .*$/                        REJECT Stop it.
/^Received: .*\.bid .*$/                            REJECT Stop it.

These patterns work on header_check files nicely to nix some of the bogus email inbound with calls to these TLDs. 

About the author

Jonathan Mergy

Add comment

Mergy Dot Org Notes and Hacks From Jonathan Mergy