Add IMAP UIDPLUS support (RFC 4315)#115
Draft
mpscholten wants to merge 1 commit into
Draft
Conversation
Adds UIDPLUS extension support so callers can recover the UIDs the server assigns on APPEND/COPY and target expunges by UID: - appendFullUID: like appendFull, returns the APPENDUID response code - copyUID / copyUIDs / copyUIDR: UID COPY returning the COPYUID code - uidExpunge / uidExpungeR: UID EXPUNGE over a UID set or range New types AppendUID and CopyUID, the UIDSet alias, and the APPENDUID/COPYUID/UIDNOTSTICKY status codes with their parsers. sendCommandWithResponse exposes the tagged ServerResponse so the response codes can be read. The existing appendFull/copyFull keep their old signatures by discarding the UID result. Covered by new parser cases in baseTest and a dedicated imapUIDPlusTest group exercising the API against scripted server responses.
bddf0fa to
0086c02
Compare
This was referenced Jun 13, 2026
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.
What
Adds support for the IMAP UIDPLUS extension (RFC 4315), so callers can recover the UIDs the server assigns during
APPEND/COPYand can expunge messages targeted by UID.New API (
Network.HaskellNet.IMAP)appendFullUID— likeappendFull, but returns theAPPENDUIDresponse code (the UID assigned to the appended message)copyUID/copyUIDs/copyUIDR—UID COPYvariants returning theCOPYUIDresponse code (single UID, UID list, UID range)uidExpunge/uidExpungeR—UID EXPUNGE, removing only the\Deletedmessages within a given UID set/rangeNew types (
Network.HaskellNet.IMAP.Types)AppendUID,CopyUID, and theUIDSetaliasStatusCodeconstructorsAPPENDUID_sc,COPYUID_sc,UIDNOTSTICKY, with parsers inIMAP.ParsersPlumbing
sendCommandWithResponseexposes the taggedServerResponseso the new response codes can be read;sendCommandis now defined in terms of it.appendFull/copyFullkeep their old signatures (they discard the UID result), so this is backwards compatible.Tests
baseTestfor theAPPENDUID/COPYUID/UIDNOTSTICKYresponse codes.imapUIDPlusTestgroup exercising the new API against scripted server responses (verifying both the bytes sent and the parsed UID result).All new tests pass locally (
cabal test, GHC 9.8.4).🤖 Generated with Claude Code