Here is what I discovered in relation to this:
By sending/forwarding email to a spam and ham account, you change the headers. Obviously. In that case you will need to change your leaning setup to ignore headers (if I recall properly), which in my opinion should be part of the learning/training process. I am not sure how correct I am in this opinion, but this lead me to have the same type of accounts, but I gave some trusted users the account info for spam and ham and instructions to set them up as imap. They can then COPY the subject emails into those accounts, keeping the headers intact. I then run a script to process those emails and train the system wide database. Does it work? Well I do know incorrect spam tagging is better, much better. This is for myself and those users I do trust. For another user that is technically impaired, I connect via IMAP to his account (with his permission) and work the training myself. This is critical to him as he is in a service industry, does not like/want SPAM tag in the subject of replies, forgets to remove it from the subject when he replies, and gets a lot of emails tagged as SPAM due to his industry (tourism). It has also helped him a lot. Your mileage may vary, and if my assumptions/opinions are incorrect I hope someone else with more spamassassin experience will chime in. the script I use for training is below. I have copied/modified it to suit my system from someone, somewhere - I do not recall - (maybe the qmailtoaster or spamassassin wiki!). Hope this helps. Helmut #!/bin/bash #Spam Assassin Bayes Training DOMAIN=mydom.com SPAM=is-spam HAM=not-spam # Learn spam! cd /home/vpopmail/domains/$DOMAIN/$SPAM/Maildir/cur sudo -u vpopmail -H sa-learn --spam --no-sync --progress ./* rm -rf /home/vpopmail/domains/$DOMAIN/$SPAM/Maildir/cur/* cd /home/vpopmail/domains/$DOMAIN/$SPAM/Maildir/new sudo -u vpopmail -H sa-learn --spam --no-sync --progress ./* rm -rf /home/vpopmail/domains/$DOMAIN/$SPAM/Maildir/new/* # Learn ham! cd /home/vpopmail/domains/$DOMAIN/$HAM/Maildir/cur sudo -u vpopmail -H sa-learn --ham --no-sync --progress ./* rm -rf /home/vpopmail/domains/$DOMAIN/$HAM/Maildir/cur/* cd /home/vpopmail/domains/$DOMAIN/$HAM/Maildir/new sudo -u vpopmail -H sa-learn --ham --no-sync --progress ./* rm -rf /home/vpopmail/domains/$DOMAIN/$HAM/Maildir/new/* sudo -u vpopmail -H sa-learn --sync --progress From: Jim Shupert [mailto:[email protected]] Sent: Friday, June 21, 2013 12:00 PM To: [email protected] Subject: [qmailtoaster] is my Bayesian learn working and how can I tell Friends, I have set up ( long ago ) the [email protected] and the [email protected] to allow for spam training. Is there a way That I can tell that it is working? is there a log or can i look for a process? I deally i would like to send spam email to [email protected] and then look at it being 'learned' I also have the following in my headers on all email marked as spam. X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sifter.pps-inc.com X-Spam-Level: ******* X-Spam-Status: Yes, score=7.9 required=5.0 tests=BAYES_99,HTML_EXTRA_CLOSE, HTML_MESSAGE,RDNS_NONE,URIBL_JP_SURBL autolearn=no version=3.2.5 it is the " autolearn=no " that makes me wonder. What does that mean? thanks jim 2 examples - 1/ Received: by simscan 1.3.1 ppid: 23158, pid: 23160, t: 9.0256s scanners: attach: 1.3.1 clamav: 0.95.2 /m:51/d:9450 spam: 3.2.5 X-Spam-Flag: YES X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sifter.pps-inc.com X-Spam-Level: ******* X-Spam-Status: Yes, score=7.9 required=5.0 tests=BAYES_99,HTML_EXTRA_CLOSE, HTML_MESSAGE,RDNS_NONE,URIBL_JP_SURBL autolearn=no version=3.2.5 X-Spam-Report: * 3.5 BAYES_99 BODY: Bayesian spam probability is 99 to 100% * [score: 1.0000] * 2.8 HTML_EXTRA_CLOSE BODY: HTML contains far too many close tags * 0.0 HTML_MESSAGE BODY: HTML included in message * 1.5 URIBL_JP_SURBL Contains an URL listed in the JP SURBL blocklist * [URIs: sadicryfoxe.net] * 0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS Received: from unknown (HELO 03d5a57b.sadicryfoxe.net) (31.192.109.44) 2/ Received: by simscan 1.3.1 ppid: 23450, pid: 23452, t: 2.1726s scanners: attach: 1.3.1 clamav: 0.95.2 /m:51/d:9450 spam: 3.2.5 X-Spam-Flag: YES X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sifter.pps-inc.com X-Spam-Level: ***** X-Spam-Status: Yes, score=5.5 required=5.0 tests=BAYES_99,HTML_MESSAGE, MISSING_MID,RCVD_ILLEGAL_IP,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Report: * 3.5 BAYES_99 BODY: Bayesian spam probability is 99 to 100% * [score: 1.0000] * 0.0 MISSING_MID Missing Message-Id: header * 1.9 RCVD_ILLEGAL_IP Received: contains illegal IP address * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS
