Re: Spamassassin + exim
- To: debian-user@lists.debian.org
- Subject: Re: Spamassassin + exim
- From: kenneth dombrowski <kenneth@ylayali.net>
- Date: Mon, 1 Sep 2003 03:19:12 -0400
- Message-id: <[🔎] 20030901071912.GB4423@ylayali.net>
- Mail-followup-to: debian-user@lists.debian.org
- In-reply-to: <20030831165619.3fd5e7f5.grey@dmiyu.org>
- References: <200308302216.14529.jeffelkins@earthlink.net> <20030830191949.07756265.grey@dmiyu.org> <200308302235.20379.jeffelkins@earthlink.net> <20030830194634.5bcb6a59.grey@dmiyu.org> <3F516923.6020004@tacocat.net> <20030830202743.07c9da83.grey@dmiyu.org> <3F516E1D.7010302@tacocat.net> <20030830204847.12b7478a.grey@dmiyu.org> <20030831181509.GA4423@ylayali.net> <20030831165619.3fd5e7f5.grey@dmiyu.org>
On 03-08-31 16:56 -0700, Steve Lamb wrote:
> On Sun, 31 Aug 2003 14:15:09 -0400
> kenneth dombrowski <kenneth@ylayali.net> wrote:
> > well, there's definitely something wrong with my setup since upgrading
> > from 2.43 -> 2.55 this past week, I've fed sa-learn almost 2k --spam
> > and >4k --ham messages, and I'm yet to see a single BAYES_* test in the
> > headers
>
> Is it turned on? IE, do the rules files have Bayesian rules in it? Are
> they scored higher than 0? Do they have it enabled? Do your personal
> preferences have them enabled? Have you fed it large amounts of ham only to
> have that dump into your personal filter and looking at it from the global or
> vice versa?
>
Thank you, Steve, your last question prompted me to rethink what was
going on. I am calling spamc via dman's SpamAssassin/Exim 3 method
(which must run as user mail to set $received_protocol) but calling
sa-learn as my user. I had another look around, and it looked like the
auto-learning was happening in /var/mail/.spamassassin, while I'd
only been looking in my ~/.spamassassin dir
I re-read `man spamd` (among many others), and decided I would just
employ a system-wide bayes_ db -- nobody else really uses the box right
now anyway -- so I added this to /etc/spamassassin/local.cf:
bayes_path /var/mail/.spamassassin/bayes
bayes_file_mode 0664
which I expected to have permission problems with. The original
permissions were:
# ls -lA /var/mail/
drwx--S--- 2 mail mail 4096 Sep 1 00:11 .spamassassin
# ls -lA /var/mail/.spamassassin/
-rw------- 1 mail mail 1496 Sep 1 00:11 bayes_msgcount
-rw------- 1 mail mail 118784 Sep 1 00:11 bayes_seen
-rw------- 1 mail mail 1327104 Sep 1 00:11 bayes_toks
-rw-r--r-- 1 mail mail 741 Aug 21 01:20 user_prefs
I made these modifications:
# addgroup --system sa
# adduser kenneth sa
# adduser mail sa
# chown -R mail:sa /var/mail/.spamassassin
# chmod g+rwx /var/mail/.spamassassin
# chmod 0664 /var/mail/.spamassassin/*
And sent myself a test message from my work account:
X-Spam-Status: No, hits=-5.4 required=5.0
tests=BAYES_01
version=2.55
So it seems to work.
In the end it might have been easier to just filter @ the Procmail
level, but I understand with Exim4 it's possible to reject mail @ the
SMTP level based on SA results.. which seems like a desirable thing to
implement when I finally get around to upgrading exim
If it's a half-baked approach, I'd appreciate any comments..
Thanks again,
Kenneth
Reply to: