[Spambayes] Procmail problem

Calin A. Culianu calin at ajvar.org
Mon Oct 27 15:03:47 EST 2003


Hi all,

I am new to the mailing list.  I love spambayes, and think it is a great
project.

However, I have a problem.  I recently upgradrd from 1.0a2 to 1.0a6.  I
noticed that the scripts have been renamed a bit, probably to make
installation and adminning easier.

At any rate, I am having problems with this new version of spambayes in
conjunction with procmail.  It should be noted that everything worked
perfectly fine before with 1.0a2..

Basically, these are the two relevant procmail recipes:

# test for spam
:0 fw
| /usr/bin/sb_filter.py

# is it spam? if so save to spam mbox 'folder'
:0
* ^X-Spambayes-Classification: spam
spam


The problem is the following: even though spam gets detected correctly by
the sb_filter.py script (the X-Spambayes-Classification: spam; 1.00 gets
inserted into the message header), procmail apparently _never_ makes it to
the next recipe, the one that sticks messages containing
X-Spambayes-Classification: spam to my spam folder.  I know the regex is
ok because I ran this regex with egrep on my inbox and it picked out the
messages with the spam classification header...

I suspect the problem may have something to do with exit statuses.  The
procmailrc manpage is vague, but it appears that the w flag for the
sb_filter.py recipe tells procmail to "wait for the filter program, and
look at its exit status".  I suspect that somehow the exit status returned
by sb_filter.py causes procmail to stop processing recipes and it never
makes it to the last recipe.

I grok'd the source to sb_filter.py but I am not a python programmer.  I
did however notice a conspicuous lack of return values from either main()
or from the script itself.  I presume python is like perl in that it
always returns the status of the last command in the script, but that may
or may not be a reliable thing..

Anyway.. any ideas about my problem?  Why would the old hammiefilter.py
script work fine in my .procmailrc but this new sb_filter.py script not
work?  (Again, I must stress that it DOES add the header, but somehow
procmail never makes it to the next recipe).

I am at my wit's end.. any help would be appreciated..

-Calin





More information about the Spambayes mailing list