https://github.com/andreasscherbaum/maildir2gmail
Maildir 2 Gmail
https://github.com/andreasscherbaum/maildir2gmail
gmail gmail-inbox imap mailbox maildir migration migration-tool
Last synced: about 1 year ago
JSON representation
Maildir 2 Gmail
- Host: GitHub
- URL: https://github.com/andreasscherbaum/maildir2gmail
- Owner: andreasscherbaum
- License: unlicense
- Created: 2016-11-06T10:43:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-28T19:54:02.000Z (over 7 years ago)
- Last Synced: 2025-04-04T01:51:04.296Z (about 1 year ago)
- Topics: gmail, gmail-inbox, imap, mailbox, maildir, migration, migration-tool
- Language: Python
- Size: 67.4 KB
- Stars: 14
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://scott.yang.id.au/2009/01/migrate-emails-maildir-gmail.html). There is no license included, but according to a [Tweet](https://twitter.com/scottyang/status/794141870934720512) ([copy](./Twitter_2016-11-03.png)) 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 -p
```
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](https://support.google.com/accounts/answer/185833).