Support Imap4rev2 short tags#123
Open
cmouse wants to merge 3 commits intodovecot:mainfrom
Open
Conversation
sirainen
reviewed
May 7, 2026
| coverage. Speaks just enough IMAP for imaptest's stress-mode startup | ||
| (banner -> LOGIN -> [ENABLE] -> LIST/SELECT/NOOP/LOGOUT) and emits | ||
| short-form tagged replies (tag OK\\r\\n with no resp-text) under one of | ||
| two policies: |
Contributor
There was a problem hiding this comment.
Do we really want to start adding mock servers, especially for such a trivial changes as this?..
Contributor
Author
There was a problem hiding this comment.
at least until dovecot has something we can test against
RFC 9051 Appendix E.23 + Errata 7343 allow resp-text to be vacant
("tag OK\r\n", "* OK\r\n"). Accept those forms when IMAP4rev2 is in
effect for this connection -- either client->imap4rev2_enabled is
set after ENABLE IMAP4REV2, or the user opted in via the imap4rev2
cmdline (conf.imap4rev2). The latter covers servers that emit
IMAP4rev2 syntax before ENABLE has been negotiated, e.g. dovecot
built with --enable-experimental-imap4rev2.
Without either signal, surface the short tagged form as an explicit
error so the imap4rev1 strictness check stays.
Bundles a minimal mock IMAP server with two modes (compliant emits short replies only after ENABLE IMAP4REV2; rogue emits them from the start) and a bash runner that asserts three cases: - compliant mock + imap4rev2 cmdline: clean run, no resp-text errors. - rogue mock without imap4rev2 cmdline: imaptest surfaces the missing resp-text error, proving the strict gate still fires. - rogue mock + imap4rev2 cmdline: imaptest accepts the short form (mirrors dovecot --enable-experimental-imap4rev2 behavior). All cases pass append=0 so the test does not depend on a default mbox fixture file.
Needed so the static workflow exercises the IMAP4rev2 code path that imaptest now covers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: DOV-8669