Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please help me to resolve this problem. I want to store Postfix sent details into My Sql DB. Already create the table and everything but somehow unable to create the relationship between postfix and My Sql. So each time a user sent a mail his data such as user Id , send mail, destination mail, IP etc. get stored into My Sql .

share|improve this question

closed as off-topic by masegaloeh, HopelessN00b Feb 25 '15 at 15:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

You can make it with content filter. Simply each mail will be delivered via stdin to the script, which will extract headers and save into db. Not sure if you would also check the From and To to make sure you process only outbound mail as you say.

You need to find out what suits you best. You will need to fiddle with and, create script like in Perl, PHP, Python and there you go, it's not that hard. The email header finishing after double enter like \r\n\r\n or \n\n

This really depends on your existing configuration as well, like spam and virus checking, if you got this, you could hook this up in the chain (after virus and spam check, for example).

share|improve this answer

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