> Ralf Hildebrandt wrote: > > Something like pop-before-smtp.pl will do the trick: It will tail the > > maillog and then you can build an in memory database (a queue) that > > stores recipients, number of mails they recieved and timestamps. > > > Nice--I'll do this, at least until I get around to hooking into the delivery > process directly. However my logging is currently set in syslog to be only > 'notice' or above. If I change it back to * I get much more logging than I > want. Is it possible to just log the lines that say: > ---- > postfix/smtp[10332]: CDA86E382: to=<[EMAIL PROTECTED]>, > relay=domain.com[0.0.0.0], delay=5, > status=sent (250 TAA10932 Message accepted for delivery) > ---- > This would be just enough to know how many messages were being sent out. I > know how to add _more_ logging with -v, and change the _overall_ logging > amount with syslog.conf, but I haven't found any info on finer-grain log > control...
I don't know how pop-before-smtp.pl is implemented, but if you can get it to read from a named pipe you can set up a separate channel from syslog to the perl script. Create a named pipe in some appropriate location such as /var/local for the perl script to read from, mkfifo /var/local/lmtpmon Then add an entry to the syslog.conf file to send mail.info messages to the pipe separate from the entry currently sending mail.notice to maillog mail.=info |/var/local/lmtpmon Now your perl script will get the info messages it needs to work without cluttering your maillog file. Cheers Chris