Operating System - HP-UX
1835435 Members
3059 Online
110078 Solutions
New Discussion

Sendmail logs to database

 
hpuxsa
Frequent Advisor

Sendmail logs to database

Hi,

Is it possible to log details which are being logged to /var/adm/syslog/mail.log to an oracle database ?

I am actually looking at logging all mails being sent from a particular user to an oracle database.

Regards,
Franklin.
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: Sendmail logs to database

Not directly to a database. Syslog is designed to write to files.

You will have to use a script to copy the log files into the database.

Depending on the database its not a very hard script to write, then you have to run it regularly with cron.

Another way to do it is like this:

tail -f /var/adm/syslog/mail.log > script

script processes the output as it happens into your database.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sanjay_6
Honored Contributor

Re: Sendmail logs to database

Hi Franklin,

/var/adm/syslog/mail.log is a flat file. Just filter out the selective data to another file and then read the flat file into the database.

The entry in the mail.log file is not a standard entry. if the mail is deferred, that also is logged to the file.

Hope this helps.

Regds