FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 07-28-2011, 06:43 AM
Chris Kottaridis
 
Default persoanlizing SPAM filters with dovecot's ldat delivery for virtual users

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
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-28-2011, 12:02 PM
Patrick O'Callaghan
 
Default persoanlizing SPAM filters with dovecot's ldat delivery for virtual users

On Thu, 2011-07-28 at 00:43 -0600, Chris Kottaridis wrote:
> My question is whether there is anyway for the virtual mail users I
> now have to do a similar kind of learning ?

What is a "virtual user"?

poc

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 07-28-2011, 11:31 PM
Chris Kottaridis
 
Default persoanlizing SPAM filters with dovecot's ldat delivery for virtual users

On Thu, 2011-07-28 at 07:32 -0430, Patrick O'Callaghan wrote:
> On Thu, 2011-07-28 at 00:43 -0600, Chris Kottaridis wrote:
> > My question is whether there is anyway for the virtual mail users I
> > now have to do a similar kind of learning ?
>
> What is a "virtual user"?

They don't have accounts on the machine so they can't login. But, Imap
recognizes them as users. They do have a home directory from imap's
persective.

I got the term from the dovecot documentation here:

http://wiki2.dovecot.org/VirtualUsers

I also did find out something last night on further search that I can
potentially connect spam to an SQL database. With that tool I may be
able to run sa-learn on virtual users mail to define virtual user
specific filtering. Have the users store mail they consider to be spam
in a known mailbox name. Then run a cron job to run sa-learn on each
user's mailbox telling it's --spam and run sa-learn on the other
mailboxes telling sa-learn it is --ham and run sa-learn with the -u
option.

>From what I can tell sa-learn will then store user specific spam info in
the database. I still need a way to run spamassassin on incoming mail to
let it know what the username is that the email is destined for. So,
maybe I need to create a wrapper to make a local mailer that runs spamc
on mail that hasn't already been tagged as spam using the username and
then fed that into dovecot-lda for the actual delivery.

This is one of the pages that talks about spamassassin and databases:

http://vps.donwyatt.com/My_SpamAssassin_MySQL_How-To.html
http://www.wistful.net/wiki/My_SpamAssassin_MySQL_How-To
http://wiki.apache.org/spamassassin/UsingSQL

The last one has a section entitled:
"Global, Per-Domain, and Per-User Preferences via SQL"

I don't know for sure yet if this will give me what I want, because I
haven't really had time to play with anything. But, I do have hope.

Thanks
Chris Kottaridis

>
> poc
>

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 07:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org