On Tue, Dec 31, 2013 at 01:00:40AM +0100, Timothy Murphy wrote:
On Monday, December 30, 2013 03:38:46 PM Robert Moskowitz wrote:
I collect email on my server from various (remote) mail-servers. This is then processed by postfix/amavis/clamav/spamassassin . Spam is marked by addition of [SPAM] or ***Spam*** to the Subject header, as well as addition of several other headers.
As I understand it, the email is then passed through dovecot(?), to ~/Maildir/cur/ .
This must be a standard setup. So how normally is spam dealt with, at this stage? What is the norm?
I strongly doubt there is a norm. :)
But the howtos on amavis (which integrates clamav), show how it can do all sorts of things with spam. What helped me a lot was:
http://campworld.net/thewiki/pmwiki.php/LinuxServersCentOS/Cent6VirtMailServ er
Thank you for your response. I looked at the above document, but as far as I can see it said nothing to answer my query, namely, how is spam email marked as spam by the addition of the header X-Spam-Flag: YES normally filtered into a Spam folder, preferably by dovecot, but possibly earlier by amavis or postfix?
Probably uses procmail for that. In procmail I use headers inserted by spambayes like this:
########### Feed it thru SPAMBAYES first ################ :0 fw:hamlock | /usr/bin/sb_filter.py -f -d $HOME/.hammiedb
# then filter out spam and unsure stuff.... :0 * ^X-Spambayes-Classification: spam $HOME/Mail/newspam
:0 * ^X-Spambayes-Classification: unsure $HOME/Mail/unsure
which filters based on what the X-Spambayes-Classification: header says.