Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

don't deliver emails if SA is down

Discussion in 'E-mail Discussion' started by sehh, Dec 27, 2008.

  1. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Europe
    How can i force Exim to NOT deliver an email if it doesn't get scanned by Spamassassin?

    Right now, it seems that if SA is down or has some other problem, Exim still delivers the email. This means that 1 out of 10 spam goes through.

    Anyone knows how to do that?

    PS:
    this is the default in postfix, it never delivers emails if SA hasn't scanned them.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 sehh, Dec 27, 2008
    Last edited: Dec 27, 2008
  2. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Europe
    The problem:
    Because the "spam = ${acl_m1}" line is within a "warn" statement, if SA scanning fails for any reason (spamd dies, connection failure, overloaded SA that reached max connections, etc) then instead of rejecting the email, its accepted.

    Here is a possible solution:
    Edit /etc/exim.conf, search for the string "detected message as spam" and the above "warn" statement change it to "deny".

    So it should look like:

    Code:
      deny
        condition = ${if eq {${acl_m0}}{1}{1}{0}}
        spam =  ${acl_m1}
        log_message = "SpamAssassin as ${acl_m1} detected message as spam ($spam_score)"
        ...
    
    if SA fails for any reason, the email should be rejected with a temporary failure, thus request the remote server to re-send the email again at a later time, so you won't loose any real emails.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice