Skip to content

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

Merged
OCA-git-bot merged 1 commit intoOCA:18.0from
camptocamp:fix-mail_cleanup
Apr 23, 2026
Merged

[18.0][FIX] mail_cleanup: command CLOSE illegal in state AUTH, only allowed i…#3436
OCA-git-bot merged 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.

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 @sebalix A review update is welcome

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.

Hello @leemannd , approved :)

@sebalix
Copy link
Copy Markdown
Contributor

sebalix commented Apr 23, 2026

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-3436-by-sebalix-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 632bc14 into OCA:18.0 Apr 23, 2026
5 of 7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at ceefe1d. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants