You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Stefan Suurmeijer <st...@gmail.com> on 2008/01/08 00:59:51 UTC

Problem with handle_user

Hi list,

I'm trying to use spamassassin with per-user rules on a machine running
Linux with sendmail 8.14.2 and cyrus imapd 2.2.12.
I'm running into a small problem: it seems that spamd doesn't know which
user the mail is intended for and therefore always uses the default
settings:

Jan  8 00:47:29 smtp1 spamd[11786]: spamd: connection from localhost [
127.0.0.1] at port 5468
Jan  8 00:47:29 smtp1 spamd[11786]: spamd: handle_user unable to find user:
''
Jan  8 00:47:29 smtp1 spamd[11786]: spamd: still running as root: user not
specified with -u, not found, or set to root, falling back to nobody

This happens for every mail received: unable to find user ''

I'm running spamassassin 3.2.4 on perl 5.8.8. I use spamd with options -d -c


Can anyone tell me what the problem might be?

Thanks in advance,

Stefan

Re: Problem with handle_user

Posted by Matt Kettler <mk...@verizon.net>.
Stefan Suurmeijer wrote:
> Hi Matt,
>
> On Jan 8, 2008 2:36 AM, Matt Kettler <mkettler_sa@verizon.net 
> <ma...@verizon.net>> wrote:
>
>     Stefan Suurmeijer wrote:
>     >
>     > Jan  8 00:47:29 smtp1 spamd[11786]: spamd: connection from
>     localhost [
>     > 127.0.0.1 <http://127.0.0.1> < http://127.0.0.1>] at port 5468
>     > Jan  8 00:47:29 smtp1 spamd[11786]: spamd: handle_user unable to
>     find
>     > user: ''
>     > Jan  8 00:47:29 smtp1 spamd[11786]: spamd: still running as
>     root: user
>     > not specified with -u, not found, or set to root, falling back
>     to nobody
>     >
>     > This happens for every mail received: unable to find user ''
>     >
>     > I'm running spamassassin 3.2.4 on perl 5.8.8. I use spamd with
>     options
>     > -d -c
>     >
>     > Can anyone tell me what the problem might be?
>
>     What's calling spamc? A procmail script? A milter integrated in
>     sendmail?
>
>  
>
> A sendmail milter calls spamassassin. I use the same setup, albeit 
> with older versions of SA and sendmail, on another server, without any 
> problem.
>
> Any ideas?

Different configuration of the milter? Or perhaps on the other box, the 
milters run as a user other than root (this is a sendmail option IIRC)


Re: Problem with handle_user

Posted by Stefan Suurmeijer <st...@gmail.com>.
Hi Matt,

On Jan 8, 2008 2:36 AM, Matt Kettler <mk...@verizon.net> wrote:

> Stefan Suurmeijer wrote:
> >
> > Jan  8 00:47:29 smtp1 spamd[11786]: spamd: connection from localhost [
> > 127.0.0.1 <http://127.0.0.1>] at port 5468
> > Jan  8 00:47:29 smtp1 spamd[11786]: spamd: handle_user unable to find
> > user: ''
> > Jan  8 00:47:29 smtp1 spamd[11786]: spamd: still running as root: user
> > not specified with -u, not found, or set to root, falling back to nobody
> >
> > This happens for every mail received: unable to find user ''
> >
> > I'm running spamassassin 3.2.4 on perl 5.8.8. I use spamd with options
> > -d -c
> >
> > Can anyone tell me what the problem might be?
>
> What's calling spamc? A procmail script? A milter integrated in sendmail?
>


A sendmail milter calls spamassassin. I use the same setup, albeit with
older versions of SA and sendmail, on another server, without any problem.

Any ideas?

TIA
Stefan

Re: Problem with handle_user

Posted by Matt Kettler <mk...@verizon.net>.
Stefan Suurmeijer wrote:
> Hi list,
>
> I'm trying to use spamassassin with per-user rules on a machine 
> running Linux with sendmail 8.14.2 and cyrus imapd 2.2.12.
> I'm running into a small problem: it seems that spamd doesn't know 
> which user the mail is intended for and therefore always uses the 
> default settings:
>
> Jan  8 00:47:29 smtp1 spamd[11786]: spamd: connection from localhost [ 
> 127.0.0.1 <http://127.0.0.1>] at port 5468
> Jan  8 00:47:29 smtp1 spamd[11786]: spamd: handle_user unable to find 
> user: ''
> Jan  8 00:47:29 smtp1 spamd[11786]: spamd: still running as root: user 
> not specified with -u, not found, or set to root, falling back to nobody
>
> This happens for every mail received: unable to find user ''
>
> I'm running spamassassin 3.2.4 on perl 5.8.8. I use spamd with options 
> -d -c
>
> Can anyone tell me what the problem might be?

What's calling spamc? A procmail script? A milter integrated in sendmail?

The fundamental problem here appears to be whatever is being passed to 
the -u parameter of spamc is just an empty string, instead of a user name.

Re: Problem with handle_user

Posted by Jason Frisvold <xe...@gmail.com>.
On Jan 9, 2008 3:23 PM, Stefan Suurmeijer <st...@gmail.com> wrote:
> Well, I think you're now telling spamd it should always run as nobody, I can
> understand why that fixes the user unknown problem. But I need spamd to run
> as the user the mail is intended for so I can use per-user settings.

It runs the spamd process as nobody, I believe.  But the per-user
settings still work, provided that spamc is called with the -u flag.

> I'll have a look at the milter-setup to see if that's where the problem is
>
> cheers
> Stefan
>



-- 
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com
http://blog.godshell.com

Re: Problem with handle_user

Posted by Stefan Suurmeijer <st...@gmail.com>.
On Jan 9, 2008 6:56 PM, Jason Frisvold <xe...@gmail.com> wrote:

> [snip]
> >
> > This happens for every mail received: unable to find user ''
>
>
> With 3.2.3 I was running spamd as follows :
>
> /usr/bin/spamd -D -q -x -m5 -H --socketpath=/tmp/spamd.sock -r
> /var/run/spamd.pid
>
> Everything seemed to work fine, I had no issues.  Mail was being
> classified appropriately.
>
> When I upgraded to 3.2.4, I got an error stating that if -q was used,
> -u had to be specified.  So, I switched to using -Q instead.  That's
> when this error cropped up and spamassassin stopped classifying mail.
> After re-visiting the issue, I switched to this :
>
> /usr/bin/spamd -D -q -x -u nobody -m5 -H --socketpath=/tmp/spamd.sock
> -r /var/run/spamd.pid
>
> This has resolved my problem completely.  I just don't know why...
>

Well, I think you're now telling spamd it should always run as nobody, I can
understand why that fixes the user unknown problem. But I need spamd to run
as the user the mail is intended for so I can use per-user settings.

I'll have a look at the milter-setup to see if that's where the problem is

cheers
Stefan

Re: Problem with handle_user

Posted by Jason Frisvold <xe...@gmail.com>.
On Jan 7, 2008 6:59 PM, Stefan Suurmeijer <st...@gmail.com> wrote:
[snip]
> Jan  8 00:47:29 smtp1 spamd[11786]: spamd: handle_user unable to find user:
[snip]
>
> This happens for every mail received: unable to find user ''

I've been having the same problem..  I think I just fixed it, though
I'm not sure *why* this fixed it..

> Can anyone tell me what the problem might be?

With 3.2.3 I was running spamd as follows :

/usr/bin/spamd -D -q -x -m5 -H --socketpath=/tmp/spamd.sock -r
/var/run/spamd.pid

Everything seemed to work fine, I had no issues.  Mail was being
classified appropriately.

When I upgraded to 3.2.4, I got an error stating that if -q was used,
-u had to be specified.  So, I switched to using -Q instead.  That's
when this error cropped up and spamassassin stopped classifying mail.
After re-visiting the issue, I switched to this :

/usr/bin/spamd -D -q -x -u nobody -m5 -H --socketpath=/tmp/spamd.sock
-r /var/run/spamd.pid

This has resolved my problem completely.  I just don't know why...

> Thanks in advance,
>
> Stefan


-- 
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com
http://blog.godshell.com

Re: Problem with handle_user

Posted by "John D. Hardin" <jh...@impsec.org>.
On Tue, 8 Jan 2008, Stefan Suurmeijer wrote:

> I'm trying to use spamassassin with per-user rules on a machine
> running Linux with sendmail 8.14.2 and cyrus imapd 2.2.12. I'm
> running into a small problem: it seems that spamd doesn't know
> which user the mail is intended for and therefore always uses the
> default settings:
 
> I'm running spamassassin 3.2.4 on perl 5.8.8. I use spamd with
> options -d -c

We need one more piece of information before we can answer: how is
spamc being called? (In other words, what is passing the messages off
to spamassassin for scoring?) At delivery time via procmail or come
other MDA rules? Via a sendmail milter? Something else?

--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  A superior gunman is one who uses his superior judgment to keep
  himself out of situations that would require the use of his
  superior skills.
-----------------------------------------------------------------------
 10 days until Benjamin Franklin's 302nd Birthday