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.

SpamAssassin Logging

Discussion in 'E-mail Discussions' started by jimhermann, Jul 12, 2011.

  1. jimhermann

    jimhermann Active Member

    Joined:
    Jan 20, 2008
    Messages:
    42
    Likes Received:
    1
    Trophy Points:
    8
    How do I get SpamAssassin to log the Spam Scores and actions for each email to the exim logs?

    I am running the latest versions of CPanel, SpamAssassin and MailScanner.

    Thanks.

    Jim
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello Jim,

    These are logged to /var/log/maillog area rather than to the exim log files. If you want to change the path to where it is logging, you can revise /usr/bin/spamd file for this line:

    Code:
    my $log_facility = $opt{'syslog'} || 'mail';
    To change to this instead:

    Code:
    my $log_facility = $opt{'syslog'} || '/var/log/exim_mainlog';
    At that point, spamd will log to /var/log/exim_mainlog instead.

    Personally, I think that it would be better to have it log to its own log rather than exim's log, so you could do this and it would create a new log file for spamd:

    Code:
    my $log_facility = $opt{'syslog'} || '/var/log/spamlog';
    This would be at /var/log/spamlog location and log spamd entries without mixing them with IMAP and POP3 ones. You would need to restart exim for the changes to take effect:

    Code:
    /etc/init.d/exim restart
    I tested running a forced cPanel update (/scripts/upcp --force) as well as a forced exim update (/scripts/eximup --force) and neither overwrote the /usr/bin/spamd file changes that were made, since the binary for SpamAssassin's spamd is normally only revised if you reinstall SpamAssassin itself. I would suggest making a backup of the /usr/bin/spamd binary before editing it as well as a copy of those changes regardless.

    Thanks!
     
Loading...

Share This Page