Skip to content

Python script for uploading a local mbox file to IMAP4 server.

License

Notifications You must be signed in to change notification settings

secabeen/imap-upload

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

IMAP Upload

Copyright © 2009-2014 OZAWA Masayuki and Ricardo Gladwell

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

Features

  • Recursively import mbox sub-folders, currently supports Mac Mail MBOX export folder format.
  • 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.

Requirements

  • Python 2.5 or later.

Quick Start

Uploading a local mail box file “Friends.mbox” to the remote mail box “imported” on the server “example.com” using SSL:

python imap_upload.py Friends.mbox imaps://example.com/imported

You can specify the destination by options instead of URL:

python imap_upload.py --host example.com --port 993 --ssl --box imported Friends.mbox

You can use a shortcut option for the Gmail server:

python imap_upload.py --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 imap_upload.py --gmail --box imported --error Friends.err Friends.mbox

You can also recursively import mbox sub-folders using th -r option:

python imap_upload.py --gmail -r path

For more details, please refer to the --help message:

python imap_upload.py --help

About

Python script for uploading a local mbox file to IMAP4 server.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%