The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Silently discard emails from a domain/ip

Discussion in 'E-mail Discussions' started by rebouy, Feb 18, 2011.

  1. rebouy

    rebouy Member

    Sep 1, 2010
    Likes Received:
    Trophy Points:
    We have some very insistent spammers sending junk mails to our server.

    Is there a way to silently discard all email from an ip or domain? Firewall or SpamAssassion configuration maybe?

    This is not at level account but server wide. If we reject the emails they will just change domain/ip again.

    Thank you!
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Oct 2, 2010
    Likes Received:
    Trophy Points:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator

    If they are sending emails to non-existent accounts on a domain, then you can change the default address to :blackhole: rather than :fail: where :blackhole: simply silently discards the emails rather than bouncing them back. The issue with :blackhole: is that it increases the processing needed for the emails, since the server must actually process that email to discard it. The :fail: option actually rejects it without processing as a bounce back to the sender. Most spammers are either spoofing or aren't accepting bounce mail back to their domain, so bouncing an email back to them doesn't really do much. I'd be amazed at any spammer accepting such bounces, since it makes a lot more sense to spoof or not accept return email failures if you are spamming people.

    Anyway, if you really want to change to :blackhole:, you can change any set to :fail: to :blackhole: in root SSH using this command:

    replace fail blackhole -- /etc/valiases/*

Share This Page