AllowedIp
Defines an allowed IP address or network range.
This object can be configured from the WebUI under Settings › Security › Allowed IPs
Fields
address
Type:
IpMask· read-onlyThe IP address or mask to allow
reason
Type:
String?The reason for allowing this IP address
createdAt
Type:
UTCDateTime· read-onlyThe date and time when this IP address was allowed
expiresAt
Type:
UTCDateTime?The date and time when this IP address allowance will expire
JMAP API
The AllowedIp object is available via the urn:stalwart:jmap capability.
x:AllowedIp/get
This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysAllowedIpGet permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:AllowedIp/get",
{
"ids": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:AllowedIp/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 sysAllowedIpCreate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:AllowedIp/set",
{
"create": {
"new1": {
"expiresAt": "2026-01-01T00:00:00Z",
"reason": "Example"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Update
This operation requires the sysAllowedIpUpdate permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:AllowedIp/set",
{
"update": {
"id1": {
"reason": "updated value"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
Destroy
This operation requires the sysAllowedIpDestroy permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:AllowedIp/set",
{
"destroy": [
"id1"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
x:AllowedIp/query
This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysAllowedIpQuery permission.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:AllowedIp/query",
{
"filter": {
"address": "example"
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
The x:AllowedIp/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):
| Condition | Kind |
|---|---|
address | text |
CLI
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
Fetch
stalwart-cli get allowed-ip id1
Create
stalwart-cli create allowed-ip \
--field reason=Example \
--field expiresAt=2026-01-01T00:00:00Z
Query
stalwart-cli query allowed-ip
stalwart-cli query allowed-ip --where address=example
Update
stalwart-cli update allowed-ip id1 --field description='Updated'
Delete
stalwart-cli delete allowed-ip --ids id1