(sorry if this is a repost, I dont see my messages coming through...the irony of spamassassin.apache.org trapping my request for help as spam.  I have snipped the logfile entries which I think were causing it to be tagged as spam)

All of my messages are being tagged with BAYES_00=-1.9
I have cleared the bayes db (sa-learn --clear), then I manually trained.  Here are the results:
sa-learn --dump magic
0.000          0          3          0  non-token data: bayes db version
0.000          0        642          0  non-token data: nspam
0.000          0       9415          0  non-token data: nham
0.000          0     119685          0  non-token data: ntokens
0.000          0 1461963062          0  non-token data: oldest atime
0.000          0 1464701914          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal sync atime
0.000          0 1464701937          0  non-token data: last expiry atime
0.000          0    2764800          0  non-token data: last expire atime delta
0.000          0     455262          0  non-token data: last expire reduction count

Here are two examples it shows that the bayes filter is very confident these emails are ham:
May 30 09:04:53 www amavis[16577]: (16577-03) Passed CLEAN {RelayedInbound}, <snip> Tests: [BAYES_00=-1.9,RCVD_IN_MSPIKE_H2=-0.001,SPF_PASS=-0.001,URIBL_BLOCKED=0.001], autolearn=ham autolearn_force=no, autolearnscore=-0.001, 3992 ms

May 30 08:34:13 www amavis[16252]: (16252-01) Passed SPAMMY {RelayedTaggedInbound}, <snip> Tests: [BAYES_00=-1.9,HTML_MESSAGE=0.001,HTML_TAG_BALANCE_BODY=1.157,MIME_HTML_MOSTLY=0.428,MPART_ALT_DIFF=0.79,RAZOR2_CHECK=0.922,SPF_FAIL=0.001,SPF_HELO_FAIL=0.001,THIS_AD=1.675,T_HTML_TAG_BALANCE_CENTER=0.01,URIBL_BLOCKED=0.001,URIBL_DBL_SPAM=2.5], autolearn=no autolearn_force=no, autolearnscore=8.272, 4054 ms

The spam is learned by a simple bash script.  The users (my family) move spam into a SPAM folder.  This script then runs every night ( I have removed some of the logging lines and comments for brevity):
#!/bin/bash
# delete messages this old
cleanafter=14

# grab all the user folders
users=`find /var/spool/cyrus/mail -name SPAM -print`

for u in ${users[@]}; do
    inbox=${u%/*}
    folder=${u##*/}
    user=${inbox##*/}
    sa-learn --nosync --spam --progress --dir $inbox/SPAM
    sa-learn --nosync --ham --progress --dir $inbox

done

# sync the sa db
sa-learn --sync

Setup:
ubuntu server 14.04
postfix:2.11.0
amavis:2.7.1
spamassassin:3.4.0

postfix config (main.cf):
content_filter = smtp-amavis:[127.0.0.1]:10024
smtpd_recipient_restrictions =
    permit_sasl_authenticated,
            permit_mynetworks,
            reject_unauth_destination,
        reject_rbl_client zen.spamhaus.org,
        reject_rbl_client bl.spamcop.net
        reject_rbl_client ix.dnsbl.manitu.net,
        reject_rbl_client cbl.abuseat.org,
        reject_rbl_client b.barracudacentral.org,
        reject_rbl_client new.spam.dnsbl.sorbs.net

smtpd_client_restrictions =
    permit_sasl_authenticated,
       permit_mynetworks,
        reject_rbl_client zen.spamhaus.org,
        reject_rbl_client bl.spamcop.net
        reject_rbl_client ix.dnsbl.manitu.net,
        reject_rbl_client cbl.abuseat.org,
        reject_rbl_client b.barracudacentral.org,
        reject_rbl_client new.spam.dnsbl.sorbs.net
spamassasin config:
 rewrite_header Subject *****PC SPAM*****
 trusted_networks 192.168.
 required_score 5.0
 use_bayes 1
 bayes_auto_learn 0
# bayes_ignore_header X-Bogosity
# bayes_ignore_header X-Spam-Flag
# bayes_ignore_header X-Spam-Status
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
# shortcircuit USER_IN_WHITELIST       on
# shortcircuit USER_IN_DEF_WHITELIST   on
# shortcircuit USER_IN_ALL_SPAM_TO     on
# shortcircuit SUBJECT_IN_WHITELIST    on
# shortcircuit USER_IN_BLACKLIST       on
# shortcircuit USER_IN_BLACKLIST_TO    on
# shortcircuit SUBJECT_IN_BLACKLIST    on
# shortcircuit ALL_TRUSTED             on
# shortcircuit BAYES_99                spam
# shortcircuit BAYES_00                ham

Reply via email to