[Mimedefang] Ignoring headers with sa-learn

Yizhar Hurwitz yizhar at mail.com
Sat Apr 29 07:04:51 EDT 2006


HI.


I'm currently using Mimedefang 2.52 with SA 3.0.4 .


So far I have used SA rules and network tests without Bayes,

and now I'm starting to use Bayes also.


The bayes database (along with AWL) is at:

/home/defang/.spamassassin


I have already started using bayes by adding the following to sa-mimedefang:

use_bayes 1
bayes_auto_learn 1
bayes_auto_learn_threshold_nonspam 0.5
bayes_auto_learn_threshold_spam 8.0

All seems to work fine and I have no problem with that (but you can tell 
me if you have any tips).


I also have a corpus of manually sorted spam and ham messages that I 
have collected and will like to use sa-learn with them.

The corpus is in specific mail folders on my Cyrus-imap server (single 
message per file).

All of these messages have headers added by MD, such as:

X-Spam-Score: ...
X-Scanned-By: MIMEDefang ...


Some of the messages (false positive) also have a SpamAssassinReport.txt 
attached to them that was added by MD.

Those messages are in a separate corpus (mail folder) so I can start by 
learning only from messages that don't have that attachment.


I have read the sa-learn man pages and perldoc Mail::SpamAssassin:Conf, 
and found the option:

bayes_ignore_header


But I'm not sure where (in which file) should I use it, because I run 
sa-learn outside of the scope of MD,

so sa-mimedefang isn't probably the right place for it.

So my questions are:


* How should I tell sa-learn which headers to ignore?


* Can I tell sa-learn to ignore the attachment SpamAssassinReport.txt , 
or can you suggest a script to easily  remove  that specific attachment?


Thanks for any tips,

Yizhar Hurwitz

http://yizhar.mvps.org






More information about the MIMEDefang mailing list