RE: Ubuntu :How to setup Spamassassin
05-02-2016, 09:24 PM
(This post was last modified: 05-02-2016, 09:27 PM by americanninja.)
So I wanted to mention something and hoping someone knows the answer. So I have nothing coming up in my /var/log/spamassassin/ folder. I wanted to look in here to see if I could monitor what emails were being flagged by spamassassin. I noticed there was no files here. So I thought, that's strange. And I tried doing echo $SAHOME. Which resulted in nothing. So I figure, that's why nothing's being logged. My system doesn't know what SAHOME is. Which makes sense, because I rebooted my server.
I should have thought of this earlier. So why are we configuring SAHOME as a variable and then referencing it in the Spamassassin config file (/etc/default/spamassassin). This won't work right? Variables are reset everytime your server is rebooted.
So rather than this line:
OPTIONS="--create-prefs --max-children 2 --username spamd \ -H ${SAHOME} -s ${SAHOME}spamd.log"
why don't we use this line:
OPTIONS="--create-prefs --max-children 2 --username spamd \ -H /var/log/spamassassin/ -s /var/log/spamassassin/spamd.log"
I made this change and restarted Spamassassin and Postfix and I immediately saw this spamd.log file get created and populated with info.
So I think I fixed it and did what was supposed to be done, but I'm surprised nobody else has called this out until now. Can someone more confident and experienced with this stuff, please comment and confirm.
And while we are at it...I would like to know where things are logged when Spamassassin does identify mail as spam. I know it will tag my email with ***SPAM*** in the subject line, but I'm curious does an entry get made somewhere on my server that I can review to check operation is working as expected?
Thanks!
I should have thought of this earlier. So why are we configuring SAHOME as a variable and then referencing it in the Spamassassin config file (/etc/default/spamassassin). This won't work right? Variables are reset everytime your server is rebooted.
So rather than this line:
OPTIONS="--create-prefs --max-children 2 --username spamd \ -H ${SAHOME} -s ${SAHOME}spamd.log"
why don't we use this line:
OPTIONS="--create-prefs --max-children 2 --username spamd \ -H /var/log/spamassassin/ -s /var/log/spamassassin/spamd.log"
I made this change and restarted Spamassassin and Postfix and I immediately saw this spamd.log file get created and populated with info.
So I think I fixed it and did what was supposed to be done, but I'm surprised nobody else has called this out until now. Can someone more confident and experienced with this stuff, please comment and confirm.
And while we are at it...I would like to know where things are logged when Spamassassin does identify mail as spam. I know it will tag my email with ***SPAM*** in the subject line, but I'm curious does an entry get made somewhere on my server that I can review to check operation is working as expected?
Thanks!