We use cookies to ensure that we give you the best experience on our website.  Visit our Privacy Policy to learn more. If you continue to use this site, we will assume that you are okay with it.

Your choices regarding cookies on this site.
Your preferences have been updated.
In order for the changes to take effect completely please clear your browser cookies and cache. Then reload the page.

Werk #11208: check_mailboxes: Handle invalid mailbox names

ComponentChecks & Agents
Titlecheck_mailboxes: Handle invalid mailbox names
Date2020-09-24 11:38:50
Checkmk EditionCheckmk Raw Edition (CRE)
Checkmk Version2.0.0i1
LevelTrivial Change
ClassBug Fix
CompatibilityCompatible - no manual interaction needed

A space character in a mailbox name provided via {--mailbox=}, e.g. "My Inbox" would lead to a known exception:

imaplib.IMAP4.error: SELECT command error: BAD [b"parse error: wrong character; expected '(' but got 'I'"]

see https://bugs.python.org/issue13940

This fix quotes mailbox names and thus fixes the described behaviour.

Also, provided mailbox names which do not exist on the server would have been ignored silently. This fix will render the check UNKNOWN in case any non-existent names are encountered.