Trace
Stores a message delivery trace with associated events.
This object is only available with an Enterprise license.
This object can be configured from the WebUI under Management › Emails › History › Inbound Delivery Management › Emails › History › Outbound Delivery
Fields
events
Type:
TraceEvent[]List of events associated with the trace entry
timestamp
Type:
UTCDateTime· server-setTimestamp of the trace entry
from
Type:
String· server-setSender address
to
Type:
String· server-setRecipient addresses
size
Type:
Size· server-setSize of the message
JMAP API
The Trace object is available via the urn:stalwart:jmap capability.
x:Trace/get
This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysTraceGet permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Trace/get",
{
"ids": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:Trace/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
This operation requires the sysTraceCreate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Trace/set",
{
"create": {
"new1": {
"events": []
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Update
This operation requires the sysTraceUpdate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Trace/set",
{
"update": {
"id1": {
"events": []
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Destroy
This operation requires the sysTraceDestroy permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Trace/set",
{
"destroy": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:Trace/query
This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysTraceQuery permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:Trace/query",
{
"filter": {}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
The x:Trace/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):
| Condition | Kind |
|---|---|
text | text |
timestamp | date |
queueId | text |
CLI
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
Fetch
stalwart-cli get trace id1
Create
stalwart-cli create trace \
--field 'events=[]'
Query
stalwart-cli query trace
Update
stalwart-cli update trace id1 --field description='Updated'
Delete
stalwart-cli delete trace --ids id1
Nested types
TraceEvent
A single event within a delivery trace.
event
Type:
EventType· requiredEvent type
timestamp
Type:
UTCDateTime· requiredTimestamp when the event occurred
keyValues
Type:
TraceKeyValue[]List of key-value pairs associated with the trace entry
TraceKeyValue
A key-value pair associated with a trace event.
key
Type:
Key· requiredKey name
value
Type:
TraceValue· requiredKey value
TraceValue
A typed value in a trace key-value pair.
String: String value. Carries the fields ofTraceValueString.UnsignedInt: Unsigned integer value. Carries the fields ofTraceValueUnsignedInt.Integer: Integer value. Carries the fields ofTraceValueInteger.Boolean: Boolean value. Carries the fields ofTraceValueBoolean.Float: Float value. Carries the fields ofTraceValueFloat.UTCDateTime: UTC date and time value. Carries the fields ofTraceValueUTCDateTime.Duration: Duration value in seconds. Carries the fields ofTraceValueDuration.IpAddr: IP address value. Carries the fields ofTraceValueIpAddr.List: Value list. Carries the fields ofTraceValueList.Event: Nested event value. Carries the fields ofTraceValueEvent.Null: Null value. No additional fields.
TraceValueString
A string trace value.
value
Type:
String· requiredString value
TraceValueUnsignedInt
An unsigned integer trace value.
value
Type:
UnsignedInt· default:0Unsigned integer value
TraceValueInteger
An integer trace value.
value
Type:
Integer· default:0Integer value
TraceValueBoolean
A boolean trace value.
value
Type:
Boolean· default:falseBoolean value
TraceValueFloat
A floating-point trace value.
value
Type:
Float· default:0Float value
TraceValueUTCDateTime
A UTC date-time trace value.
value
Type:
UTCDateTime· requiredUTC date and time value
TraceValueDuration
A duration trace value in seconds.
value
Type:
UnsignedInt· default:0Duration value in seconds
TraceValueIpAddr
An IP address trace value.
value
Type:
IpAddr· requiredIP address value
TraceValueList
A list of trace values.
value
Type:
TraceValue[]Value list
TraceValueEvent
A nested event trace value.
event
Type:
EventType· requiredEvent type
value
Type:
TraceKeyValue[]List of key-value pairs associated with the trace entry