Link to home
Start Free TrialLog in
Avatar of CEHJ
CEHJFlag for United Kingdom of Great Britain and Northern Ireland

asked on

IMAP copying tool

Looking for a tool (Linux) that can copy Mbox folders (local) to folders on an IMAP server. Is there anything?
Avatar of Jesse Bruffett
Jesse Bruffett
Flag of United States of America image

i have to admit IMAP is not something ive messed with too much but couldn't you just use rsync?
Avatar of Scott Silva
That might be a bit difficult but not impossible... You would have to script something to pick each mbox, somehow grab its username AND password, and forward that to the other server..... It would be much easier if both servers are under your control to first get both systems to match by not only username, but numbers, and user numbers...  Clone over the mbox folders to the proper location on the new server, and if you want them in a different format like Maildir, do the conversion on the new server...
Avatar of CEHJ


No, i can't access the target's filesystem. It's shared hosting. IMAP access only. Closest i find so far is
The problem is that the source is an mbox file, not an IMAP server
Is the source just mbox files? Or is it a linux server that you could get IMAP running on?

How many users?

If only a couple users you could load the mbox locally in an email client, ( you at least used to be able to do this with Thunderbird, or convert the mbox to PST for outlook)...

Log into the remote imap server and copy the messages across...

If it is a lot of users, then setting up local IMAP and making sure it can access each mbox in its configured user directory would be easiest. Then you could use imapsync.
Avatar of CEHJ


Is the source just mbox files? Or is it a linux server that you could get IMAP running on?
Yes - or i'd have said so ;)

I'm currently manually copying using Thunderbird. It's a PITA (and error-prone)
Use an IMAP server that supports mbox format such as dovecot.

Another option is to convert mbox2Maildir ...... Ending up in the same state where imapsync can be used to copy from local IMAP to another.
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CEHJ


Great. Unfortunately your about 12 hours too late with that - i've done them all manually ;)
If you can find something that will merge remote IMAP folders, that would be genius
What IMAP server is in use on the system where mail is stored in mbox format?
several IMAP servers include support for mbox formatted .......
Avatar of CEHJ


Not sure actually. I can't access it filesystem-wise though
I would assume the files got there via some kind of mail server application... But its done now, so at least the OP can move on to the next problem...
Mbox formatted messages are in /var/mail/ or /var/spool/mail often one refers to the other the mailbox is named after the user whom it is accepting/storing messages.
Avatar of CEHJ


Yes, but unfortunately that's academic - i have no access to that (part of the) filesystem. I need a tool that can reconcile folders _X and X into X without duplicating messages
What do you mean, of course a person has access to their mbox file in that location otherwise mail, mutt, pine and other mail clients would be unable to function.