persoanlizing SPAM filters with dovecot's ldat delivery for virtual users

Chris Kottaridis chriskot at quietwind.net
Thu Jul 28 06:43:06 UTC 2011


I am running Fedora 14. I have a dovecot imap server running.

I am using MIMEDefang milter to do spam filtering via sendmail, haven't
got it to do virus filtering yet, but will. I have sendmail using
dovecot's lda for the local mail delivery. I have sieve enabled in lda
and the sieve filters in place. So, mail gets directly delivered to the
folders and not to INBOX if a filter matches. One filter looks for the
X-Spam-Score header created by MIMEDefang when it calls spamassassin.

Everything is working OK.

The issue is that some spam doesn't get tagged by spamassassin and ends
up in the INBOX. However, if I enable evolution to filter for junk
evolution finds it and moves it to the Junk folder. I believe evolution
finds it because in the past I had evolution doing all the filtering and
had marked various emails as junk. I believe evolution runs spamassassin
with a learning mode so when I mark an email as junk it learns that is
junk and modifies a private file for the user indicating that this user
considers this email to be junk and uses that info in future email
filtering. Here is a reference to the user specific spamassassin config
file from the spamassassin man page:
------------------------------------------------------
 Individual user preferences are loaded from the location specified on
       the "spamassassin", "sa-learn", or "spamd" command line (see
respective
       manual page for details).  If the location is not specified,
       ~/.spamassassin/user_prefs is used if it exists.  SpamAssassin
will
       create that file if it does not already exist, using
       user_prefs.template as a template
-------------------------------------------------------

My question is whether there is anyway for the virtual mail users I now
have to do a similar kind of learning ?

I'd expect you'd need a way for ldap to run spamassassin with some
option to look in the virtual user's home directory for a virtual user
specific spam rule file and run spam on the mail again, even though
sendmail ran it through a milter already but without the user's spam
rule file, and tag the message as spam before running sieve that could
see the added header and file it accordingly. You'd only need to run it
on messages that MMEDefang didn't already identify as spam. I am not
sure how you'd be able to update that local spam learning file though.

Anyway, I thought I would ask if there is some way to allow my
configuration to do personalized spam learning for my virtual users.
I am assuming the answer is no, but there may be something out there I
haven't run across yet.

Thanks
Chris Kottaridis


More information about the users mailing list