Update thresholds

Update per-domain antispam thresholds

  • HTTP Method: PUT
  • URL: https://example.domain.tld/api/v1/antispam/thresholds/domain/<domain>/
  • Require authentication: Yes
  • Permission level required: MasterAdmin / DomainAdmin

Path parameters

Parameter Type Description Required
domain str Domain name Required

Request parameters

Parameter Type Description Required
reject int Score at which message is rejected Required
add_header int Score at which X-Spam header is added (used for sieving to junk folder) Required
greylist int Score at which message is deferred (greylisted) Required

Response parameters

Parameter Type Description
domain str Domain name
scores dict The threshold scores object
add_header int Score at which X-Spam header is added (used for sieving to junk folder)
greylist int Score at which message is deferred (greylisted)
reject int Score at which message is rejected
status str Status

Example request (Python)

import requests
import json
from pprint import pprint

url = "https://example.domain.tld/api/v1/antispam/thresholds/domain/vonmail.com/"
data = {
"reject" : 50,
"add_header" : 6,
"greylist" : 4
}
r = requests.put(url, json=data, auth=("admin","long-auth_token-here"))
try:
    pprint(r.json())
except: 
    print(r.text)

Example response (JSON)

{'domain': 'vonmail.com',
 'scores': {'add_header': 6, 'greylist': 4, 'reject': 50},
 'status': 'applying'}