On Tue, Jan 27, 2015 at 05:26:35PM +0100, Peter Hodur wrote:
> On Tuesday, January 27, 2015, Wietse Venema <wie...@porcupine.org> wrote:
> >
> >
> > This is typically done with "enable_long_queue_ids = yes", a program
> > that watches the maillog file, and a collection of regular expressions
> > that extract information.
> >
> >
> Thank you for tour reply. I know this option and i use it. But i do not
> want to parse log file. This will introduce some delay in processing and
> decision based on logged data. (For example, i want to monitor 5xx response
> ratio on individual sasl user names and block users in realtime - many 5xx
> errors is obviously indicator, that user send spam messages, so i can route
> it to another smtp client process with dedicate ip and/or block it)
> 
> Instead i want to hook some function in postfix (may be function which
> flushes records to log file?) and add couple of lines of code that connect
> to redis database and puts there some statistics.
> 
> So i ask here, if someone with knowledge of postfix internals can tell me,
> what is the right place to add this code. What "function" to hook... I have
> read som source code of postfix and im not sure im able to identify right
> place to add my logging code)
> 
> 
> Thanks
> 
> Tom

Hi Tom,

It sounds like you need to integrate with your log system and not postfix.
Have it send the needed logs to the service/file/port of your choice. This
is not really postfix specific.

Regards,
Ken

Reply via email to