Skip to main content
Version: 0.16

DmarcExternalReport

Stores a DMARC aggregate report received from an external source.

This object can be configured from the WebUI under Management › Reports › Inbox › DMARC

Fields

report

Type: DmarcReport · required

DMARC report content

from

Type: EmailAddress · required

Email address of the report sender

subject

Type: String · required

Subject line of the report email

to

Type: EmailAddress[]

List of recipient email addresses

receivedAt

Type: UTCDateTime · required

When the report email was received

expiresAt

Type: UTCDateTime · required

When the report is scheduled to be deleted

memberTenantId

Type: Id<Tenant>? · enterprise

Identifier for the tenant this report belongs to

JMAP API

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

x:DmarcExternalReport/get

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

This method requires the sysDmarcExternalReportGet permission.

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

x:DmarcExternalReport/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 sysDmarcExternalReportCreate permission.

curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:DmarcExternalReport/set",
{
"create": {
"new1": {
"expiresAt": "2026-01-01T00:00:00Z",
"from": "[email protected]",
"memberTenantId": "<Tenant id>",
"receivedAt": "2026-01-01T00:00:00Z",
"report": {
"dateRangeBegin": "2026-01-01T00:00:00Z",
"dateRangeEnd": "2026-01-01T00:00:00Z",
"email": "[email protected]",
"errors": [],
"extensions": [],
"extraContactInfo": "Example",
"orgName": "Example",
"policyAdkim": "relaxed",
"policyAspf": "relaxed",
"policyDisposition": "none",
"policyDomain": "Example",
"policyFailureReportingOptions": [],
"policySubdomainDisposition": "none",
"policyTestingMode": false,
"policyVersion": "Example",
"records": [],
"reportId": "Example",
"version": 1.0
},
"subject": "Example",
"to": []
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

Update

This operation requires the sysDmarcExternalReportUpdate permission.

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

Destroy

This operation requires the sysDmarcExternalReportDestroy permission.

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

x:DmarcExternalReport/query

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

This method requires the sysDmarcExternalReportQuery permission.

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

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

ConditionKind
domaintext
totalFailedSessionsinteger
totalSuccessfulSessionsinteger
expiresAtdate
memberTenantIdid of Tenant

CLI

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

Fetch

stalwart-cli get dmarc-external-report id1

Create

stalwart-cli create dmarc-external-report \
--field 'report={"dateRangeBegin":"2026-01-01T00:00:00Z","dateRangeEnd":"2026-01-01T00:00:00Z","email":"[email protected]","errors":[],"extensions":[],"extraContactInfo":"Example","orgName":"Example","policyAdkim":"relaxed","policyAspf":"relaxed","policyDisposition":"none","policyDomain":"Example","policyFailureReportingOptions":[],"policySubdomainDisposition":"none","policyTestingMode":false,"policyVersion":"Example","records":[],"reportId":"Example","version":1.0}' \
--field subject=Example \
--field 'to=[]' \
--field receivedAt=2026-01-01T00:00:00Z \
--field expiresAt=2026-01-01T00:00:00Z \
--field 'memberTenantId=<Tenant id>'

Query

stalwart-cli query dmarc-external-report
stalwart-cli query dmarc-external-report --where domain=example

Update

stalwart-cli update dmarc-external-report id1 --field description='Updated'

Delete

stalwart-cli delete dmarc-external-report --ids id1

Nested types

DmarcReport

Content of a DMARC aggregate report.

version

Type: Float · default: 1.0

DMARC report format version

orgName

Type: String · required

Name of the organization that generated the report

email

Type: EmailAddress · required

Contact email address of the reporting organization

extraContactInfo

Type: String?

Additional contact information for the reporting organization

reportId

Type: String · required

Unique identifier for this report

dateRangeBegin

Type: UTCDateTime · required

Start of the reporting period

dateRangeEnd

Type: UTCDateTime · required

End of the reporting period

errors

Type: String[]

Errors encountered during report generation

policyDomain

Type: String · required

Domain for which the DMARC policy is published

policyVersion

Type: String?

Version of the published DMARC policy

policyAdkim

Type: DmarcAlignment · required

DKIM alignment mode specified in the policy

policyAspf

Type: DmarcAlignment · required

SPF alignment mode specified in the policy

policyDisposition

Type: DmarcDisposition · required

Requested handling policy for failing messages

policySubdomainDisposition

Type: DmarcDisposition · required

Requested handling policy for failing messages from subdomains

policyTestingMode

Type: Boolean · default: false

Whether the policy is in testing mode (pct < 100)

policyFailureReportingOptions

Type: FailureReportingOption[]

Conditions under which failure reports should be generated

records

Type: DmarcReportRecord[]

Aggregated authentication results grouped by source

extensions

Type: DmarcExtension[]

Custom vendor-specific extensions to the report

DmarcReportRecord

An aggregated authentication result record from a single source.

sourceIp

Type: IpAddr?

IP address of the sending mail server

count

Type: UnsignedInt · default: 0

Number of messages from this source matching this result

evaluatedDisposition

Type: DmarcActionDisposition · required

Action taken on the messages

evaluatedDkim

Type: DmarcResult · required

DMARC result based on DKIM authentication

evaluatedSpf

Type: DmarcResult · required

DMARC result based on SPF authentication

policyOverrideReasons

Type: DmarcPolicyOverrideReason[]

Reasons why the evaluated disposition differs from the published policy

envelopeTo

Type: String?

Envelope recipient domain

envelopeFrom

Type: String · required

Envelope sender domain (MAIL FROM)

headerFrom

Type: String · required

Domain from the message From header

dkimResults

Type: DmarcDkimResult[]

DKIM authentication results for the messages

spfResults

Type: DmarcSpfResult[]

SPF authentication results for the messages

extensions

Type: DmarcExtension[]

Custom vendor-specific extensions to this record

DmarcPolicyOverrideReason

Reason for a DMARC policy override.

overrideType

Type: DmarcPolicyOverride · required

Type of policy override applied

comment

Type: String?

Additional explanation for the override

DmarcDkimResult

DKIM authentication result within a DMARC report record.

domain

Type: DomainName · required

Domain that signed the message

selector

Type: String · required

DKIM selector used for signing

result

Type: DkimAuthResult · required

DKIM verification result

humanResult

Type: String?

Human-readable explanation of the result

DmarcSpfResult

SPF authentication result within a DMARC report record.

domain

Type: DomainName · required

Domain checked for SPF

scope

Type: SpfDomainScope · required

Which identity was checked

result

Type: SpfAuthResult · required

SPF verification result

humanResult

Type: String?

Human-readable explanation of the result

DmarcExtension

A vendor-specific extension in a DMARC report.

name

Type: String · required

Extension identifier

definition

Type: String · required

Extension content or value

Enums

DmarcAlignment

ValueLabel
relaxedOrganizational domain match is sufficient
strictExact domain match is required
unspecifiedAlignment mode not specified

DmarcDisposition

ValueLabel
noneNo specific action requested
quarantineTreat failing messages as suspicious
rejectReject failing messages
unspecifiedDisposition not specified

FailureReportingOption

ValueLabel
allGenerate report if all authentication mechanisms fail
anyGenerate report if any authentication mechanism fails
dkimFailureGenerate report if DKIM authentication fails
spfFailureGenerate report if SPF authentication fails

DmarcActionDisposition

ValueLabel
noneNo action taken
passMessage passed evaluation
quarantineMessage was quarantined
rejectMessage was rejected
unspecifiedDisposition not specified

DmarcResult

ValueLabel
passAuthentication passed
failAuthentication failed
unspecifiedResult not specified

DmarcPolicyOverride

ValueLabel
ForwardedMessage was forwarded
SampledOutMessage was excluded by policy sampling (pct)
TrustedForwarderMessage came from a trusted forwarder
MailingListMessage came from a mailing list
LocalPolicyLocal policy override was applied
OtherOther reason for override

DkimAuthResult

ValueLabel
noneNo DKIM signature present
passDKIM signature verified successfully
failDKIM signature verification failed
policyDKIM signature not accepted due to policy
neutralDKIM verification returned neutral
tempErrorTemporary error during verification
permErrorPermanent error in DKIM record or signature

SpfDomainScope

ValueLabel
heloSPF check performed on HELO/EHLO identity
mailFromSPF check performed on MAIL FROM identity
unspecifiedScope not specified

SpfAuthResult

ValueLabel
noneNo SPF record found
neutralSPF record returned neutral
passSPF check passed
failSPF check failed (hard fail)
softFailSPF check returned soft fail
tempErrorTemporary error during SPF check
permErrorPermanent error in SPF record