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.

Reject mail from single domain

Discussion in 'E-mail Discussions' started by krisdv, Sep 17, 2007.

  1. krisdv

    krisdv Well-Known Member

    Joined:
    Jun 18, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Belgium
    I am using the default exim setup with spamassassin and clamavconnector. How would I change the exim config to reject mail from a single domain? Would host_reject = domain.tld help in this case and where would I apply this?
     
  2. jerrybell

    jerrybell Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    Try this;
    deny sender_domains = hosttoblock.com.

    You could get fancy and do this:
    domainlist reject_domains = lsearch;/etc/reject_domains


    deny sender_domains = +reject_domains

    then, add your domains to block to the file /etc/reject_domains
     
  3. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    If you do it that way make sure you do it through WHM and not edit the config file directly, otherwise changes will be overwritten the next time you upgrade cpanel.

    You could use the exim.antivirus system filter too:

    Code:
    if ( $message_headers matches \\bdomain\\.tld\\b ) then
     fail text "Email Rejected"
     logwrite "$tod_log $message_id rejected for bad domain."
     seen finish
    end if
     
Loading...

Share This Page