You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Matthew Yette <my...@mapolce.com> on 2005/09/22 14:44:02 UTC

Running spamd under daemontools

I've looked on Google for a while now - I haven't been able to find
directions or references to having spamd monitored under daemontools.
Specifically where I would find how to create the supervise directory for
spamd.

Has anyone successfully done this?

Matt


-- 
Matthew Yette
Senior Engineer (NOC/Operations)
M.A. Polce Consulting
315-838-1644


Re: Running spamd under daemontools

Posted by Dhawal Doshy <dh...@netmagicsolutions.com>.
Matthew Yette wrote:
> I've looked on Google for a while now - I haven't been able to find
> directions or references to having spamd monitored under daemontools.
> Specifically where I would find how to create the supervise directory for
> spamd.
> 
> Has anyone successfully done this?
> 
> Matt

See if this helps..

http://www.shupp.org/toaster/#spamassassin, some modifications and 
downloading the toaster-scripts will be required.

BTW did you really search? google for "spamd daemontools" on the very 
first page lists this link.

- dhawal

Re: Running spamd under daemontools

Posted by Markus Eskola <li...@eskola.nu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Matthew Yette wrote:

>
>
> On 9/22/05 9:39 AM, "Marko Lerota" <ma...@optima-telekom.hr>
> wrote:
>
>> Markus Eskola <li...@eskola.nu> writes:
>>
>>> Skip the -d for daemonize makes damontools think that the spamd
>>> process has died and tries to restart it. All you'll get is a
>>> log full of binding errors....
>>>
>>> /Markus
>>
>> So thats why....@!#!@#!, You make my day brighter, THANKS!!! And
>> if someone could know why -u vpopmail doesn't work any more in
>> 3.1.0....
>>
> Based on my settings (3.0.4), this is my line in the spamd.run
> file:
>
> exec /usr/bin/spamd -d -c -q -m5 -H -u qscand 2>&1
>
> I'm also not getting any errors with that -d left in...

That's intresting, mine did, though I am running qmail and
spamassassin on Solaris... might dunno how it behaves on Linux.
All I got was error that spamd couldn't bind to the correct port since
it was allready bound to another process (another spamd).
But after removing -d in my run script I can now start, stop & restart
spamd without these errors.

/markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD4DBQFDMsdUY+EUV64Bqn0RAjD1AJdlpMIImVjJCFYHyNlA67MtLgEQAKC5wr2D
1cyzwgptv72+mLaoEamo5w==
=B1O3
-----END PGP SIGNATURE-----


Re: Running spamd under daemontools

Posted by Dhawal Doshy <dh...@netmagicsolutions.com>.
Markus Eskola wrote:
>>
>>Where your log go?, maybe you don't have logging enabled. Try '-s
>>/var/log/spamd.log'
>>
> 
> Logging should be handled by deamontools aswell better check the
> log/run script under the supervise directory.
> 
> /markus

From:
http://spamassassin.apache.org/full/3.1.x/dist/doc/spamd.html

-s facility, --syslog=facility
     Specify the syslog facility to use (default: mail). If stderr is 
specified, output will be written to stderr. (This is useful if you're 
running spamd under the *daemontools* package.) With a facility of file, 
all output goes to spamd.log. facility is interpreted as a file name to 
log to if it contains any characters except a-z and 0-9. null disables 
logging completely (used internally).

More details and examples in the spamd.html page..

- dhawal

Re: Running spamd under daemontools

Posted by Markus Eskola <li...@eskola.nu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Marko Lerota wrote:

> Matthew Yette <my...@mapolce.com> writes:
>
>> Based on my settings (3.0.4), this is my line in the spamd.run
>> file:
>>
>> exec /usr/bin/spamd -d -c -q -m5 -H -u qscand 2>&1
>>
>> I'm also not getting any errors with that -d left in...
>
>
> Where your log go?, maybe you don't have logging enabled. Try '-s
> /var/log/spamd.log'
>
Logging should be handled by deamontools aswell better check the
log/run script under the supervise directory.

/markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFDMtZfY+EUV64Bqn0RAjeKAJ4tMF2mjOZefYwSpiaZjLiF0zQbdwCfbeug
nLWi3Zst6L8mgZoht4jOZB4=
=mg9J
-----END PGP SIGNATURE-----


Re: Running spamd under daemontools

Posted by Marko Lerota <ma...@optima-telekom.hr>.
Matthew Yette <my...@mapolce.com> writes:

> Based on my settings (3.0.4), this is my line in the spamd.run file:
>
> exec /usr/bin/spamd -d -c -q -m5 -H -u qscand 2>&1
>
> I'm also not getting any errors with that -d left in...

Where your log go?, maybe you don't have logging enabled.
Try '-s /var/log/spamd.log' 


Re: Running spamd under daemontools

Posted by Matthew Yette <my...@mapolce.com>.


