Imap
Configures IMAP protocol settings including authentication, timeouts, and rate limits.
This object can be configured from the WebUI under Settings › Network › IMAP
Fields
Section titled “Fields”allowPlainTextAuth
Section titled “allowPlainTextAuth”Type:
Boolean· default:falseWhether to allow plain text authentication on unencrypted connections
maxAuthFailures
Section titled “maxAuthFailures”Type:
UnsignedInt· default:3· min: 1Number of authentication attempts a user can make before being disconnected by the server
maxConcurrent
Section titled “maxConcurrent”Type:
UnsignedInt?· default:16· min: 1The maximum number of concurrent connections
maxRequestRate
Section titled “maxRequestRate”Type:
Rate?· default:{"count":2000,"period":"1m"}The maximum number of requests per minute
maxRequestSize
Section titled “maxRequestSize”Type:
Size· default:"50mb"Maximum size of an IMAP request that the server will accept
timeoutAnonymous
Section titled “timeoutAnonymous”Type:
Duration· default:"1m"Time an unauthenticated session can stay inactive before being ended by the server
timeoutAuthenticated
Section titled “timeoutAuthenticated”Type:
Duration· default:"30m"Time an authenticated session can remain idle before the server terminates it
timeoutIdle
Section titled “timeoutIdle”Type:
Duration· default:"30m"Time a connection can stay idle in the IMAP IDLE state before the server breaks the connection
JMAP API
Section titled “JMAP API”The Imap singleton is available via the urn:stalwart:jmap capability.
x:Imap/get
Section titled “x:Imap/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
For singletons, the ids argument should be the literal singleton (or null to return the single instance).
This method requires the sysImapGet permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Imap/get", { "ids": [ "singleton" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:Imap/set
Section titled “x:Imap/set”This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.
This method requires the sysImapUpdate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:Imap/set", { "update": { "singleton": { "allowPlainTextAuth": false } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get ImapUpdate
Section titled “Update”stalwart-cli update Imap --field allowPlainTextAuth=falseNested types
Section titled “Nested types”Defines a rate limit as a count over a time period.
Type:
UnsignedInt· default:0· min: 1 · max: 1000000Count
period
Section titled “period”Type:
Duration· default:"0s"· min: 1Period