This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author edwardmbsmith
Recipients barry, edwardmbsmith, r.david.murray
Date 2019-06-26.05:28:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561526929.45.0.528897435215.issue37407@roundup.psfhosted.org>
In-reply-to
Content
Regex for imaplib should account for IMAP servers which return one or two whitespaces after the * in responses. For example when using davmail as an interpreter between exchange to IMAP 

Acceptable response is as follows:
```
  58:24.54 > PJJD3 EXAMINE INBOX
  58:24.77 < * 486 EXISTS
  58:24.78      matched r'\* (?P<data>\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?' => ('486', 'EXISTS', None, None)
  58:24.78 untagged_responses[EXISTS] 0 += ["486"]
```
Davmail response:
```
57:50.86 > KPFE3 EXAMINE INBOX
  57:51.10 < *  953 EXISTS
  57:51.10 last 0 IMAP4 interactions:
  57:51.10 > KPFE4 LOGOUT
```

See additional whitespace after the * on line 2

To be fixed by allowing the regex to account for one or two whitespaces
```python
br'\*[ ]{1,2}(?P<data>\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?'
```
History
Date User Action Args
2019-06-26 05:28:49edwardmbsmithsetrecipients: + edwardmbsmith, barry, r.david.murray
2019-06-26 05:28:49edwardmbsmithsetmessageid: <1561526929.45.0.528897435215.issue37407@roundup.psfhosted.org>
2019-06-26 05:28:49edwardmbsmithlinkissue37407 messages
2019-06-26 05:28:49edwardmbsmithcreate