Email Backups


#1

Was wondering, how do I backup the emails of all my users? Call me paranoid but having self hosted for 6 odd years now I am transfering my domain & email to Dreamhost. However I would like to be able to take a nightly rsync / backup of the emails.

I’ve tried searching here and the wiki but have not found the right combination of words to turn anything up.

Is this possible? Where are the mails for non shell users kept?

Many thanks


#2

You can’t. Non-shell user mail directories do exist, but I believe they’re pretty much unreachable. They’d need to be a shell user to have a reachable mail directory.

That said, if they’re using IMAP, then they should have a local copy of their mail. If they’re a POP user, they should be popping the mail off the server anyhow and not just letting it sit in the inbox. POP also somewhat makes a local copy of their mail.

If you really want to keep your own backups of user mail, I see two options:

  1. Convert users to Shell users and back up their Maildir
  2. Write a script that grabs mail off the POP/IMAP server and files it away.

-Scott


#3

Thanks for your reply Scott,

I was thinking about going the Shell uesrs route as I don’t have that many users that need mail accounts. However given that they can (and a couple probably will) change their passwords I suppose that I can’t really backup their mails either unless I fiddle with groups.

Rob