Hi folks. I've been trying to work out how to do this and I can't It's very simple, any email being received by the server where the domain name ends .xyz gets rejected. As in the my server tells the sending server NO. I'd also like the system to do an RDNS check and reject any servers that fail the check. I'm running 14.04, postfix and dovecot. Any ideas? Thanks. Simon.
Your postfix entry for RDNS checking would be reject_unknown_reverse_client_hostname And for blocking specific TLD you probably want something like echo "*.xyz REJECT some message" > /etc/postfix/tld_blacklist postmap /etc/postfix/tld_blacklist and add hash:/etc/postfix/tld_blacklist to your smtpd_recipient_restrictions http://www.postfix.org/access.5.html You may need package postfix-pcre installed ( not listed in perfect howto )
Update: Maybe smarter and easier way to achieve this by using ISPConfig https://www.howtoforge.com/communit...ete-tld-range-in-ispconfig-mail-config.72222/
Thanks folks. I've got the blacklist working fine now. The amount of crud just seems to go up. But I'm on top of it.