logo       

Re: running two versions of spamd?: msg#01309

users-spamassassin

Subject: Re: running two versions of spamd?

On Fri, 2009-07-31 at 11:59 -0700, an anonymous Nabble user wrote:
> I have set up spamassassin to run as a damon and run as the user spamd
> instead of root.
> When I run ps xafu | grep spamd I get this output:

> root 2389 0.0 2.5 29288 26852 ? Ss 17:15 0:02
> /usr/sbin/spamd --create-prefs --max-children 5 --username spamd
> --helper-home-dir /var/lib/spamassassin/ -s /var/lib/spamassassin/spamd.log
> -d --pidfile=/var/lib/spamassassin/spamd.pid

> spamd 2581 0.0 2.8 32304 29732 ? S 17:16 0:07 \_ spamd
> child
> spamd 2582 0.0 2.6 30432 27920 ? S 17:16 0:00 \_ spamd
> child
>
> Is this normal or is spamd running both as root and spamd?

You are starting the daemon as root. And tell it to setuid to the user
"spamd". I believe this is perfectly normal. Btw, see 'man spamd' for
the -u option.

Only the child processes, which correctly setuid'd, will process
messages.


> Another question: When I run sa-update should I run it as root or spamd?

The master process (which does not scan messages, but care about its
busy children) will read that data. So you want to ensure it's readable
by that user.

FWIW, if you would not explicitly specify the -u option, the child
spamds would setuid to the user calling spamc.


--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise