Hi All, 

This list has been super helpful in the past, so I am hoping that
you'll have an idea for me.  

Synopsis: does anybody know a way I can insert logging data into a
        mysql table when aliases are looked up in a virtual_alias_maps
        mysql lookup table?   

I recently set up a mysql lookup table for virtual_alias_maps to use in
addition to some file lookup tables I've been using.  It works great
with a little web interface for creating new aliases.  

But now I want to be able to log access to the lookup table.  Ideally
I'd like to know what server's connecting, what address it's trying to
deliver to, and what I said in return.   

Postfix is currently logging all this stuff through syslog, but i would
really like to integrate the logs into the website.  To do that, I
could parse the logs, but that seems rather tedious.  So I am trying to
figure out a way to add an update into the sql query itself.  

At first I thought mysql triggers would be perfect, failing utterly to
realize that mysql triggers can only be associated with statements that
change the table.  Darn, I thought that was very clever.

Now I'm thinking that maybe I can build something into the mysql SELECT
statement that could take care of this.  But how?  I haven't been able
to think of a way. 

This email constitutes a final effort to figure out how I could do such
a thing.  I hope that someone cleverer than I has thought of a really
slick solution to this.  A sub-query insert inside the select would be
just perfect if such a thing could be done, but my knowledge of mysql
doesn't cover any such option.  

So, anybody have any ideas, before I start filtering syslog logs?

Thanks in advance, 

-- Dan Farrell

Reply via email to