You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Dhanny Kosasih <dh...@gmail.com> on 2005/08/15 13:45:52 UTC

How to use Multilog ?

I use SpamAssassin 3.0.4 with FC3, and i use script from Fedora to start 
and stop spamd. But qmailmrtg7 can't read log with standard 
SpamAssassin. The qmailmrtg can only read log with multilog format. I 
try --syslog=stderr but i don't know where is the log file ? How 
SpamAssassin use multilog format ?

Regards,
Dhanny Kosasih.

		
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

Re: How to use Multilog ?

Posted by George Georgalis <ge...@galis.org>.
On Mon, Aug 15, 2005 at 06:45:52PM +0700, Dhanny Kosasih wrote:
>I use SpamAssassin 3.0.4 with FC3, and i use script from Fedora to start 
>and stop spamd. But qmailmrtg7 can't read log with standard 
>SpamAssassin. The qmailmrtg can only read log with multilog format. I 
>try --syslog=stderr but i don't know where is the log file ? How 
>SpamAssassin use multilog format ?

$ head -n3 /service/spamd/run /service/spamd/log/run 
==> /service/spamd/run <==
#!/bin/sh
MAX=3
exec spamd -i -A 127.0.0.0/8,10.0.0.0/8,192.168.0.0/16 -m ${MAX} --username=qmaild --syslog=stderr 2>&1

==> /service/spamd/log/run <==
#!/bin/sh
exec setuidgid log multilog t /var/log/spamd


-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george@galis.org

Re: How to use Multilog ?

Posted by "Chr. v. Stuckrad" <st...@mi.fu-berlin.de>.
On Mon, Aug 15, 2005 at 09:09:20AM -0400, Matt Kettler wrote:
> Perhaps you want something like:
> 
> spamd -s stdout | multilog {insert multilog options here}

This should be exactly what you want.
BUT in the manual I only see 'stderr' allowed
for '... -s stderr'.  If 'stdout' does not work
you might need to run

     /bin/sh -c 'exec spamassassin -s stderr ... ... ... 2>&1'
instead of
                     'spamassassin -s stdout ... ... ...'
This way you'll get stderr redirected to stdout by the shell,
and multilog gets the output.

Multilog (normally started by Bernsteins Daemontools
via supervisor) analyses standard input!

See: http://cr.yp.to/daemontools/multilog.html

Stucki

-- 
Christoph von Stuckrad      * * |nickname |<st...@mi.fu-berlin.de>  \
Freie Universitaet Berlin   |/_*|'stucki' |Tel(days):+49 30 838-75 459|
Mathematik & Informatik EDV |\ *|if online|Tel(else):+49 30 77 39 6600|
Arnimallee 2-6/14195 Berlin * * |on IRCnet|Fax(alle):+49 30 838-75454/

Re: How to use Multilog ?

Posted by Matt Kettler <mk...@comcast.net>.
At 07:45 AM 8/15/2005, Dhanny Kosasih wrote:
>I use SpamAssassin 3.0.4 with FC3, and i use script from Fedora to start 
>and stop spamd. But qmailmrtg7 can't read log with standard SpamAssassin. 
>The qmailmrtg can only read log with multilog format.



>I try --syslog=stderr but i don't know where is the log file ?

Well, if spamd is daemonized, stderr goes to /dev/null unless you redirect 
it somewhere.

Perhaps you want something like:

spamd -s stdout | multilog {insert multilog options here}

Or if you want it to just directly log to to a file:

spamd -s /var/log/spamassassin.log

And you can crunch that through multilog later..




>How SpamAssassin use multilog format ?