Repository navigation
imaplib.py "select" mailbox names containing spaces. #90378
Description
Activity
A mailbox (folder) need not be for a recipient and need not be the private part of an RFC2822 address.
Passing a value of "000 Bookings" to select() results in validation issues when the tokens are parsed as arguments and there are too many.
It would be a nice-to-have to accept spaces in the name.
Workaround is for a rule to be applied by a desktop email client such as Evolution to move it from the INBOX upon discovery according to filter criteria.
- addedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
on Jan 1, 2022 I presume you mean the mailbox parameter of imaplib.IMAP.select().
https://docs.python.org/3/library/imaplib.html#imaplib.IMAP4.selectIMAP4.select(mailbox='INBOX', readonly=False)
Select a mailbox. Returned data is the count of messages in mailbox (EXISTS response). The default mailbox is 'INBOX'. If the readonly flag is set, modifications to the mailbox are not allowed.Enhancements only go into future releases. Please make sure that the current main branch does not have the feature you are requesting.
Neither our doc nor https://datatracker.ietf.org/doc/html/rfc2060.html contain '2822', so you might be requesting something not supported.
There is no active maintainer for this module, so response from someone familiar with imaplib may take awhile.
In general I believe select(mailbox) expects the argument to use the IMAP protocol astring syntax. Perhaps adding an encode_astring function would help?
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: