MtaDeliverySchedule
MtaDeliverySchedule
Section titled “MtaDeliverySchedule”Defines retry and notification intervals for message delivery.
This object can be configured from the WebUI under Settings › MTA › Outbound › Delivery Schedules
Fields
Section titled “Fields”Type:
String· read-onlyShort identifier for the schedule
description
Section titled “description”Type:
String?A short description of the schedule, which can be used to identify it in the list of schedules
expiry
Section titled “expiry”Type:
MtaDeliveryExpiration· requiredWhether to expire messages after a number of delivery attempts or after certain time (TTL)
notify
Section titled “notify”Type:
MtaDeliveryScheduleIntervalsOrDefault· requiredList of delayed delivery DSN notification intervals
queueId
Section titled “queueId”Type:
Id<MtaVirtualQueue>· requiredThe name of the virtual queue to use for this schedule
Type:
MtaDeliveryScheduleIntervalsOrDefault· requiredList of retry intervals for message delivery
JMAP API
Section titled “JMAP API”The MtaDeliverySchedule object is available via the urn:stalwart:jmap capability.
x:MtaDeliverySchedule/get
Section titled “x:MtaDeliverySchedule/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysMtaDeliveryScheduleGet permission.
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" ] }'x:MtaDeliverySchedule/set
Section titled “x:MtaDeliverySchedule/set”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.
Create
Section titled “Create”This operation requires the sysMtaDeliveryScheduleCreate permission.
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" ] }'Update
Section titled “Update”This operation requires the sysMtaDeliveryScheduleUpdate permission.
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" ] }'Destroy
Section titled “Destroy”This operation requires the sysMtaDeliveryScheduleDestroy permission.
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" ] }'x:MtaDeliverySchedule/query
Section titled “x:MtaDeliverySchedule/query”This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysMtaDeliveryScheduleQuery permission.
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):
| Condition | Kind |
|---|---|
name | text |
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get MtaDeliverySchedule id1Create
Section titled “Create”stalwart-cli create MtaDeliverySchedule \ --field 'expiry={"@type":"Ttl"}' \ --field 'notify={"@type":"Default"}' \ --field 'queueId=<MtaVirtualQueue id>' \ --field 'retry={"@type":"Default"}'stalwart-cli query MtaDeliverySchedulestalwart-cli query MtaDeliverySchedule --where name=exampleUpdate
Section titled “Update”stalwart-cli update MtaDeliverySchedule id1 --field description='updated value'Delete
Section titled “Delete”stalwart-cli delete MtaDeliverySchedule --ids id1Nested types
Section titled “Nested types”MtaDeliveryExpiration
Section titled “MtaDeliveryExpiration”Defines the message expiration policy for undelivered messages.
Ttl: Time To Live. Carries the fields ofMtaDeliveryExpirationTtl.Attempts: Delivery Attempts. Carries the fields ofMtaDeliveryExpirationAttempts.
MtaDeliveryExpirationTtl
Section titled “MtaDeliveryExpirationTtl”Defines a time-to-live based message expiration policy.
expire
Section titled “expire”Type:
Duration· default:"3d"Time after which the message will be expired if it is not delivered
MtaDeliveryExpirationAttempts
Section titled “MtaDeliveryExpirationAttempts”Defines a delivery-attempts based message expiration policy.
maxAttempts
Section titled “maxAttempts”Type:
UnsignedInt· default:5· min: 1Maximum number of delivery attempts before the message is considered failed
MtaDeliveryScheduleIntervalsOrDefault
Section titled “MtaDeliveryScheduleIntervalsOrDefault”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 ofMtaDeliveryScheduleIntervals.
MtaDeliveryScheduleIntervals
Section titled “MtaDeliveryScheduleIntervals”Defines a custom list of delivery retry or notification intervals.
intervals
Section titled “intervals”Type:
MtaDeliveryScheduleInterval[]· min items: 1List of intervals
MtaDeliveryScheduleInterval
Section titled “MtaDeliveryScheduleInterval”Defines a single time interval entry used in a delivery schedule.
duration
Section titled “duration”Type:
Duration· default:"1h"Time interval for retries or notifications