On 4/28/2012 10:30 AM, [email protected] wrote: > > I've been writing scripts for my loganalysis chores. A typical log > entry for a mail transaction looks like, > ... > > Personally, I find that difficult to parse at a glance. Although it's > certainly a matter of personal taste, I prefer a bit more columnar > structre. Something like (using monospaced fonts), >
While it would be possible to patch postfix to write logs differently, the better choice is to investigate some of the existing log parsers, such as pflogsumm or postfix-logwatch, and possibly customize them. Note that once you modify postfix logging none of the off-the-shelf tools will work anymore, which is a good reason to modify existing tools rather than modifying the logging. http://www.postfix.org/addon.html#logfile It is also possible to log to an sql database for flexible custom reports. This is done in the syslog daemon (such as rsyslog) rather than in postfix. For watching the logs in realtime, look at multitail. It can filter and colorize the display to highlight the parts important to you. -- Noel Jones
