Re: how to count number of forwards
- Zafer Aydogan:
> 2006/11/25, Wietse Venema <wietse@...>:The information is available in the logging. It is not available
> > Magnus B?ck:
> > > On Friday, November 24, 2006 at 18:16 CET,
> > > Zafer Aydogan <zafer@...> wrote:
> > >
> > > > I'm using postfix 2.2.9 with a mysql-alias database.
> > > > Everything works fine.
> > > >
> > > > Now I need, to increase an auto_increment field in the mysql database,
> > > > everytime an email to an alias is delivered. I need this, to count the
> > > > number of delivered emails.
> > > > I also need the the Message ID, for the delivered E-Mails. (Like:
> > > > Message-Id: <20061121104244.14CA222859F@...>)
> > > > All aliases are external adresses going to user@..., if that
> > > > matters.
> > > >
> > > > How can I achieve all this ?
> > >
> > > Analyze the mail logs. They contain all the information you need.
> > Currently Postfix can log to stderr and to syslog(). It is already
> > possible to add logging "adapters" for other data sinks, but they
> > would just receive the same free-text strings that you already see
> > in the logs. For logging to sql to be useful, the "split" between
> > stderr/syslog/sql would have to happen before the information is
> > flattened into a free-text string.
> > Wietse
> I think the log is written after the email has been send.
> But I need the Message-Id in the outgoing mail.
> Is there no way to do this ?
> With some sort of hooks, maybe ?
in one place in Postfix itself.