Skip to content

NetworkListener

Defines a network listener for accepting incoming connections.

This object can be configured from the WebUI under Settings › Network › Listeners

Type: String · read-only

Unique identifier for the listener

Type: SocketAddr[] · min items: 1

The addresses the listener will bind to

Type: NetworkListenerProtocol · default: "smtp"

The protocol used by the listener

Type: IpMask[]

Enable proxy protocol for connections from these networks

Type: UnsignedInt? · default: 1024 · min: 1

The maximum number of incoming connections that can be pending in the backlog queue

Type: Boolean · default: true

Whether the Nagle algorithm should be disabled for the socket

Type: UnsignedInt? · min: 1

The size of the buffer used for receiving data

Type: Boolean · default: true

Whether the socket can be bound to an address that is already in use by another socket

Type: Boolean · default: true

Whether multiple sockets can be bound to the same address and port

Type: UnsignedInt? · min: 1

The size of the buffer used for sending data

Type: UnsignedInt? · min: 1

The type of service (TOS) value for the socket, which determines the priority of the traffic sent through the socket

Type: UnsignedInt? · min: 1

Time-to-live (TTL) value for the socket, which determines how many hops a packet can make before it is discarded

Type: Boolean · default: true

Whether to enable TLS for this listener

Type: TlsCipherSuite[]

Which cipher suites to disable

Type: TlsVersion[]

Which TLS protocols to disable

Type: Boolean · default: true

Whether to ignore the client’s cipher order

Type: Boolean · default: false

Whether to use implicit TLS

Type: Duration? · default: "1m"

TLS handshake timeout

Type: UnsignedInt? · default: 8192 · min: 1

The maximum number of concurrent connections the listener will accept

The NetworkListener 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 sysNetworkListenerGet permission.

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

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:NetworkListener/set",
{
"create": {
"new1": {
"bind": {},
"overrideProxyTrustedNetworks": {},
"tlsDisableCipherSuites": {},
"tlsDisableProtocols": {}
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This operation requires the sysNetworkListenerUpdate permission.

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

This operation requires the sysNetworkListenerDestroy permission.

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

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

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

ConditionKind
nametext

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

Terminal window
stalwart-cli get NetworkListener id1
Terminal window
stalwart-cli create NetworkListener \
--field 'bind={}' \
--field 'overrideProxyTrustedNetworks={}' \
--field 'tlsDisableCipherSuites={}' \
--field 'tlsDisableProtocols={}'
Terminal window
stalwart-cli query NetworkListener
stalwart-cli query NetworkListener --where name=example
Terminal window
stalwart-cli update NetworkListener id1 --field bind='{}'
Terminal window
stalwart-cli delete NetworkListener --ids id1
ValueLabel
smtpSMTP
lmtpLMTP
httpHTTP
imapIMAP4
pop3POP3
manageSieveManageSieve
ValueLabel
tls13-aes-256-gcm-sha384TLS1.3 AES256 GCM SHA384
tls13-aes-128-gcm-sha256TLS1.3 AES128 GCM SHA256
tls13-chacha20-poly1305-sha256TLS1.3 CHACHA20 POLY1305 SHA256
tls-ecdhe-ecdsa-with-aes-256-gcm-sha384ECDHE ECDSA AES256 GCM SHA384
tls-ecdhe-ecdsa-with-aes-128-gcm-sha256ECDHE ECDSA AES128 GCM SHA256
tls-ecdhe-ecdsa-with-chacha20-poly1305-sha256ECDHE ECDSA CHACHA20 POLY1305 SHA256
tls-ecdhe-rsa-with-aes-256-gcm-sha384ECDHE RSA AES256 GCM SHA384
tls-ecdhe-rsa-with-aes-128-gcm-sha256ECDHE RSA AES128 GCM SHA256
tls-ecdhe-rsa-with-chacha20-poly1305-sha256ECDHE RSA CHACHA20 POLY1305 SHA256
ValueLabel
tls12TLS version 1.2
tls13TLS version 1.3