On Thu, Apr 07, 2005 at 02:37:49PM +0100, Adam D. Barratt wrote:
> On Thursday, April 07, 2005 1:52 PM, Lars Roland <[EMAIL PROTECTED]> wrote:
> 
> > When running spamassassin with the following options (in
> > /etc/default/spamasssassin)
> >
> > OPTIONS="-d -x -u qmailq --socketpath=/var/run/spamd -m10 -s null"
> >
> > then I cannot use the Debian init script to stop spamd as it reports
> > that spamd is not running although it is already up (it should be
> > noted that running spamd as the user qmailq has no effect on this bug,
> > you can run it as any user and the behaviour will be the same). The
> > following example shows the problem:
> [...]
> > I have noticed this bug in spamasssissin in Sarge and Sid. It is not
> > immediately clear to me how to solve this bug, but one idea would be
> > to use pidof in the init script to check if the program is really
> > running.
> 
> I suspect you're falling foul of the qmailq user being unable to read/write
> the PID file. Solving the bug simply involves either giving the user r/w
> access to the existing file, or moving it somewhere the user already has r/w
> access.
> 
> By the way, /etc/default/spamassassin includes the following, which should
> have been a rather large hint ;-)
> 
> --------------- quote from /e/d/spamassassin ------------------------
> # Pid file
> # Where should spamd write its PID to file? If you use the -u or
> # --username option above, this needs to be writable by that user.
> # Otherwise, the init script will not be able to shut spamd down.
> PIDFILE="/var/run/spamd.pid"
> 
> --------------- end quote from /e/d/spamassassin --------------------

It would be really nice to have the init script create the pidfile on
start (the init script is run as root after all) as the right user, so
that this pidfile always works. Or use the start-stop-daemon facility to
create a pidfile instead, and not spamd itself, so that it always works
in /var/run (which is the right location for it).

--Jeroen

-- 
Jeroen van Wolffelaar
[EMAIL PROTECTED]
http://jeroen.A-Eskwadraat.nl


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to