You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Dave Mabe <da...@gmail.com> on 2005/10/12 20:42:46 UTC

Bayes works when run manually, but not under procmail

I'm storing my Bayes config in mysql and it works as expected when I
manually run spamassassin on a mail message.

X-Spam-Status: Yes, score=17.9 required=5.0tests=BAYES_99,FORGED_MUA_OUTLOOK,
FORGED_OUTLOOK_HTML,FORGED_OUTLOOK_TAGS,HTML_MESSAGE,MIME_HTML_ONLY,
MSGID_FROM_MTA_ID,RCVD_IN_BL_SPAMCOP_NET,SPF_SOFTFAIL,UNDISC_RECIPS
autolearn=no version=3.1.0

However, when it comes in via Postfix and kicks off using procmail, the
Bayes test is apparently not run.

X-Spam-Status: Yes, score=10.1 required=5.0 tests=FORGED_MUA_OUTLOOK,
FORGED_OUTLOOK_HTML,FORGED_OUTLOOK_TAGS,HTML_MESSAGE,MIME_HTML_ONLY,
MSGID_FROM_MTA_ID,UNDISC_RECIPS autolearn=no version=3.1.0

Those results are for the same message. I'm using version 3.1.0. I'm
pointing to the same file for spamassassin using both methods:

:0fw
| $HOME/sauser/bin/spamassassin

Any ideas what could be wrong? Also, I tried changing my procmail recipe to
this to capture debug output, but no file gets created:

:0fw
| $HOME/sauser/bin/spamassassin -D 2>> $HOME/sa.log

Any help would be greatly appreciated.

--
Dave Mabe
http://dave.runningland.com

Re: Bayes works when run manually, but not under procmail

Posted by Matt Kettler <mk...@evi-inc.com>.
Dave Mabe wrote:
> I'm storing my Bayes config in mysql and it works as expected when I
> manually run spamassassin on a mail message.
> 
> X-Spam-Status: Yes, score=17.9 required=5.0
> tests=BAYES_99,FORGED_MUA_OUTLOOK,
>         FORGED_OUTLOOK_HTML,FORGED_OUTLOOK_TAGS,HTML_MESSAGE,MIME_HTML_ONLY,
>         MSGID_FROM_MTA_ID,RCVD_IN_BL_SPAMCOP_NET,SPF_SOFTFAIL,UNDISC_RECIPS
>         autolearn=no version=3.1.0

Question: what user did you manually run spamassassin as for this test?

> However, when it comes in via Postfix and kicks off using procmail, the
> Bayes test is apparently not run.
> 
> X-Spam-Status: Yes, score=10.1 required=5.0 tests=FORGED_MUA_OUTLOOK,
>         FORGED_OUTLOOK_HTML,FORGED_OUTLOOK_TAGS,HTML_MESSAGE,MIME_HTML_ONLY,
>         MSGID_FROM_MTA_ID,UNDISC_RECIPS autolearn=no version=3.1.0


Question, what user does postfix invoke procmail as? Is it the same as above?

If not, be aware the default bayes path is relative to the home directory of the
user that executes SA. Note carefully that this is the user executing SA, not
the user the mail is addressed to.