On Thu, Jun 04, 2009 at 06:28:18PM +0200, Karsten Bräckelmann wrote:
> On Thu, 2009-06-04 at 11:29 -0400, Steeve McCauley wrote:
> > I just spent the better part of the last month trying to figure
> > out why my baysian filtering was not working on a new mail server
> > setup.  [...]
> 
> > Today on a whim I decided to add -u <username> to the spamc 
> > command line in my procmail filter and bayes started working.
> 
> > I discovered in the syslog the following difference before and
> > after the change,
> > 
> > Thu Jun  4 07:40:03 2009 [29789] info: spamd: setuid to openpkg-r succeeded
> > Thu Jun  4 08:15:02 2009 [29789] info: spamd: setuid to steeve succeeded
> > 
> > so it's now obvious that it was running as user openpkg-r, rather
> > than my user own user name, which is the user under which spamd is
> 
> I believe this is wrong. spamd appears to be running as root. Otherwise,
> it would not have setuid'ed to the user in the first place.

spamd is running as root, but it does a setuid to openpkg-r
when recieving from spamc, unless I use -u steeve.

> > of the caller, which I had assumed was my user name.
> 
> > spamc -h is a little less ambiguous,
> > 
> >   -u, --username username
> >                       User for spamd to process this message under.
> >                       [default: current user]
> > 
> > The mystery for me is why spamd was doing setuid to it's own uid rather
> > than my uid, unless I forced it with the -u switch.  I know that procmail
> > is not running as user openpkg-r which just adds to the mystery.
> 
> My guess is, this assumption is wrong. :)  At least at the point in the
> procmail recipe where spamc is being called, procmail appears to run as
> the openpkg-r user.
> 
> spamc tells the user it is running as by default.
> 
> 
> > Any ideas?
> 
> Just to verify, try adding something like this to your procmailrc, right
> before the recipe that filters through spamc. Then check the log. (Note,
> linebreak intended.)
> 
> LOG = "Hello, I am ${LOGNAME}.
> "

Procmail is running as "steeve",

Hello, I am steeve.
>From medicalhairrestoration...@hairproonline.com  Thu Jun  4 14:05:08 2009
 Subject: [SPAM 4.6] RE: Hair news : Free DVD 
  Folder: /var/mail/steeve                                               341674

It woudl have been incredbily perplexing if procmail were running
as an openpkg user since it's not an openpkg package.

Something is weird here between spamc and spamd.

Thanks for the reply,

steeve

-- 
Steeve McCauley                                      ste...@oneguycoding.com
:wq                                                  http://oneguycoding.com
The mistake you make is in trying to figure it out.
- Tenessee Williams

Reply via email to