-
Notifications
You must be signed in to change notification settings - Fork 46
imaplib.error: command SEARCH illegal in state AUTH #31
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
Comments
I'm getting the same issue, wondering if there's a fix @polo2ro? |
@llamafilm I've managed to get around this issue by just removing "[Gmail]" from the account array. if '"[Gmail]"' in folders: folders.remove('"[Gmail]"') It fit's in below in the for account in options['accounts']:
print('{}/{} (on {})'.format(account['name'], account['remote_folder'], account['host']))
basedir = options['local_folder']
if account['remote_folder'] == "__ALL__":
folders = []
for folder_entry in get_folder_fist(account):
folders.append(folder_entry.decode().replace("/",".").split(' "." ')[1])
# Remove gmail specific parent folder from array as causes script to fail:
if '"[Gmail]"' in folders: folders.remove('"[Gmail]"') From what I understand, it's a Gmail specific parent folder for Gmail specific folders, or something like that. The point is it doesn't, as far as I know, contain any emails itself, and so can be removed. Will give it a bit more of a test this weekend and if all seems to be working I'll raise a PR. That being said, perhaps there's a reason why it's failing - maybe because it contains no emails, but I've just focused on trying to work around it for now, as imapbox does exactly what I've been looking for otherwise. |
I think i never tested this on gmail. Good thing you find a fix 👍 |
PR's been created 👍 |
Hello. First of all, thank you for this app, it's a great idea. I want to download my Gmail archive so that I can delete my Google account. I set
remote_folder
to ALL and it started downloading a few folders but it fails when it gets to the main one called [Gmail]. So then I setremote_folder=[Gmail]
and it does the same thing. Do you know what is causing this?The text was updated successfully, but these errors were encountered: