Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73492 - qmail conf-smtpd (and others) can't have multilog filters
Summary: qmail conf-smtpd (and others) can't have multilog filters
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 29485
  Show dependency tree
 
Reported: 2004-12-05 16:54 UTC by Elan Ruusamäe
Modified: 2005-06-12 10:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elan Ruusamäe 2004-12-05 16:54:11 UTC
i wanted to accomplish sth described here:
http://thedjbway.org/djbrbl/multilogging.html

i solved it this way:
exec /usr/sbin/setuidgid qmaill /usr/sbin/multilog \
        ${LOG_OPTS} '-* rblsmtpd: *' ${LOG_DEST} \
        '-*' '+* rblsmtpd: *' /var/log/qmail/rblsmtpd

but the comments said i should post a bug :)


Reproducible: Always
Steps to Reproduce:


Actual Results:  
 

Expected Results:  
get the 'filters' to conf-smtpd file
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-12-05 18:02:38 UTC
LOG_DEST isn't a filename, it's a full filter-destination specifier.
so simply set LOG_DEST to your filter string to use it...

in your case, append this single line to conf-smtpd:
LOG_DEST="'-* rblsmtpd: *' ${LOG_DEST} '-*' '+* rblsmtpd: *' /var/log/qmail/rblsmtpd"

Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-12-05 18:02:56 UTC
re-opening to put this in a better place.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-12-05 18:03:16 UTC
closing properly
Comment 4 Elan Ruusamäe 2004-12-06 02:47:50 UTC
sorry but, it isn't exactly the same

each of the parameters *have* to be separate commandline argument

my log line:

# pcat /proc/14996/cmdline
/usr/sbin/multilog
t
s10000000
n365
-* rblsmtpd: *
/var/log/qmail/smtpd
-*
+* rblsmtpd: *
/var/log/qmail/rblsmtpd

Your suggested version:
# pcat /proc/15465/cmdline
/usr/sbin/multilog
t
s10000000
n365
'-*
rblsmtpd:
*'
/var/log/qmail/smtpd
'-*'
'+*
rblsmtpd:
*'
/var/log/qmail/rblsmtpd

i tried various ways, but i wasn't able to create parameter which could consist of space, and as u can see, without the single quotes.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-12-07 17:08:46 UTC
To check something, open up /var/qmail/supervise/qmail-smtpd/log/run

and change:
'exec /usr/bin/setuidgid'
to
'eval exec /usr/bin/setuidgid'

and see if that works with my route of putting the filters in LOG_DEST.

I believe it should work.
Comment 6 Elan Ruusamäe 2004-12-08 07:40:49 UTC
yes. thx it does (work)
Comment 7 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-01-04 13:35:34 UTC
Fixed in CVS for all run-scripts.
Comment 8 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2005-06-12 10:39:24 UTC
Closing.