On 9/22/05 9:39 AM, "Marko Lerota" <ma...@optima-telekom.hr> wrote:

> Markus Eskola <li...@eskola.nu> writes:
> 
>> 
>> Skip the -d for daemonize makes damontools think that the spamd
>> process has died and tries to restart it. All you'll get is a log full
>> of binding errors....
>> 
>> /Markus
> 
> So thats why....@!#!@#!, You make my day brighter,  THANKS!!!
> And if someone could know why -u vpopmail doesn't work any more
> in 3.1.0....
> 
Based on my settings (3.0.4), this is my line in the spamd.run file:

exec /usr/bin/spamd -d -c -q -m5 -H -u qscand 2>&1

I'm also not getting any errors with that -d left in...
-- 
Matthew Yette
Senior Engineer (NOC/Operations)
M.A. Polce Consulting
315-838-1644


Re: Running spamd under daemontools

Posted by Marko Lerota <ma...@optima-telekom.hr>.
Markus Eskola <li...@eskola.nu> writes:

>
> Skip the -d for daemonize makes damontools think that the spamd
> process has died and tries to restart it. All you'll get is a log full
> of binding errors....
>
> /Markus

So thats why....@!#!@#!, You make my day brighter,  THANKS!!!
And if someone could know why -u vpopmail doesn't work any more
in 3.1.0....


Re: Running spamd under daemontools

Posted by Markus Eskola <li...@eskola.nu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Marko Lerota wrote:

> Matthew Yette <my...@mapolce.com> writes:
>
>> I've looked on Google for a while now - I haven't been able to
>> find directions or references to having spamd monitored under
>> daemontools. Specifically where I would find how to create the
>> supervise directory for spamd.
>>
>> Has anyone successfully done this?
>>
>> Matt
>
>
> mkdir /var/spamd-service cd /var/spamd-service
>
> edit /service/spamd-service/run
>
> --- run --- #!/bin/sh exec 2>&1 /usr/local/bin/spamd -c -d -v -u
> vpopmail \ -r /var/run/spamd/spamd --- run ---
>
> chmod +x run mkdir log cd log
>
> edit run
>
> --- run --- #!/bin/sh exec setuidgid qmaill \ multilog \ t \
> \${MAXFILESIZE+"s\$MAXFILESIZE"} \ \${MAXLOGFILES+"n\$MAXLOGFILES"}
> \ \${PROCESSOR+"!\$PROCESSOR"} \ ./main --- run ----
>
> mkdir main chown qmaill:qmail main chmod +s main chmod +x run
>
> ln -s /var/spamd-service /service
>
> And that's it, of course /service is the directory created by
> daemontools
>
>

Skip the -d for daemonize makes damontools think that the spamd
process has died and tries to restart it. All you'll get is a log full
of binding errors....

/Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFDMrB2Y+EUV64Bqn0RAticAJ946ETXdhhZIZvi8t1LURoVVG3S2QCfYB66
a9O4DAttQ5SZANM9JUn+o6I=
=m4qM
-----END PGP SIGNATURE-----


Re: Running spamd under daemontools

Posted by Chris Stone <cs...@axint.net>.
On Thursday 22 September 2005 06:57 am, Marko Lerota wrote:
> Matthew Yette <my...@mapolce.com> writes:
> > I've looked on Google for a while now - I haven't been able to find
> > directions or references to having spamd monitored under daemontools.
> > Specifically where I would find how to create the supervise directory for
> > spamd.
> >
> > Has anyone successfully done this?

Here's a page with run scripts for many daemons, including spamd and their log 
services. Create the service directory somewhere with the run file in it and 
then create a link to it in the /services directory.


Chris

Re: Running spamd under daemontools

Posted by Marko Lerota <ma...@optima-telekom.hr>.
Matthew Yette <my...@mapolce.com> writes:

> I've looked on Google for a while now - I haven't been able to find
> directions or references to having spamd monitored under daemontools.
> Specifically where I would find how to create the supervise directory for
> spamd.
>
> Has anyone successfully done this?
>
> Matt

mkdir /var/spamd-service
cd /var/spamd-service

edit /service/spamd-service/run

--- run ---
#!/bin/sh
exec 2>&1
/usr/local/bin/spamd -c -d -v -u vpopmail \
    -r /var/run/spamd/spamd 
--- run ---

chmod +x run
mkdir log
cd log

edit run

--- run ---
#!/bin/sh
exec setuidgid qmaill \
multilog \
        t \
        \${MAXFILESIZE+"s\$MAXFILESIZE"} \
        \${MAXLOGFILES+"n\$MAXLOGFILES"} \
        \${PROCESSOR+"!\$PROCESSOR"} \
        ./main
--- run ----

mkdir main
chown qmaill:qmail main
chmod +s main
chmod +x run

ln -s /var/spamd-service /service

And that's it, of course /service is the directory created by daemontools