andreasscherbaum / maildir2gmail

Maildir 2 Gmail

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

maildir2gmail

Maildir 2 Gmail

Overview and History

The maildir2gmail.py script allows uploading a maildir directory into a Google Gmail account, using IMAP.

Scott Yang provides the original maildir2gmail.py script on his website. There is no license included, but according to a Tweet (copy) the license is "provided as is" (public domain).

The script in this repository contains a few additional features which I found useful while migrating data, as well as additional documentation how to use it.

Usage

./maildir2gmail.py [-f] [-n] [--ignore-missing-date] [--max-size=MAX_SIZE] -u <username> -p <app-password> <maildirs>

By default, all mails are uploaded to All Mail in Gmail, following the Google concept of "never delete mails, just archive everything". A folder can be specified using the -f option. Non-existent folders will be created automatically.

Mails can be marked as Unseen (new) using the -n option.

Use option --ignore-missing-date to ignore all messages with missing date. In this case, messages are imported to gmail with the last modification time of the file.

You can set the maximum size for messages with the option --max-size=MAX_SIZE (in bytes). Messages that are larger than the defined size are skipped. Default is 25 MB (Gmail limitation for IMAP).

Username and Password are required, IMAP for your mailbox must be turned on (do this in the Settings for your mailbox). In addition you have to create an app password.

About

Maildir 2 Gmail

License:The Unlicense


Languages

Language:Python 88.0%Language:Shell 12.0%