OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Adding custom info to postfix logs

From: Magnus Bäck (magnusdsek.lth.se)
Date: Tue Jul 26 2005 - 16:29:46 CDT


On Tuesday, July 26, 2005 at 23:21 CEST,
     Marcos Mendonça <marcosmgmail.com> wrote:

> I need some equivalent to sendmail -L (label).
>
> The reason i need is that i´m developing an application to send email.
> After executing sendmail comand i´d like to parse the log file in
> order to update a database with the status of the messages sent.
> Therefore i´d like to add, say the dispatch id, to the mail log so i
> could later (when parsing the log) identify what messages were sent by
> my application and their status.
>
> As for the manuel the -L (label) option command line would do the job,
> but it is ignores by sendmail.
>
> Anyother way i could add the info i want to the sendmail log?

I don't know exactly what the label option to the sendmail MTA does, but
Postfix logs the Message-Id header for all messages. If you generate
your own Message-Id line instead of having Postfix generate one for you,
you can track each message by parsing the log.

--
Magnus Bäck
magnusdsek.lth.se