Rejecting mail

Discussion in 'Server Operation' started by Trunkles, Feb 7, 2016.

  1. Trunkles

    Trunkles Member

    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.
     
  2. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    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 )
     
    Last edited: Feb 19, 2016
  3. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

  4. sjau

    sjau Local Meanie Moderator

    seems gTLD .xyz has been really bad the last few days :)
     
  5. Trunkles

    Trunkles Member

    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. :)
     

Share This Page