SpamPyzor
SpamPyzor
Section titled “SpamPyzor”Configures the Pyzor collaborative spam detection service.
This object can be configured from the WebUI under Settings › Spam Filter › Pyzor
Fields
Section titled “Fields”blockCount
Section titled “blockCount”Type:
UnsignedInt· default:5· max: 1000 · min: 1The number of times the hash appears in the Pyzor blocklist
enable
Section titled “enable”Type:
Boolean· default:trueWhether to enable the Pyzor classifier. Pyzor is a collaborative, networked system to detect and report spam.
Type:
String· default:"public.pyzor.org"The hostname of the Pyzor server
Type:
UnsignedInt· default:24441· max: 65535 · min: 100The port to connect to the Pyzor server
Type:
Float· default:0.2· max: 1 · min: 0The ratio of the number of times the hash appears in the Pyzor allowlist to the blocklist
timeout
Section titled “timeout”Type:
Duration· default:"5s"The timeout for the Pyzor server. If the server does not respond within this time, the check is considered failed.
allowCount
Section titled “allowCount”Type:
UnsignedInt· default:10· max: 1000 · min: 1The number of times the hash appears in the Pyzor allowlist
JMAP API
Section titled “JMAP API”The SpamPyzor singleton is available via the urn:stalwart:jmap capability.
x:SpamPyzor/get
Section titled “x:SpamPyzor/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
For singletons, the ids argument should be the literal singleton (or null to return the single instance).
This method requires the sysSpamPyzorGet permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SpamPyzor/get", { "ids": [ "singleton" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:SpamPyzor/set
Section titled “x:SpamPyzor/set”This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.
This method requires the sysSpamPyzorUpdate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:SpamPyzor/set", { "update": { "singleton": { "host": "updated value" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get SpamPyzorUpdate
Section titled “Update”stalwart-cli update SpamPyzor --field host='updated value'