We've had a hard disk failure, and have a backup of emails. The MTA on the server was Exim. We need to setup the mails on another server to give the admin access to these emails on desktop client such as Thunderbird or Outlook. As far as I know, there's no way to directly import Exim mail files into these clients. So I think we'll need to setup Exim on the new server as well. The issue with this is that we cannot setup domains on this server.
So how can we go about managing these emails from a desktop client without setting up domains on the new server?
The directory structure of the emails:
--> username
-----> mail
----------> [email protected]
-----------------> .Drafts
-----------------> .Junk
-----------------> .Sent
-----------------> .Trash
-----------------> courierimapkeyords
-----------------> cur
-----------------> new
-----------------> tmp
----------> .Drafts
----------> [email protected]
-----------------> .Drafts
-----------------> .Junk
-----------------> .Sent
-----------------> .Trash
-----------------> courierimapkeyords
-----------------> cur
-----------------> new
-----------------> tmp
----------> .Sent
----------> .Trash
Some sample email filenames:
1301306157.M973604P22982V0000000000000808I012D814B_0.host2.server.com,S=759_2,S
1301396083.M760888P5907V0000000000000808I012D814C_0.host2.server.com,S=5586_2,S
1301653044.M738056P22602V0000000000000808I012D815C_0.host2.server.com,S=1150_2,S
1301993531.M855378P29938V0000000000000808I012D8178_0.host2.server.com,S=745_2,S
1302003877.M624066P11398V0000000000000808I012D817A_0.host2.server.com,S=16791_2,S
OS: Redhat EL 6
Exim does not provide the service you are trying to use. You need to configure an IMAP server such as Courier-IMAP or Dovecot. In each case, you would need to configure it so that user1 can login and see its mail at /home/user1/mail/[email protected]/, and user2 can login and see its mail at /home/user2/mail/[email protected]/. Note that I included the trailing slash on the path. That tells the IMAP server that the email is in a "Maildir+" format, which means that each message is stored in a seperate file, and the subdirectory structure comprises the mail folders (Drafts, Sent, Trash, etc).
Both Courier and Dovecot can be configured so that you just login with username "user1" or "user2", or you login with the full email address "[email protected]" or "[email protected]". It's completely up to you how to configure it.
The Dovecot Wiki has a great quick howto on configuring it. The Courier-IMAP is a bit more involved with the install, so if you're looking for a quick throw-away installation, Dovecot is probably your quickest bet.
Looks like you used maildir as mail storage. This is just fine, you'll be able to deal with it as its some simple plain-text files, nothing more.
If you're about to read it in you mail client simple convert maildir to mailbox format (the output will be a simple file for each dir/folder of your ex-mailboxes)/ There are a lot of script for that, say 1, 2 not to list more, or you'll be able to use utility such as mb2md (check your Linux repo for install that).
As you get your mailboxes simple use your mail client to import it as mailbox or mbox file (most clients won't mind to do that easily). If you like Thunderbird then you'll find it nice news that Thunderbird uses mbox as its standard storage format (here are some steps to use it). Just beware of single mailbox/mbox file size since mail clients won't like files sized of 4G+.