Skip to content

Imap

Configures IMAP protocol settings including authentication, timeouts, and rate limits.

This object can be configured from the WebUI under Settings › Network › IMAP

Type: Boolean · default: false

Whether to allow plain text authentication on unencrypted connections

Type: UnsignedInt · default: 3 · min: 1

Number of authentication attempts a user can make before being disconnected by the server

Type: UnsignedInt? · default: 16 · min: 1

The maximum number of concurrent connections

Type: Rate? · default: {"count":2000,"period":"1m"}

The maximum number of requests per minute

Type: Size · default: "50mb"

Maximum size of an IMAP request that the server will accept

Type: Duration · default: "1m"

Time an unauthenticated session can stay inactive before being ended by the server

Type: Duration · default: "30m"

Time an authenticated session can remain idle before the server terminates it

Type: Duration · default: "30m"

Time a connection can stay idle in the IMAP IDLE state before the server breaks the connection

The Imap singleton is available via the urn:stalwart:jmap capability.

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.

Terminal window
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"
]
}'

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.

Terminal window
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.

Terminal window
stalwart-cli get Imap
Terminal window
stalwart-cli update Imap --field allowPlainTextAuth=false

Defines a rate limit as a count over a time period.

Type: UnsignedInt · default: 0 · min: 1 · max: 1000000

Count

Type: Duration · default: "0s" · min: 1

Period