Hi, > > I'm interested in having postfix log directly to a mariadb or mongodb > > database so I can then query it for different info like sender, > > recipient and subject, etc. Does anyone know the best way to go about > > doing this? > > I don't know if this is the best way, but one option is to send all mail > logs from rsyslog to a custom script, have that script parse the log > line and save it to your database. > > postfix -> rsyslog -> script -> sql > > For Redhat flavor OS: > /etc/rsyslog.d/custom.conf: > mail.* ^/etc/rsyslog.d/your_script_that_saves_to_sql
Yes, thanks. I realize I can do that - it's the "your_script_that_saves_to_sql" part that would be very helpful :-) There's also great difficulty with correlating log lines from postscreen, smtpd. local, etc, and tracing all of the processes from the initial CONNECT through to the eventual delivery. Thanks, Alex
