Re: [SLUG] Re: spamassassin installation

From: Eben King (eben01@verizon.net)
Date: Fri Jun 16 2006 - 19:56:08 EDT


On Fri, 16 Jun 2006, Eben King wrote:

> On Thu, 8 Jun 2006, Eben King wrote:
>
>> I set up and trained SA on my machine:
>>
>> eben@pc:~$ sa-learn --backup | head
>> v 3 db_version # this must be the first line!!!
>> v 386 num_spam
>> v 942 num_nonspam
>>
>> But it seems not to scan some messages, which I don't understand.
>
> OK, it looks like Postfix passes most (all?) mail through procmail, but
> somehow SA isn't putting its mark on them. I sent myself a test message, and
> saw this in /var/log/syslog:
>
> Jun 16 19:22:05 pc postfix/local[4329]: 1C04210609: to=<eben@localhost>,
> relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail)
>
> but the message has no X-Spam headers. Hmm. Does procmail have a config
> file that can be hosed interestingly?

I couldn't find any such file. Nor could I find an option for verification
(like "rpm -v") in apt-get, dpkg, deb (no man page), or dselect.

root@pc:/etc# ls -l /usr/bin/procmail ; md5sum /usr/bin/procmail
-rwxr-sr-x 1 root mail 68152 May 2 2005 /usr/bin/procmail
b4722dd82b2924f270374e8b8883a803 /usr/bin/procmail

eben@pc:~$ procmail -v
procmail v3.22 2001/09/10
     Copyright (c) 1990-2001, Stephen R. van den Berg <srb@cuci.nl>
     Copyright (c) 1997-2001, Philip A. Guenther
<guenther@sendmail.com>

Submit questions/answers to the procmail-related mailinglist by sending to:
         <procmail-users@procmail.org>

And of course, subscription and information requests for this list to:
         <procmail-users-request@procmail.org>

Locking strategies: dotlocking, fcntl()
Default rcfile: $HOME/.procmailrc
         It may be writable by your primary group
Your system mailbox: /var/mail/eben

eben@pc:~$ ls -l ~/.procmailrc
4.0K -rw-r--r-- 1 eben eben 1.2K 2006-02-02 01:31 /home/eben/.procmailrc

eben@pc:~$ cat ~/.procmailrc
# SpamAssassin sample procmailrc
#
# Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
# if you use the spamc/spamd combination)
#
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
#
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.
#
:0fw: spamassassin.lock
* < 256000
| spamassassin -D rulesrun=255

# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
almost-certainly-spam

# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to "probably-spam".
:0:
* ^X-Spam-Status: Yes
probably-spam

# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped. This will re-add it.
:0
* ^^rom[ ]
{
     LOG="*** Dropped F off From_ header! Fixing up. "

     :0 fhw
     | sed -e '1s/^/F/'
}

Does that look reasonable?

-- 
-eben     QebWenE01R@vTerYizUonI.nOetP     http://royalty.no-ip.org:81
An ASCII character walks into a bar and orders a double. "Having a bad
day?" asks the barman. "Yeah, I have a parity error," replies the ASCII
chrcter. The barman says, "Yeah, I thought you looked a bit off." - Skud
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:10:45 EDT