[Spambayes] spambayes and maildrop (xfilter)

b52 at entrap.de b52 at entrap.de
Mon Apr 24 22:21:11 CEST 2006


well I solved the problem.
In the virtual users home directory was an old .spambayesrc file in a
wrong format. The sb_filter.py tried to interpret that file and crashed.

I haven't seen that problem by invoking sb_filter.py manually because it
was a virtual user that only exists in mysql. The real system user for
mail is "vmail".

If I invoked the command manually as vmail user, spambayes looked in
/home/vmail for a .spambayesrc file which doesn't exist, so it worked.
If maildrop invoked that command with xfilter, $HOME was
/home/vmail/domain/user where the wrong .spambayesrc existed, so it

bye, b52

> Hi guys,
> maybe someone can help me with this one. I configured postfix to transport
> every mail with maildrop and included a maildrop rule to pipe incomming
> mails to sb_filter.py
> If this happens I get the following error in mail.log:
> Apr 24 03:08:20 hades postfix/pipe[29142]: 6F04D27CA: to=<b52 at entrap.de>,
> relay=maildrop, delay=3, status=deferred (temporary failure. Command
> output: Traceback (most recent call last):   File "/usr/bin/sb_filter.py",
> line 80, in ?     from spambayes import hammie,
> Options, mboxutils, storage   File
> "/usr/lib/python2.3/site-packages/spambayes/hammie.py", line 5, in ?
> from spambayes import storage   File
> "/usr/lib/python2.3/site-packages/spambayes/storage.py", line 68, in ?
> from spambayes import classifier   File "/usr/
> lib/python2.3/site-packages/spambayes/classifier.py", line 73, in ?
> from spambayes.Options import options   File
> "/usr/lib/python2.3/site-packages/spambayes/Options.py", line 1263, in ?
>   load_options()   File "/usr/lib/python2.3/site-packages/spambayes/Option
> s.py", line 1195, in load_options     options.merge_files(alts)   File
> "/usr/lib/python2.3/site-packages/spambayes/OptionsClass.py", line 521, in
> merge_files     self.merge_file(f)   File
> "/usr/lib/python2.3/site-packages/spam
> Well to tell you the truth I don't understand that message at all. Maybe
> some python geeks do..
> My maildrop rule is:
> xfilter "/usr/bin/sb_filter.py -d /home/vmail/bayes.db"
> I tried xfilter with another binary and it works fine.
> Thanks for any help
> bye, b52

More information about the SpamBayes mailing list