jimhermann

Well-Known Member
Jan 20, 2008
71
2
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
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
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!