Koozali.org: home of the SME Server

COPY EMAILS IN AND OUT

robert

COPY EMAILS IN AND OUT
« on: December 10, 2003, 07:19:58 AM »
How do I keep a copy of all incoming and outgoing mail messages?

I cant believe that this has not been answered, but it seems a bit of an old chestnut!
So i went digging and found the below,
which refers to the use of a file extra.h which is NOT in the SME qmail.
I dont know where qmail is compiled or how the below can be made to happen or if there is a better way, but include it hoping that someone will know and can hel me progress!
(I also note that amavis/clam scans all in/outbound mail, so the queue can be 'interferred with').
My skills arent up to solving this, but are for testing.

season's greetings, and GOOD-ON-THE-NEW-GROUP
Robert

Answer: Set QUEUE_EXTRA to "Tlog\0" and QUEUE_EXTRALEN to 5 in extra.h. 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.

[%sig%]

Warren Blackbeard

Re: COPY EMAILS IN AND OUT
« Reply #1 on: December 11, 2003, 10:05:56 AM »
Robert ,

Ive used this and it works great on 5.6 :
Author: Darrell May (dmay_AT_myezserver.com)
Date:   11-18-03 14:59

I'm not sure if this will work on SME5.5. I expect it will but offer no guarantees!!!

If you have a test server running 5.5 and wish to give this try, please report your results.

1) From your closest mirror, download this rpm. Example: http://www.ibiblio.org/pub/linux/distributions/e-smith/contrib/CharlieBrady/
RPMS/i386/mailfront-0.86-1es2.i386.rpm

2) Use the server-manager to add a user named 'maillog'

3) Add the rpm:
# rpm -Uvh mailfront-0.86-1es2.i386.rpm

4) Add the environment variable:
# echo maillog > /var/service/smtpfront-qmail/env/LOG_RECIPIENT

5) Send some e-mails and you should find messages delivered to intended recipients plus archival copies in the 'maillog' inbox.

[%sig%]

robert

Re: COPY EMAILS IN AND OUT
« Reply #2 on: December 30, 2003, 06:38:58 AM »
ya wee RIPPER!!!
many thanks - this puts in & out going into that mailbox!

(ive seen this request before on the list, unresolved, so presume
others must be interested in it)

and of course thanks to the May-man!

ps I guess that it is AFTER virus processing by ClamAv?

Chris

Re: COPY EMAILS IN AND OUT
« Reply #3 on: January 02, 2004, 12:49:23 AM »
robert wrote:

> ps I guess that it is AFTER virus processing by ClamAv?

Look in the message headers. There is a line in there which says virus scanned or something if it has gone through clamav

Mike

Re: COPY EMAILS IN AND OUT
« Reply #4 on: January 13, 2004, 05:45:58 AM »
Yes it is scanned by ClamAV and this also works on SME 6