On Fri, Oct 24, 2008 at 01:55:05PM -0400, Ofer Inbar wrote: > Victor Duchovni <[EMAIL PROTECTED]> wrote: > > Incoming mail is logged by smtpd(8)/pickup(8) and cleanup(8). Mail > > (re)entering the active queue is logged by the queue manager, which > > logs the sender address. Deliveries to recipients are logged by delivery > > ... one thing I've sometimes wished for is the ability to distinguish > between "entering" and "reentering", or more specifically, that qmgr > would log which queue the message came *from* when it puts it in the > active queue. That could be very useful for analysis and monitoring > on stressed/troubled systems. One workaround is to have scripts that > cache queue IDs they see from "postfix/cleanup" and assume the first > time time qmgr queues that message it must've come from incoming, and > any subsequent times for the same ID are from deferred. But that can > run into problems on the very systems where this kind of analysis or > monitoring is most useful: at times when the incoming queue gets big. > > For example: > > - It takes so long for the message to be queued to active, that the > log message from cleanup isn't in the same logfile or snippet that > the qmgr log message is.
This is not difficult to solve. Write a progressive parser that saves state just for messages that are not yet done (still in the queue). For each log file save just the log entries that pertain to messages still in the queue when the log file ends. When parsing the next log file, start by reading the saved state for the previous. -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:[EMAIL PROTECTED]> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.