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

Startseite
Nachricht löschen
Nachricht beantworten
Autor: W B Hacker
Datum:  
To: exim users
Betreff: Re: [exim] Using Routing, Maildir and MBOX for email backups
Eric Kiara wrote:
> Hi All,
>
> 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?
>
> Regards,
> Eric Kiara
>


MBOX format may have advantages for 'read only' or even read mostly'. Ditto for
one-pass backup. We've used it primarily for Mailing List Archives.

Maildir format, where one need not move an entire massive file, seems to be
advantageous if 'manipulation' is to be done [1] - specifically in an IMAP
environment, where the messages (may) remain server-side, yet might be
reorganized into all manner of bespoke 'folders' by subject, team responsible,
client, etc.[1] Features very useful for businesses, and amenable to sharing
all or part of certain traffic. Maildir *may* also be easier to work with as far
as reclaiming space or doing incremental or selective backup/restore.

Neither is really Exim issue, as it would not be Exim doing that sort of
maintenance or modification.

The main thing we do differently from your basic outline is to NOT use '/var/~'
for any of this.

We use a bespoke mount-point for mailstore, usually on HDD or RAID separate from
the rest of the system and apps - Exim's spool, hintsdb, pifile stay in /var,
but not the mailstore itself.

That can make it easier (and safer!) to backup/restor, migratee and upgrade or
change your OS. Separate 'spindles' also mean separate head-positioners, so this
can make for faster operations andreduced risk of contention much of the time.

CAVEAT: Experience, not gospel. YMMV,

Bill

[1] Be aware that 'many' apps such as IMAP that use Maildir don't actually move
the files around anyway - some use hardlinks, some simply use indices a la mbox,
some use tags and rebuild the indices when needed. Many use a combination of these.