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!

SpamAssassin Logging

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

  1. jimhermann

    jimhermann Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    62
    Likes Received:
    2
    Trophy Points:
    58
    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,609
    Likes Received:
    32
    Trophy Points:
    238
    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!
     
    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