Not really expecting a useful response, but just in case, I found that trying to filter on a folder named:
GERNews.2022.2022-05 Summer - 191
... failed with the message about search not being valid in the auth state.
However, changing the name of the folder to:
GERNews.2022_191
Made it work. I don't know why or what is going on here.
My IMAP server is Dovecot, I'm using latest (as of now) install of the module & deps, and it's on python3.9 running on a MacBook Pro M1.
This is the log:
2022-05-27 23:20:20,695 - INFO - Logging in to: 'xxx' as 'xxx'
2022-05-27 23:20:20,734 - INFO - Connected to IMAP Server with user xxx on xxx over SSL
2022-05-27 23:20:20,734 - INFO - Listing messages matching the following criteria: folder=GERNews.2022.2022-05 Summer - 191
2022-05-27 23:20:20,737 - INFO - Fetch list of messages from folder 'GERNews.2022.2022-05 Summer - 191'
Traceback (most recent call last):
File "/opt/homebrew/bin/attachment-downloader", line 112, in <module>
messages = mail.messages(**filter_options)
File "/opt/homebrew/lib/python3.9/site-packages/imbox/imbox.py", line 100, in messages
return messages_class(connection=self.connection,
File "/opt/homebrew/lib/python3.9/site-packages/imbox/messages.py", line 37, in __init__
self._uid_list = self._query_uids(**kwargs)
File "/opt/homebrew/lib/python3.9/site-packages/imbox/messages.py", line 48, in _query_uids
_, data = self.connection.uid('search', None, query_)
File "/opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imaplib.py", line 885, in uid
raise self.error("command %s illegal in state %s, "
imaplib.IMAP4.error: command SEARCH illegal in state AUTH, only allowed in states SELECTED
Not really expecting a useful response, but just in case, I found that trying to filter on a folder named:
... failed with the message about search not being valid in the auth state.
However, changing the name of the folder to:
Made it work. I don't know why or what is going on here.
My IMAP server is Dovecot, I'm using latest (as of now) install of the module & deps, and it's on python3.9 running on a MacBook Pro M1.
This is the log: