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

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: David Chait
Data:  
Para: Exim Users List
Assunto: Re: [exim] Using Routing, Maildir and MBOX for email backups


-----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...

--
Mike Cardwell - IT Consultant and LAMP developer
Cardwell IT Ltd. (UK Reg'd Company #06920226) http://cardwellit.com/

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/



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.

******************************************************************
DemandTec Email Notice

This email and any attachments may contain confidential and/or proprietary
information and is intended solely for the use of the addressee. If you are
not the intended recipient we request that you notify us via email or telephone
and delete all copies of the message from your systems. Additionally, although
DemandTec has taken reasonable precautions to ensure the security of this email
and any attachments, we encourage you to take similar precautions and accept no
liability for any loss or damage resulting from its use.

DemandTec, 1 Circle Star Way, Suite 200, San Carlos, CA 94070, 650-226-4600