Skip to content

[18.0][FIX] mail_cleanup: command CLOSE illegal in state AUTH, only allowed i…#3436

Open
leemannd wants to merge 1 commit intoOCA:18.0from
camptocamp:fix-mail_cleanup
Open

[18.0][FIX] mail_cleanup: command CLOSE illegal in state AUTH, only allowed i…#3436
leemannd wants to merge 1 commit intoOCA:18.0from
camptocamp:fix-mail_cleanup

Conversation

@leemannd
Copy link
Copy Markdown
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
Copy Markdown
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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hello, no side effect to keep them. But I will remove them to be more consistent.

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