Skip to content

MailingList

Defines a mailing list that distributes messages to a group of recipients.

This object can be configured from the WebUI under Management › Directory › Mailing Lists

Type: EmailLocalPart · required

Name of the mailing list, typically an email address local part.

Type: Id<Domain> · required

Identifier for the domain this mailing list belongs to. This is used to determine the email address of the mailing list, which is formed as name@domain.

Type: EmailAddress · server-set

The email address of the mailing list, formed as name@domain.

Type: String?

Description of the mailing list

Type: EmailAlias[]

List of email aliases for the mailing list

Type: Id<Tenant>?

Identifier for the tenant this mailing list belongs to

Type: EmailAddress[]

List of email addresses that are members of the mailing list

The MailingList 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 sysMailingListGet permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MailingList/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 sysMailingListCreate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MailingList/set",
{
"create": {
"new1": {
"aliases": {},
"domainId": "<Domain id>",
"name": "alice",
"recipients": {}
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This operation requires the sysMailingListUpdate permission.

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

This operation requires the sysMailingListDestroy permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:MailingList/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 sysMailingListQuery permission.

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

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

ConditionKind
texttext
memberTenantIdid of Tenant

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

Terminal window
stalwart-cli get MailingList id1
Terminal window
stalwart-cli create MailingList \
--field name=alice \
--field 'domainId=<Domain id>' \
--field 'aliases={}' \
--field 'recipients={}'
Terminal window
stalwart-cli query MailingList
stalwart-cli query MailingList --where text=example
Terminal window
stalwart-cli update MailingList id1 --field description='updated value'
Terminal window
stalwart-cli delete MailingList --ids id1

Defines an email alias for an account or mailing list.

Type: Boolean · default: true

Whether this email alias is enabled

Type: EmailLocalPart · required

The local part of the email alias (the part before the @ symbol)

Type: Id<Domain> · required

Identifier for the domain of the email alias (the part after the @ symbol).

Type: String?

Description of the email alias