Purpose :
To capture mails coming into and out of your SME server via POP3 and SMTP for archiving or auditing.
1. Download the mailarch.zip file. Then find and download Pegasus Mail 4.02. You will also need to find and download dsniff-2.3-2.i386.rpm. You will need to extract the mailsnarf program from this rpm, the rest isn’t needed for the purpose of this how-to.
2. Unzip the file and copy the files into the following locations (if any folders don’t currently exist, create them):
Copy mailarchive and mbextract to /opt/mailarch
Copy mailarch to /etc/rc.d/init.d
Extract the mailsnarf program from the dsniff package, then
Copy mailsnarf to /sbin
3. Create symbolic links to automatically start mailarchive upon a reboot and to perform daily mail processing.
ln -s /etc/rc.d/init.d/mailarch /etc/rc.d/rc7.d/S99mailarch
ln -s /opt/mailarch/mailarchive /etc/cron.daily/mailarchive
4. Create an ibay called marchive. You will need to give access to this ibay to the user account which will access the mail archives via Pegasus Mail from a Windows PC.
5. Map a drive on your Windows desktop to the marchive ibay (eg. Map M: to \\sme\marchive).
6. Install Pegasus Mail into your Windows PC. When starting Pegasus Mail for the first time and set the mail directory when prompted to M:\
7. Start mailarchive by typing the following at the server console :-
/etc/rc.d/init.d/mailarch start
That’s it ! Your mails (not webmail unless it generates SMTP traffic through the monitored interface !) will be captured and then processed and dropped into the marchive ibay. The mbextract script was modified to specifically create filenames compatible with Pegasus Mail. You can review / audit the mails using Pegasus without needing to “collect” the mail from the server. The reason for all this is because if you merely dropped the processed mail into an existing SME user mailbox, the process of collecting the mail will result in all the mails being captured again ! By using Pegasus (or any other mail program which works in a similar fashion), you do not need to actually deliver the mails to view / review them. Note if you were monitoring the external interface, this would not normally be a problem, but you won’t capture any local / internal mails.