Trace
Stores a message delivery trace with associated events.
This object can be configured from the WebUI under Management › Emails › History › Inbound Delivery Management › Emails › History › Outbound Delivery
Fields
Section titled “Fields”events
Section titled “events”Type:
TraceEvent[]List of events associated with the trace entry
timestamp
Section titled “timestamp”Type:
UTCDateTime· server-setTimestamp of the trace entry
Type:
String· server-setSender address
Type:
String· server-setRecipient addresses
Type:
Size· server-setSize of the message
JMAP API
Section titled “JMAP API”The Trace object is available via the urn:stalwart:jmap capability.
x:Trace/get
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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 |
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get Trace id1Create
Section titled “Create”stalwart-cli create Trace \ --field 'events={}'stalwart-cli query TraceUpdate
Section titled “Update”stalwart-cli update Trace id1 --field events='{}'Delete
Section titled “Delete”stalwart-cli delete Trace --ids id1Nested types
Section titled “Nested types”TraceEvent
Section titled “TraceEvent”A single event within a delivery trace.
Type:
EventType· requiredEvent type
timestamp
Section titled “timestamp”Type:
UTCDateTime· requiredTimestamp when the event occurred
keyValues
Section titled “keyValues”Type:
TraceKeyValue[]List of key-value pairs associated with the trace entry
TraceKeyValue
Section titled “TraceKeyValue”A key-value pair associated with a trace event.
Type:
Key· requiredKey name
Type:
TraceValue· requiredKey value
TraceValue
Section titled “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
Section titled “TraceValueString”A string trace value.
Type:
String· requiredString value
TraceValueUnsignedInt
Section titled “TraceValueUnsignedInt”An unsigned integer trace value.
Type:
UnsignedInt· default:0Unsigned integer value
TraceValueInteger
Section titled “TraceValueInteger”An integer trace value.
Type:
Integer· default:0Integer value
TraceValueBoolean
Section titled “TraceValueBoolean”A boolean trace value.
Type:
Boolean· default:falseBoolean value
TraceValueFloat
Section titled “TraceValueFloat”A floating-point trace value.
Type:
Float· default:0Float value
TraceValueUTCDateTime
Section titled “TraceValueUTCDateTime”A UTC date-time trace value.
Type:
UTCDateTime· requiredUTC date and time value
TraceValueDuration
Section titled “TraceValueDuration”A duration trace value in seconds.
Type:
UnsignedInt· default:0Duration value in seconds
TraceValueIpAddr
Section titled “TraceValueIpAddr”An IP address trace value.
Type:
IpAddr· requiredIP address value
TraceValueList
Section titled “TraceValueList”A list of trace values.
Type:
TraceValue[]Value list
TraceValueEvent
Section titled “TraceValueEvent”A nested event trace value.
Type:
EventType· requiredEvent type
Type:
TraceKeyValue[]List of key-value pairs associated with the trace entry