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?

Anish Sheela
  • 192
  • 2
  • 16
  • For future viewer, check out [this Q/A](https://serverfault.com/questions/1007996/compress-old-emails-with-dovecot/1007997#1007997), 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 '23 at 16:08

1 Answers1

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.

NickW
  • 10,263
  • 1
  • 20
  • 27
  • 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. – Anish Sheela Feb 21 '13 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 '13 at 09:36