IMAP copying tool

Looking for a tool (Linux) that can copy Mbox folders (local) to folders on an IMAP server. Is there anything?
LVL 87
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jesse BruffettM&F-ing SorcererCommented:
i have to admit IMAP is not something ive messed with too much but couldn't you just use rsync?
Scott SilvaNetwork AdministratorCommented:
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...
CEHJAuthor Commented:
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
Ensure Business Longevity with As-A-Service

Using the as-a-service approach for your business model allows you to grow your revenue stream with new practice areas, without forcing you to part ways with existing clients just because they don’t fit the mold of your new service offerings.

Scott SilvaNetwork AdministratorCommented:
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.
CEHJAuthor Commented:
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.
Tomas Helgi JohannssonDatabase Administrator / Software EngineerCommented:

You can use this script to upload .mbox files to IMAP server

    Tomas Helgi

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJAuthor Commented:
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 .......
CEHJAuthor Commented:
Not sure actually. I can't access it filesystem-wise though
Scott SilvaNetwork AdministratorCommented:
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.
CEHJAuthor Commented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.