Open
Conversation
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.
This pull request adds IMAP QUOTA support to the codebase, enabling the server to handle quota-related commands and responses as specified by RFC 2087. It introduces new command parsing, connector interface methods, session handlers, and response types to support GETQUOTA and GETQUOTAROOT commands, as well as error handling for over-quota situations. The changes also extend the IMAP capabilities advertised by the server to include QUOTA.
IMAP QUOTA Support
GETQUOTAandGETQUOTAROOT, enabling clients to query quota information. (imap/command/getquota.go[1]imap/command/getquotaroot.go[2]imap/command/parser.go[3]imap/quota.goimap/quota.goR1-R14)Connectorinterface withGetQuotaandGetQuotaRootmethods, and implemented them in the dummy and mock connectors for testing. (connector/connector.go[1] [2]connector/dummy.go[3] [4] [5]connector/mock_connector/connector.go[6]GETQUOTAandGETQUOTAROOTcommands, including new handler files and response types for quota and quota root information. (internal/session/handle.go[1] [2]internal/session/handle_getquota.go[3]internal/session/handle_getquotaroot.go[4]internal/response/quota.go[5]internal/response/quotaroot.go[6]Over-Quota Error Handling
ErrOverQuotaerror and ensured that append, copy, and move operations return the appropriate IMAP response when the quota is exceeded. (connector/connector.go[1]internal/session/handle_append.go[2] [3]internal/session/handle_copy.go[4] [5]internal/session/handle_move.go[6] [7]internal/response/item_overquota.go[8]internal/session/errors.gointernal/session/errors.goR35-R36)IMAP Capabilities
QUOTAcapability to clients and updated capability checks to support pre-auth and post-auth logic. (imap/capabilities.go[1]internal/session/session.go[2]Backend and State Integration
internal/backend/state_connector_impl.gointernal/backend/state_connector_impl.goR230-R241)These changes collectively enable full IMAP QUOTA support, including command parsing, backend integration, error handling, and client communication.