How To Block an Entire TLD in Postfix

Author: , September 13th, 2016

Step 1. Execute the following two commands: postconf -e smtpd_sender_restrictions=pcre:/etc/postfix/rejected_domains postconf -e reject_unauth_destinations=pcre:/etc/postfix/rejected_domains If that doesn’t work, you may hand-edit main.cf and add/edit these lines:

Step 2. Create the regex filter file: vim /etc/postfix/rejected_domains

Step 3. Signal Postfix to reread the config: postfix reload NOTE: Do NOT use the postmap command for the […]