Skip to content

MtaDeliverySchedule

Defines retry and notification intervals for message delivery.

This object can be configured from the WebUI under Settings › MTA › Outbound › Delivery Schedules

Type: String · read-only

Short identifier for the schedule

Type: String?

A short description of the schedule, which can be used to identify it in the list of schedules

Type: MtaDeliveryExpiration · required

Whether to expire messages after a number of delivery attempts or after certain time (TTL)

Type: MtaDeliveryScheduleIntervalsOrDefault · required

List of delayed delivery DSN notification intervals

Type: Id<MtaVirtualQueue> · required

The name of the virtual queue to use for this schedule

Type: MtaDeliveryScheduleIntervalsOrDefault · required

List of retry intervals for message delivery

The MtaDeliverySchedule object is available via the urn:stalwart:jmap capability.

This is a standard Foo/get method as defined in RFC 8620, Section 5.1.

This method requires the sysMtaDeliveryScheduleGet permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaDeliverySchedule/get",
{
"ids": [
"id1"
]
},
"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.

Supports create, update, and destroy operations in a single call.

This operation requires the sysMtaDeliveryScheduleCreate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaDeliverySchedule/set",
{
"create": {
"new1": {
"expiry": {
"@type": "Ttl"
},
"notify": {
"@type": "Default"
},
"queueId": "<MtaVirtualQueue id>",
"retry": {
"@type": "Default"
}
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This operation requires the sysMtaDeliveryScheduleUpdate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaDeliverySchedule/set",
{
"update": {
"id1": {
"description": "updated value"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This operation requires the sysMtaDeliveryScheduleDestroy permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaDeliverySchedule/set",
{
"destroy": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This is a standard Foo/query method as defined in RFC 8620, Section 5.5.

This method requires the sysMtaDeliveryScheduleQuery permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MtaDeliverySchedule/query",
{
"filter": {
"name": "example"
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

The x:MtaDeliverySchedule/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):

ConditionKind
nametext

stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.

Terminal window
stalwart-cli get MtaDeliverySchedule id1
Terminal window
stalwart-cli create MtaDeliverySchedule \
--field 'expiry={"@type":"Ttl"}' \
--field 'notify={"@type":"Default"}' \
--field 'queueId=<MtaVirtualQueue id>' \
--field 'retry={"@type":"Default"}'
Terminal window
stalwart-cli query MtaDeliverySchedule
stalwart-cli query MtaDeliverySchedule --where name=example
Terminal window
stalwart-cli update MtaDeliverySchedule id1 --field description='updated value'
Terminal window
stalwart-cli delete MtaDeliverySchedule --ids id1

Defines the message expiration policy for undelivered messages.

Defines a time-to-live based message expiration policy.

Type: Duration · default: "3d"

Time after which the message will be expired if it is not delivered

Defines a delivery-attempts based message expiration policy.

Type: UnsignedInt · default: 5 · min: 1

Maximum number of delivery attempts before the message is considered failed

Defines whether to use the default delivery schedule intervals or specify custom intervals.

  • Default: Use default intervals. No additional fields.
  • Custom: Specify custom intervals. Carries the fields of MtaDeliveryScheduleIntervals.

Defines a custom list of delivery retry or notification intervals.

Type: MtaDeliveryScheduleInterval[] · min items: 1

List of intervals

Defines a single time interval entry used in a delivery schedule.

Type: Duration · default: "1h"

Time interval for retries or notifications