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.

MailScanner + Spamassasin

Discussion in 'E-mail Discussions' started by abusedreality, May 21, 2004.

  1. abusedreality

    abusedreality Well-Known Member

    Joined:
    Apr 15, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Hey All,

    I just installed mailscanner using the "unsupported" script and it works fine.

    I looked through the /usr/mailscannner/etc/MailScanner.conf and noticed stuff about SpamAssasin which I enabled so I would hope it would use spamassasin to give a rating.

    For some reason though, it just gives...

    Code:
    X-OriginalArrivalTime: 21 May 2004 12:44:24.0484 (UTC) FILETIME=[588D9E40:01C43F31]
    X-MailScanner-Information: Please contact the ISP for more information
    X-MailScanner: Found to be clean
    X-MailScanner-SpamCheck: 
    
    Surely thats not right, Its supposed to give a rating isnt it?. Do I have to enable spamassasin on every account for it to work. If so its a bit stupid. Heres a copy of the spamassasin section of the mailscanner.conf incase that helps..

    Code:
    # Do you want to find spam using the "SpamAssassin" package?
    # This can also be the filename of a ruleset.
    Use SpamAssassin = yes
    
    # SpamAssassin is not very fast when scanning huge messages, so messages
    # bigger than this value will not be tested by SpamAssassin. This value
    # is a good compromise as very few spam messages are bigger than this.
    Max SpamAssassin Size = 90000
    
    # This replaces the SpamAssassin configuration value 'required_hits'.
    # If a message achieves a SpamAssassin score higher than this value,
    # it is spam. See also the High SpamAssassin Score configuration option.
    # This can also be the filename of a ruleset, so the SpamAssassin
    # required_hits value can be set to different values for different messages.
    Required SpamAssassin Score = 5
    
    # If a message achieves a SpamAssassin score higher than this value,
    # then the "High Scoring Spam Actions" are used. You may want to use
    # this to deliver moderate scores, while deleting very high scoring messsages.
    # This can also be the filename of a ruleset.
    High SpamAssassin Score = 20
    
    # Set this option to "yes" to enable the automatic whitelisting functions
    # available within SpamAssassin. This will cause addresses from which you
    # get real mail, to be marked so that it will never incorrectly spam-tag
    # messages from those addresses.
    SpamAssassin Auto Whitelist = yes
    
    # Set the location of the SpamAssassin user_prefs file. If you want to
    # stop SpamAssassin doing all the RBL checks again, then you can add
    # "skip_rbl_checks = 1" to this prefs file.
    SpamAssassin Prefs File = %etc-dir%/spam.assassin.prefs.conf
    
    # If SpamAssassin takes longer than this (in seconds), the check is
    # abandoned and the timeout noted.
    SpamAssassin Timeout = 40
    
    # If SpamAssassin times out more times in a row than this, then it will be
    # marked as "unavailable" until MailScanner next re-starts itself.
    # This means that remote network failures causing SpamAssassin trouble will
    # not mean your mail stops flowing.
    Max SpamAssassin Timeouts = 20
    
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    By default, only messages with a spam score will be included in the header. To always include the score you need to change the directive:

    Always Include SpamAssassin Report = yes

    Then stop and restart MailScanner.
     
  3. abusedreality

    abusedreality Well-Known Member

    Joined:
    Apr 15, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Nope, Thats not entirely true. All mails will have some form of spam score be it a - or a few **'s

    As a note, I enabled spamassasin on one domain and suddenly the stars start showing. So it looks like you actually have to have spamassasin enabled on that account for mailscanner to use it. Which sort of defeats the object.

    Code:
    X-Spam-Level: **
    X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on 
    	server.xxx.com
    X-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_50_60,HTML_MESSAGE,
    	RCVD_IN_DYNABLOCK,RCVD_IN_SORBS autolearn=no version=2.63
    X-MailScanner-Information: Please contact the ISP for more information
    
     
  4. abusedreality

    abusedreality Well-Known Member

    Joined:
    Apr 15, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Exact same mail sent to account without spamassasin enabled

    Code:
    X-Priority: 3
    X-MSMail-Priority: Normal
    X-Mailer: Microsoft Outlook Express 6.00.2800.1106
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
    X-MailScanner-Information: Please contact the ISP for more information
    X-MailScanner: Found to be clean
    X-MailScanner-SpamCheck: 
    
     
  5. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    That doesn't sound right. Are you saying that you are having to activate spamassassin both through Cpanel and in Mailscanner?
     
  6. abusedreality

    abusedreality Well-Known Member

    Joined:
    Apr 15, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Not exactly,

    SpamAssasin will work activated on its own, for it to intergrate with mailscanner you need the mailscanner config setup aswell as spamassasin running.
     
  7. dory36

    dory36 Well-Known Member

    Joined:
    Aug 30, 2003
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    I just tested this, with all the variations.

    With SA running from cpanel and MS not doing SA checks - you get spam headers on spam and ham (non-spam).

    With SA running from MS and not cpanel: no headers on (zero-scored) ham, headers on spam and >0 scored ham.

    With SA running on both cpanel and MS: you get headers from the cpanel SA and additional headers from the MS SA.

    With SA running on neither, well duh... no spam headers.


    Bill
     
    #7 dory36, May 25, 2004
    Last edited: May 25, 2004
  8. abusedreality

    abusedreality Well-Known Member

    Joined:
    Apr 15, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    This thread isnt about the "headers" its about the rating.
     
  9. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    SpamAssassin doesn't run in any way when using it through MailScanner. MailScanner itself simply invokes the spamassassin command using its own configuration file.

    If you have SpamAssassin enabled for use through MailScanner, you should disable it in WHM in Tweak Settings and stop the spamd process running under Server Manager.

    Otherwise, emails will be scanned at least 3 times, you'll get duplicate header records and the spambox feature and whitelisting in cPanel will not work.

    Running MailScanner with SA should be seen as a centrally configured method of spam scanning and the user side (in cPanel) should be disabled.

    If, however, you want to use the SA features of cPanel, then you should ensure that you disable SA in MailScanner because of the issues mentioned above. Although in this scenario, mail will still be scanned twice by MailScanner because of the way that cPanel have integrated SA into Exim.
     
  10. dory36

    dory36 Well-Known Member

    Joined:
    Aug 30, 2003
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    Sorry I wasn't clear.

    Cpanel SA headers gave a rating of zero or the actual spam #

    MS SA headers were missing when the score was zero, but showed up when the score was >0.
     
  11. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Did you enabled these in MailScanner.conf when tesing SA through it?

    Check SpamAssassin If On Spam List = yes
    Always Include SpamAssassin Report = yes
    Spam Score = yes

    Stop and start MailScanner?

    I ask, because I have those options enabled and always get the SpamAssassin Score whether below or above 0 with the matching rules on all scanned email.
     
  12. dory36

    dory36 Well-Known Member

    Joined:
    Aug 30, 2003
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    No - my settings were pretty close to the default settings in MailScanner.conf.

    I was just responding to the impression that you had to have Cpanel SA AND MS SA activated to get a score, and I was (inadequately) pointing out that with near default MS.conf settings the lack of a header does not mean the message wasn't scanned - just that it might be a zero.
     
  13. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    :cool:
     
Loading...

Share This Page