Difference between revisions of "Archiving Emails from an Exim Based Email Server"

[unchecked revision][unchecked revision]
m (Changed first heading.)
Line 1: Line 1:
== Archiving Incoming and Outgoing Emails Directly ==
+
= Archiving Incoming and Outgoing Emails Directly =
  
 
When integrating MailStore into an Exim based email infrastructure, it is recommended to have Exim put all emails into an archiving mailbox in addition to the default user's mailbox. For this, it is necessary to add a new Exim router and transport:
 
When integrating MailStore into an Exim based email infrastructure, it is recommended to have Exim put all emails into an archiving mailbox in addition to the default user's mailbox. For this, it is necessary to add a new Exim router and transport:
  
=== Step 1: Adding an Exim Router ===
+
== Step 1: Adding an Exim Router ==
  
 
The configuration of the new Exim router should look like this:
 
The configuration of the new Exim router should look like this:
Line 16: Line 16:
 
It is mandatory to put that router in a place before any mailbox delivery is done. Making it the the first router in you Exim's router section is the most secure way if you do not want to miss a mail in your archive. Depending on your anti-spam or anti-virus protection it may also be suitable to put it right after the routers handling those actions.
 
It is mandatory to put that router in a place before any mailbox delivery is done. Making it the the first router in you Exim's router section is the most secure way if you do not want to miss a mail in your archive. Depending on your anti-spam or anti-virus protection it may also be suitable to put it right after the routers handling those actions.
  
=== Step 2: Adding an Exim Transport ===
+
== Step 2: Adding an Exim Transport ==
 
The above router calls a transport called <tt>mailstore_transport</tt>, which also has to be set up. A new transport can be put anywhere in Exim's transports section.
 
The above router calls a transport called <tt>mailstore_transport</tt>, which also has to be set up. A new transport can be put anywhere in Exim's transports section.
  
Line 33: Line 33:
 
<tt>/var/mailstore/Maildir</tt>. In most cases, like in Dovecot IMAP, it is enough to have a system user who's <tt>$HOME</tt> points to <tt>/var/mailstore</tt>.
 
<tt>/var/mailstore/Maildir</tt>. In most cases, like in Dovecot IMAP, it is enough to have a system user who's <tt>$HOME</tt> points to <tt>/var/mailstore</tt>.
  
== Weblinks ==
+
= Weblinks =
  
 
* [http://www.exim.org/ Exim Homepage]
 
* [http://www.exim.org/ Exim Homepage]

Revision as of 07:40, 16 June 2010

Archiving Incoming and Outgoing Emails Directly

When integrating MailStore into an Exim based email infrastructure, it is recommended to have Exim put all emails into an archiving mailbox in addition to the default user's mailbox. For this, it is necessary to add a new Exim router and transport:

Step 1: Adding an Exim Router

The configuration of the new Exim router should look like this:

mailstore_router:
  no_expn
  no_verify
  transport = mailstore_transport
  driver = accept
  unseen

It is mandatory to put that router in a place before any mailbox delivery is done. Making it the the first router in you Exim's router section is the most secure way if you do not want to miss a mail in your archive. Depending on your anti-spam or anti-virus protection it may also be suitable to put it right after the routers handling those actions.

Step 2: Adding an Exim Transport

The above router calls a transport called mailstore_transport, which also has to be set up. A new transport can be put anywhere in Exim's transports section.

The following code show a transport configuration, which makes Exim store all emails in Maildir format at /var/mailstore/Maildir. If you want to store the emails elsewhere change the configuration according Exim's manual.

mailstore_transport:
  driver = appendfile
  delivery_date_add
  envelope_to_add
  return_path_add
  maildir_format = true
  create_directory = true
  directory = /var/mailstore/Maildir

Last but not least you need a system user who's IMAP home directory points to /var/mailstore/Maildir. In most cases, like in Dovecot IMAP, it is enough to have a system user who's $HOME points to /var/mailstore.

Weblinks