IMAP Upload is a tool for uploading a local mbox file to IMAP4 server.
The most stable way to migrate to Gmail.


  • Read messages stored in mbox format which is used by many mail clients such as Thunderbird.
  • Upload messages to IMAP4 server.
  • Preserve the delivery time of the message. (support date time in From_ line / “Received:” field / “Date:” field)
  • Automatic retry when the connection was aborted which happens frequently on Gmail.
  • Can write out failed messages in mbox format. (Easy to retry for the failed messages)
  • Support SSL.
  • Run on Windows, Mac OS X, Linux, *BSD, and so on.
  • Command line interface. (No friendly GUI, sorry...)
  • Free of charge.
  • Open source.


  • Python 2.5 or later.

quick start

Uploading a local mail box file “Friends.mbox” to the remote mail box “imported” on the server “” using SSL: python Friends.mbox imaps://
You can specify the destination by options instead of URL: python --host --port 993 --ssl --box imported Friends.mbox
You can use a shortcut option for the Gmail server: python --gmail --box imported Friends.mbox
There's an --error option so that you can store the failed messages in mbox format and retry for them later: python --gmail --box imported --error Friends.err Friends.mbox
For more details, please refer to the --help message: python --help
Copyright © 2009-2011 OZAWA Masayuki