-   Programming (
-   -   Logging mails sent through Qmail (

ramnath 11-17-2003 07:19 AM

Logging mails sent through Qmail
Hi Guys,

Excuse the brief description.

I have a Linux box running with an Imap Server running Qmail. I need to keep a log of all incoming and outgoing mails from this IMAP Server. The log needs to contain the sender name, reciever name, subject, message body and also the attachments. Actually this entire log needs to be put into a mysql database with the attachments being stored in a seperate folder earmarked for the purpose ( the path & filename to be stored in the mysql db). I know that qmail logs enable to track the headers of the mail. But can someone tell me whether it is possible to log the entire mail content and also the attachments. I am a not an expert in Linux so pls be descriptive about ur answers.


technik 07-23-2004 07:04 AM

8.2. How do I keep a copy of all incoming and outgoing mail messages?

Answer: Set QUEUE_EXTRA to "Tlog\0" and QUEUE_EXTRALEN to 5 in extra.
Recompile qmail. Put ./msg-log into ~alias/.qmail-log.

You can also use QUEUE_EXTRA to, e.g., record the Message-ID of every
message: run

| awk '/^$/ { exit } /^[mM][eE][sS][sS][aA][gG][eE]-/ { print }'

from ~alias/.qmail-log.

All times are GMT -5. The time now is 07:20 PM.