rgladwell / imap-upload

Python script for uploading a local mbox file to IMAP4 server.
Other
130 stars 30 forks source link

Document how to get around Google Security lockout #23

Closed hanryhu closed 2 years ago

hanryhu commented 3 years ago

On the CLI, I saw the following error after python imap_upload.py --gmail --box imported mbox_file.mbox:

Username: user@gmail.com
Password: ........
Connecting to imap.gmail.com:993.
IMAP4 error: [AUTHENTICATIONFAILED] Invalid credentials (Failure)

The error is related to what Google calls "Less secure apps". I fixed it by going to My Account -> Security and then choosing "Turn on access (not recommended)": image

rgladwell commented 3 years ago

You can access your Gmail account without disabling important security settings by creating an application-specific password:

https://support.google.com/accounts/answer/185833?hl=en

Does this fix the issue for you?

Behinder commented 2 years ago

That setting is no longer available which is annoying. People should have right to choose, too much security means it's often inconvenient to use services.

rgladwell commented 2 years ago

Sorry to hear they deprecated this setting. I don't think there is anything we can do about this, so I'm going to close this.