Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a CentOS 5.5 64 bit mail server using Postfix as the MTA.

I want to create a database of content and the time of mails sent and received from this mail server. Can anyone tell me how to do this?

share|improve this question
    
Do you mean the mail logs or the content of the emails? –  Ladadadada Mar 14 '12 at 12:03
    
i meant the content of the emails plus the time of mail sent and received. –  achal tomar Mar 14 '12 at 17:50

1 Answer 1

up vote 5 down vote accepted

Your question lacks detail, and thus my answer will be vague, too. I hope these hints can nudge you to right direction.

One way would be to use syslog-ng as your syslog-daemon and configure it in a way it pipes the mail logs to your own script, which then parses the results and inserts them to database. I've written couple of scripts like this in Perl.

Another way would be to use one of the log summarizers available:

share|improve this answer
    
ok i will try this and update you. –  achal tomar Mar 14 '12 at 17:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.