Re: [exim] Using Routing, Maildir and MBOX for email backups

Top Page
Delete this message
Reply to this message
Author: W B Hacker
Date:  
To: exim users
Subject: Re: [exim] Using Routing, Maildir and MBOX for email backups
David Chait wrote:
>
> -----Original Message-----
> From: exim-users-bounces@??? [mailto:exim-users-bounces@exim.org]
> On Behalf Of Mike Cardwell



??


> Sent: Wednesday, June 10, 2009 7:23 AM
> To: Exim Users List
> Subject: Re: [exim] Using Routing, Maildir and MBOX for email backups
>
> Eric Kiara wrote:
>
>> I have an Exim setup on one of my Gentoo boxes that I'd like to
>> configure for daily use and archiving/backup of all inbound messages:
>>
>> The current setup is a vanilla Exim installation appending MBOX files
>> in "/var/spool/mail" for local deliveries. I'd like to add archiving
>> and webmail.
>>
>> My initial idea is to have a "/var/spool/mail" and a
>> "/var/spool/mail/webmail" directories. With /var/spool/mail/webmail
>> to contain Maildir directories
>> "/var/spool/mail/webmail/{user1,user2}". Then I'll point my POP
>> daemon to retrieve messages from "/var/spool/mail/webmail/user1"...
>> etc as well as configure Horde to use the same directory:
>> "/var/spool/mail/webmail".
>>
>> So Exim would perform local deliveries by running an unseen router
>> first to the MBOX files in "/var/spool/mail" and then a second (final)
>> deliver to Maildir directories.
>>
>> The rationale behind this is that "/var/spool/mail" would remain
>> untouched, and act as an archive that I can periodically backup.
>>
>> My question is: is this an "okay" or "standard" approach to setting up
>> routing for what I want to achieve (webmail and backing up inbound
>> emails in a small or medium sized office, i.e. less-than 500 users)?
>> How have others setup routing for archiving emails when you only have
>> one box to do it on?
>
> That sounds fine to me. However, one recommendation I'd make is to use
> maildir for the backup as well as the live mail instead of mbox. That
> way you can easily delete mail from your backup over a certain age. Eg,
> to delete everything over 30 days (untested):
>
> find /var/spool/mail -type f -mtime +30 -exec /bin/rm -f {} \;
>
> It would also be much more straight forward to retrieve mail from the
> backup and then insert it back into a users current live mail...
>


*somebody also said* (in grey text, no less):

==

It really depends on the mail server in question, cyrus-imap would break
if you simply deleted the file as the folder indexes would become out of
sync.

==

Which, presuming it is true, might be equally true for brute-force insertion - I
do not know.

Dovecot, to name one I do know, would log a complaint, then rebuild the indices.

Those are not the only differences, nor the only two possible IMAP (if IMAP is
even used at all).

That said, mbox is probably considerably less ameanbel to /forgiving of
third-party manipulation than maildir. Nor are these the only means of storing
messages - just the most common two.

If in doubt, start with both - not hard for Exim - the see what works best in
*your* environment.

'YMMV'

Bill Hacker