Backup email?

David Fletcher dave at
Mon Sep 5 18:44:27 UTC 2011

On Mon, 2011-09-05 at 10:24 -0700, Knute Johnson wrote:
> On 9/5/2011 9:47 AM, David Fletcher wrote:
> > I just have a cron job that fires off a script, part of whose job is to
> > rsync the /home/ directory on the server which includes all the maildirs
> > to a backup directory on my desktop PC. Once in a while, I tar my
> > desktop home directory and copy it to a USB flash drive, thus backing up
> > my email along with everything else. As far as I know this provides me
> > with a copy of everything I need to rebuild my mail server in case of
> > disaster. All I need to do is extract the server /home/ back to the new
> > server, put my edits back into /etc/ and fire up postfix and dovecot.
> I run a cron job to backup all the email files too but I have so much 
> that doesn't need to be on the server and I'm running out of space on my 
> flash drive.
> > BTW correct me if I'm wrong but I don't think IMAP has anything to do
> > with the way email is stored on a server. It's just a protocol that's
> > enabled on e.g. dovecot for access to that mail.
> Well I don't know.  There are the individual files in /var/mail for each 
> user that are full of mail and I have additional files in 
> /home/user/mail that are the IMAP folders and their mail.  At least that 
> is what I think they are.  I don't know if they are duplicates of what 
> is in /var/mail/user or not.  There are a bunch of index files in 
> /home/user/mail but those can be rebuilt by dovecot if they are lost.
> -- 
> Knute Johnson

Everything used to be stored inside kmail but when I decided to swap to
gnome, I fixed up the server with maildir and IMAP and exported
everything, simply by dragging and dropping from one account to the
other I think is how I did it. Everything is now stored
in /home/username/Maildir/. I seem to remember that that's the default
location for maildirs.

Don't know whether you're doing it or not, but with your own domain name
you can also get your router to port forward SMTP service to your
server, write an aliases file and set your MX record to send directly to
your own server.


More information about the ubuntu-users mailing list