You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Matt <ma...@fileholder.net> on 2005/03/18 00:04:50 UTC

sa-learn help

I am running a Directadmin server that uses Exim and Spamassassin 3.0.2 
release.  I would like to create two email addresses such as 
ham-messages@mydomain.com and spam-messages@mydomain.com.  Then I would like 
to ask all our users to forward there ham or spam to these addresses as an 
attachment.  Then magically have some cronjob that runs sa-learn on them 
every 5 minutes or so.

Has anyone done something like this?  If so how?  Most of our users use 
Outlook Express for email.  Nearly 1000 email accounts.

Also, Spamassassin seems to create a seperate bayes file for each user.  For 
this I would like to have these addresses cover all domains and users on the 
server.  Is that possible?

Thanks

Matt 



Re: sa-learn help

Posted by Mike Jackson <mj...@barking-dog.net>.
>I am running a Directadmin server that uses Exim and Spamassassin 3.0.2 
>release.  I would like to create two email addresses such as 
>ham-messages@mydomain.com and spam-messages@mydomain.com.  Then I would 
>like to ask all our users to forward there ham or spam to these addresses 
>as an attachment.  Then magically have some cronjob that runs sa-learn on 
>them every 5 minutes or so.

I don't know anything about Exim, but with Sendmail you can pipe mail to an 
external command. I'd write a script (Perl would be my language of choice, 
see why a little further down) that removes the attachment and either saves 
it for later processing, or pushes it through sa-learn right then. I don't 
think it would create much of a bottleneck to do it on the fly, but you 
might want to test it and write your script to either run on a per-message 
or batch basis.

> Has anyone done something like this?  If so how?  Most of our users use 
> Outlook Express for email.  Nearly 1000 email accounts.

Tell the users to forward the messages as attachments. Write a Perl script 
that receives the mail via a pipe. Look at the Mail::Audit::Attach Perl 
module to make it easy to strip the attachments from the email. Save them to 
a temp file and either run sa-learn against them, then delete, or save the 
temp files for batch processing through sa-learn. Pretty straightforward.

> Also, Spamassassin seems to create a seperate bayes file for each user. 
> For this I would like to have these addresses cover all domains and users 
> on the server.  Is that possible?

Sorry, for that you get a RTFM. Simple answer: yes.

Mike Jackson