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

[unchecked revision][unchecked revision]
Line 13: Line 13:
 
= 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 archiving emails during sending and receiving, it is recommended to have Postfix, in addition to delivering the messages to their respective user mailboxes, send a copy of all emails to an archiving mailbox. This requires a new router as well as a new transport to be added in the Exim configuration.
  
 
== Step 1: Adding an Exim Router ==
 
== Step 1: Adding an Exim Router ==
Line 26: Line 26:
 
   unseen
 
   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.
+
Please make sure that the ''mailstore_router'' is passed through before the router responsible for delivering the messages to the actual user mailboxes.  
 +
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 ==

Revision as of 19:18, 18 June 2010

Please note: this tutorial only covers the specifics of archiving an email server based on the mail transfer agent Exim. It is assumed that you already have a MailStore Server installation or Test-Installation and are familiar with the fundamentals of MailStore Server. Please refer to the Manual or Quick-Start-Guide.

MailStore Server offers several ways to archive emails from Intranator, which are described below. If you are not sure which archiving method best suits your company, please refer to chapter Choosing the right archiving strategy.

Archiving Individual Mailboxes

Mail transfer agents such as Exim are only responsible for transporting emails and, when acting as mail delivery agent, for the delivery to local mailboxes. For accessing the emails in the mailboxes with MailStore, an IMAP- or POP3 service (called mail retrieval agent) must be installed and started on the email server. If access to the email server via the IMAP and/or POP3 protocol is possible, please refer to the corresponding chapter Archiving Server Mailboxes in the MailStore Server manual to set up the archiving process.

Archiving Multiple Mailboxes in One Step

Mail transfer agents such as Exim are only responsible for transporting emails and, when acting as mail delivery agent, for the delivery to local mailboxes. For accessing the emails in the mailboxes with MailStore, an IMAP- or POP3 service (called mail retrieval agent) has to be installed and started on the email server. If access to the email server via the IMAP protocol is possible, please refer to the corresponding chapter Batch Archiving of IMAP Mailboxes in the MailStore Server manual to set up the archiving process.

Archiving Incoming and Outgoing Emails Directly

When archiving emails during sending and receiving, it is recommended to have Postfix, in addition to delivering the messages to their respective user mailboxes, send a copy of all emails to an archiving mailbox. This requires a new router as well as a new transport to be added in the Exim configuration.

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

Please make sure that the mailstore_router is passed through before the router responsible for delivering the messages to the actual user mailboxes. 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