Skip to content

Conversation

@leemannd
Copy link
Contributor

@leemannd leemannd commented Nov 4, 2025

…n states SELECTED

Fixing: #3435

You need to have a server.select(). These selects are done into the methods _cleanup_fetchmail_server and _purge_fetchmail_server if you don't match any of the IF statements. You will never do the server.select() and thus endup with a stacktrace.

https://github.com/OCA/server-tools/blob/18.0/mail_cleanup/models/fetchmail_server.py#L125
https://github.com/OCA/server-tools/blob/18.0/mail_cleanup/models/fetchmail_server.py#L128C30-L128C53

@leemannd leemannd changed the title FIX mail_cleanup: command CLOSE illegal in state AUTH, only allowed i… [18.0][FIX]mail_cleanup: command CLOSE illegal in state AUTH, only allowed i… Nov 4, 2025
@leemannd leemannd changed the title [18.0][FIX]mail_cleanup: command CLOSE illegal in state AUTH, only allowed i… [18.0][FIX] mail_cleanup: command CLOSE illegal in state AUTH, only allowed i… Nov 4, 2025
if server.server_type == "imap":
try:
imap_server = server.connect()
imap_server.select()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to remove this instruction from _cleanup_fetchmail_server and _purge_fetchmail_server? No side-effect to keep them?

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.

3 participants