Difference between revisions of "Archiving Emails from a Qmail Based Email Server"

[unchecked revision][unchecked revision]
Line 1: Line 1:
 
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
 
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 ===
+
== Edit extra.h ==
  
 
<tt>QUEUE_EXTRA</tt> 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 <tt>QUEUE_EXTRA</tt> to keep copies of all incoming and outgoing messages.
 
<tt>QUEUE_EXTRA</tt> 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 <tt>QUEUE_EXTRA</tt> to keep copies of all incoming and outgoing messages.
Line 10: Line 10:
 
   #define QUEUE_EXTRALEN 11
 
   #define QUEUE_EXTRALEN 11
  
=== Recompile Qmail ===
+
== Recompile Qmail ==
  
 
Shut down qmail if it's running. If you installed the qmailctl script from the Installation section, that can be done by:
 
Shut down qmail if it's running. If you installed the qmailctl script from the Installation section, that can be done by:
Line 22: Line 22:
 
   make setup check
 
   make setup check
  
=== Prepare mailstore user ===
+
== Prepare mailstore user ==
  
 
Populate <tt>~alias/.qmail-mailstore</tt> with:
 
Populate <tt>~alias/.qmail-mailstore</tt> with:
Line 29: Line 29:
  
 
Finally, restart qmail.
 
Finally, restart qmail.
 +
 +
== Weblinks ==
 +
 +
* [http://www.qmail.org Qmail Homepage]
 +
* [http://www.lifewithqmail.org/ Life with Qmail]
 +
* [[Wikipedia:en:Qmail]]
 +
 +
[[de:Qmail]]

Revision as of 12:58, 18 May 2010

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 "Tmailstore\0"
 #define QUEUE_EXTRALEN 11

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 mailstore user

Populate ~alias/.qmail-mailstore with:

 /var/mailstore/Maildir/

Finally, restart qmail.

Weblinks