Archiving Emails from a Qmail Based Email Server

Revision as of 09:08, 18 May 2010 by Admin (talk | contribs) (prepare mailarchive user)


Jump to: navigation, search

Qmail has the ability to set up a mailbox where all emails that Qmail handles get copied to. Here is an adapted version of the appropriate "Life with Qmail FAQ" article

Edit extra.h

QUEUE_EXTRA is a compile-time configuration variable that specifies an additional recipient that will be added to every delivery. This is used primarily for logging. E.g., the FAQ describes how to use QUEUE_EXTRA to keep copies of all incoming and outgoing messages.

To use QUEUE_EXTRA, edit extra.h specifying the additional recipient in the format "Trecipient\0", and the length of the QUEUE_EXTRA string in QUEUE_EXTRALEN (the "\0" counts as one character). For example:

 #define QUEUE_EXTRA "Tmailarchive\0"
 #define QUEUE_EXTRALEN 13

Recompile Qmail

Shut down qmail if it's running. If you installed the qmailctl script from the Installation section, that can be done by:

 qmailctl stop

If you don't have the qmailctl script, you should use your startup/shutdown script or send qmail-send a TERM signal.

Then rebuild qmail using:

 make setup check

Prepare mailarchive user

Populate ~alias/.qmail-mailarchive with:

 /var/mailarchive/Maildir/

Finally, restart qmail.

Navigation
Tools
Print/export
About MailStore

  • MailStore Server is one of the leading email archiving solutions for SMB.
  • For private use there is a free tool for email archiving furthermore: MailStore Home.