Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'skip' and 'limit' options (useful for copying messages to Gmail or over unreliable network connection) #3

Merged
merged 5 commits into from Jan 18, 2014

Conversation

gsbabil
Copy link
Contributor

@gsbabil gsbabil commented Jan 16, 2014

Since Gmail terribly throttles uploading and downloading mails over IMAP (randomly disconnects - happened to me at least twice last night), you may find the 'skip' and 'limit' options handy. If Gmail disconnected you after copying 123 emails out of your total 1000 emails in the example shown above, you may use the following command to resume copying skipping the first 123 messages.

python imapcopy.py "imap.otherserver.com.au:993" "username:password" \
"imap.googlemail.com:993" "username@gmail.com:password" \
"INBOX" "OTHER-SERVER/Inbox" --skip 123

Similarly 'limit' allows to copy only a total of N number of messages. For example, the following command will copy
message no. 124 to 223 into Gmail.

python imapcopy.py "imap.otherserver.com.au:993" "username:password" \
"imap.googlemail.com:993" "username@gmail.com:password" \
"INBOX" "OTHER-SERVER/Inbox" --skip 123 --limit 100

jarus added a commit that referenced this pull request Jan 18, 2014
Added 'skip' and 'limit' options (useful for copying messages to Gmail or over unreliable network connection)
@jarus jarus merged commit ae45ad0 into jarus:master Jan 18, 2014
@jarus
Copy link
Owner

jarus commented Jan 18, 2014

This is really nice. Thank you very much! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants