How To Block an Entire TLD in Postfix
erics, 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:
1 2 |
smtpd_sender_restrictions=pcre:/etc/postfix/rejected_domains reject_unauth_destinations=pcre:/etc/postfix/rejected_domains |
Step 2. Create the regex filter file: vim /etc/postfix/rejected_domains
1 2 |
/\.top$/ REJECT No spam allowed from the .top TLD /\.stream$/ REJECT No spam allowed from the .stream TLD |
Step 3. Signal Postfix to reread the config: postfix reload NOTE: Do NOT use the postmap command for the […]