Topic: Taking backup of mail directories

Hi there,

This is to find a better way of backing up my emails (not just the database backups, though of course that's great!)

When  I last gunzip (compressed) archived the old messages before upgrading to my current working version of iRedMail it's come to a point I'd rather just do a server rebuild it's becoming far too much of a chore keeping everything working lol.

What with systematic changes a few times etc... you know.

Anyways the problem I last had with backing up, was that every email I had in there looked like it'd just been sent so it came in as unread or sorry appeared like it was unread but had already been read of course.

Is there anyway of making sure that when an emails unread it stays that way if I was to rebuild my server after taking a raw file system backup and then go to restore the actual physical emails?

I'd really be interested in this!

I appreciate any help in advanced of course,

==== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL (with postfix admin as the creation of new users)
- Linux/BSD distribution name and version:  CentOS 6.5
- Related log if you're reporting an issue: Not applicable


Re: Taking backup of mail directories

It depends on your backup tool. But there's a tip if you want to do it yourself:

With maildir format, you can add some characters in file name of mail message to let Dovecot know some of its IMAP flags. for example, 'S' is same as IMAP flag '\Seen' (read).

- http://wiki2.dovecot.org/MailboxFormat/ … extensions
- http://cr.yp.to/proto/maildir.html


Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee


Re: Taking backup of mail directories

You're a star, probably will work actually though the way I have done it to be brutally honest.

I went and tar balled it (not sure if that's the right way of saying what I did) but using z as the compression so:
tar -czpvf then the file name and directory etc...

Anyways I did a restore of the tips and the config settings and restored them from a config change I made and seems to come up as read anyways when I put them in the /cur directory.

I will have a read of those links though!

Many thanks!