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.

don't deliver emails if SA is down

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

  1. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    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.
     
    #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:
    18
    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.
     
Loading...

Share This Page