Confused about which bayes db gets used with spamc?

View: New views
3 Messages — Rating Filter:   Alert me  

Confused about which bayes db gets used with spamc?

by CptanPanic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
I run spamc from my procmail on incoming messages.  Does this mean that all messages are using root bayes_db?  If so why do the clients have stuff updated in their db in their home directories?  I am trying to figure this out so I can do sa-learn correctly.
Thanks,
CP

Re: Confused about which bayes db gets used with spamc?

by Bob McClure Jr-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Jun 30, 2007 at 05:41:19AM -0700, CptanPanic wrote:
>
> Hello,
> I run spamc from my procmail on incoming messages.  Does this mean that all
> messages are using root bayes_db?

No.

> If so why do the clients have stuff
> updated in their db in their home directories?

Because spamc (actually spamd) does a setuid to the user.

> I am trying to figure this
> out so I can do sa-learn correctly.

With your setup (same as mine) you should sa-learn as the user, or use
the -u or --username option to set the user.

> Thanks,
> CP
> --
> View this message in context: http://www.nabble.com/Confused-about-which-bayes-db-gets-used-with-spamc--tf4004657.html#a11373245
> Sent from the SpamAssassin - Users mailing list archive at Nabble.com.

Cheers,
--
Bob McClure, Jr.             Bobcat Open Systems, Inc.
bob@...             http://www.bobcatos.com
The Lord says: "These people come near to me with their mouth and
honor me with their lips, but their hearts are far from me. Their
worship of me is made up only of rules taught by men. Therefore once
more I will astound these people with wonder upon wonder; the wisdom
of the wise will perish, the intelligence of the intelligent will
vanish."  Isaiah 29:13-14 (NIV)

Re: Confused about which bayes db gets used with spamc?

by Matt Kettler-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

CptanPanic wrote:
> Hello,
> I run spamc from my procmail on incoming messages.  Does this mean that all
> messages are using root bayes_db?
spamd/spamc will *NEVER* use root's bayes db. If spamd finds itself
running as root it will setuid itself to nobody for safety.
>   If so why do the clients have stuff updated in their db in their home directories?
AFAIK, calling from procmail will cause spamc to be executed as the user
to whom the message will be delivered, so it should be creating a bayes
DB for each user.

If you wish to defeat that, pass a specific non-root user with the -u
parameter to spamc or spamd OR set up a globally rwx directory and
bayes_path (caution: bayes_path takes a path and partial filename, read
the docs carefully)

>  I am trying to figure this
> out so I can do sa-learn correctly.
> Thanks,
> CP
>