Log Analyzer for sendmail into mySQL
Rick Stevens
rstevens at vitalstream.com
Mon Aug 14 17:53:45 UTC 2006
On Mon, 2006-08-14 at 16:29 +0700, Budi Febrianto wrote:
> Hello Redhat,
>
> Any recommendations for log analyzer that can parse sendmail
> maillog file into mysql database?
> So from mysql I can create any report that i want, usually
> rejected emails.
One of the more flexible log analyzers is sawmill
(http://www.sawmill.net/formats/UNIX_Sendmail.html). You might want to
check it out.
As far as stuffing the logs into mysql, write a perl or php script that
accepts lines from a named pipe (FIFO) and stuffs it into your database,
then modify /etc/syslog.conf to send the data to the FIFO instead of
/var/log/mail.log:
mail.* |/path/to/your/FIFO
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens at vitalstream.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- Cuteness can be overcome through sufficient bastardry -
- --Mark 'Kamikaze' Hughes -
----------------------------------------------------------------------
More information about the Redhat-install-list
mailing list