1

I have a requirement that I want to archive mails older than say, 6 months to another server, so that I can keep space of first server to be minimum, but still able to access older mails if user requires.

The case is the live server is much expensive. Getting more storage is not a good idea. What I need is keep the latest mails in live server and old mails in less reliable and cheaper server.

Is that possible, if so, how?

2
  • For future viewer, check out this Q/A, it's not storing on another server (which I think would be near impossible to achieve technically) but just compressing the old emails in place
    – Tofandel
    Aug 25, 2023 at 16:08
  • I don't think the question is vague at all. He wants to move old mails to a second server (NAS) and still be able to access the files. I don't think it's near impossible technically either. You'd create a soft link to the file on an external drive, so that the user still sees all mail like he did before, while the mails are now on a NAS. You could do this per mail file or perhaps move the mail to the Archive folder and just soft link that folder. Jan 18 at 13:45

1 Answer 1

1

You could use an archiving program that works on your mail format (mailbox/maildir) and then rsync those over to the second server, and finally remove them.

More specific recommendations would require more specific information about what you're running, what format, and other useful info.

This program (http://archivemail.sourceforge.net/) works with the mbox format, but many dovecot installs use maildir nowadays.

2
  • The thing is I want them to access the old mails also from their mail clients. I just want to exploit fact that old mails are rarely accessed and the downtime on it won't be noticed much. Feb 21, 2013 at 18:21
  • Again, it depends on the mail storage format, with maildir, you could just do a scan for mail older than a certain date, move it to the other server in the same directory /home/username/mail (an example obviously), and use a DB for user authentication, so they'd just need an account on a second machine to be able to log in to see their emails.
    – NickW
    Feb 22, 2013 at 9:36

Not the answer you're looking for? Browse other questions tagged .