Skip to content

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

Type: TraceEvent[]

List of events associated with the trace entry

Type: UTCDateTime · server-set

Timestamp of the trace entry

Type: String · server-set

Sender address

Type: String · server-set

Recipient addresses

Type: Size · server-set

Size of the message

The Trace 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 sysTraceGet permission.

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

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 sysTraceCreate permission.

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

This operation requires the sysTraceUpdate permission.

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

This operation requires the sysTraceDestroy permission.

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

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

This method requires the sysTraceQuery permission.

Terminal window
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):

ConditionKind
texttext
timestampdate
queueIdtext

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

Terminal window
stalwart-cli get Trace id1
Terminal window
stalwart-cli create Trace \
--field 'events={}'
Terminal window
stalwart-cli query Trace
Terminal window
stalwart-cli update Trace id1 --field events='{}'
Terminal window
stalwart-cli delete Trace --ids id1

A single event within a delivery trace.

Type: EventType · required

Event type

Type: UTCDateTime · required

Timestamp when the event occurred

Type: TraceKeyValue[]

List of key-value pairs associated with the trace entry

A key-value pair associated with a trace event.

Type: Key · required

Key name

Type: TraceValue · required

Key value

A typed value in a trace key-value pair.

A string trace value.

Type: String · required

String value

An unsigned integer trace value.

Type: UnsignedInt · default: 0

Unsigned integer value

An integer trace value.

Type: Integer · default: 0

Integer value

A boolean trace value.

Type: Boolean · default: false

Boolean value

A floating-point trace value.

Type: Float · default: 0

Float value

A UTC date-time trace value.

Type: UTCDateTime · required

UTC date and time value

A duration trace value in seconds.

Type: UnsignedInt · default: 0

Duration value in seconds

An IP address trace value.

Type: IpAddr · required

IP address value

A list of trace values.

Type: TraceValue[]

Value list

A nested event trace value.

Type: EventType · required

Event type

Type: TraceKeyValue[]

List of key-value pairs associated with the trace entry