Anti-spam
Patrick M. Ammann
pammann at gmx.ch
Fri Apr 16 00:08:18 CEST 2004
Hello
Please see below...
Greetz Patrick
Bradley Alexander wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Hi,
>
>I am wrestling with controlling spam in an IMAP environment (I am fairly new
>to the IMAP world).
>
>I installed spamassassin according to the sourcefire howto (thanks, Ian), and
>spamassassin is working after a fashion. However, I have two problems. First
>of all, I enabled subject rewriting so that I can filter via kmail's subject
>filters. In /kolab/etc/spamassassin/local.cf, I have
>
># Whether to change the subject of suspected spam
>rewrite_subject 1
>
># Text to prepend to subject if rewrite_subject is used
>subject_tag *****SPAM*****
>
>however, the messages coming to my inbox are not being rewritten.
>
>
i suppose you are using amavis and amavis calls spamassassin, this way
amavis uses spamassassin only
to dedect the SPAM level, but any email header modification is done by
amavis itself. Your options
mentioned above have no affect for the mail headers, you migth have a
look to the conf file of amavis.
---<snip: /kolab/etc/mail/spamassassin/local.cf>---
# enable bayes
use_bayes 1
# do not learn shit
bayes_auto_learn 0
auto_learn 0
# needed to make bayes work
bayes_file_mode 0777
bayes_path /kolab/var/amavis/.spamassassin/bayes
# headers ignored by bayes: do not rate with old tests
bayes_ignore_header X-Virus-Scanned
bayes_ignore_header X-Spam-Status
bayes_ignore_header X-Spam-Level
bayes_ignore_header X-Spam-Flag
---<snip>----
>The second thing is how to train the Bayesean filters in spamassassin. Since I
>am manually filtering spam in kmail, I am putting it into a local folder,
>then copying the folder to the mailserver and running
>/kolab/bin/sa-learn --spam * in the cur directory of that directory. Since,
>being IMAP, the user does not have to have an account on the mailserver, is
>there a better/less painful way to deal with spam under kolab's imap
>implementation?
>
>
i use this solution:
---<snip: /root/bin/sa-learn.sh>----
#!/bin/bash
# OpenPKG Add Environment
eval `/kolab/etc/rc --eval all env`
export PATH=/kolab/bin:/kolab/sbin:$PATH
su kolab-r -c "/kolab/bin/sa-learn -p
/kolab/var/amavis/.spamassassin/user_prefs $1 $2 $3 $4"
exit
---<snip>----
maybe not the best but at least very easy to do, but you will need to be
root to execute the script...
>Prior to deployment of Kolab, I was using a combination of spamassassin and
>bogofilter, through procmail, which did a very good job. Is it possible to
>set up a sieve script to do something similar?
>
>
probably yes....
More information about the users
mailing list