HttpForm
HttpForm
Section titled “HttpForm”Configures the contact form submission endpoint.
This object can be configured from the WebUI under Settings › Network › HTTP › Contact Form
Fields
Section titled “Fields”deliverTo
Section titled “deliverTo”Type:
EmailAddress[]List of local e-mail addresses to deliver the contact form to.
defaultFromAddress
Section titled “defaultFromAddress”Type:
String· default:"postmaster@localhost"The default e-mail address to use when the sender does not provide one.
fieldEmail
Section titled “fieldEmail”Type:
String?The name of the field in the contact form that contains the e-mail address of the sender.
enable
Section titled “enable”Type:
Boolean· default:falseWhether to enable contact form submissions.
fieldHoneyPot
Section titled “fieldHoneyPot”Type:
String?The name of the field in the contact form that is used as a honey pot to catch spam bots.
maxSize
Section titled “maxSize”Type:
Size· default:"100kb"Maximum size of the contact form submission in bytes.
defaultName
Section titled “defaultName”Type:
String· default:"Anonymous"The default name to use when the sender does not provide one.
fieldName
Section titled “fieldName”Type:
String?The name of the field in the contact form that contains the name of the sender.
rateLimit
Section titled “rateLimit”Type:
Rate?· default:{"count":5,"period":"1h"}Maximum number of contact form submissions that can be made in a timeframe by a given IP address.
defaultSubject
Section titled “defaultSubject”Type:
String· default:"Contact form submission"The default subject to use when the sender does not provide one.
fieldSubject
Section titled “fieldSubject”Type:
String?The name of the field in the contact form that contains the subject of the message.
validateDomain
Section titled “validateDomain”Type:
Boolean· default:trueWhether to validate the domain of the sender’s email address.
JMAP API
Section titled “JMAP API”The HttpForm singleton is available via the urn:stalwart:jmap capability.
x:HttpForm/get
Section titled “x:HttpForm/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 sysHttpFormGet permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:HttpForm/get", { "ids": [ "singleton" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:HttpForm/set
Section titled “x:HttpForm/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 sysHttpFormUpdate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:HttpForm/set", { "update": { "singleton": { "defaultFromAddress": "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 HttpFormUpdate
Section titled “Update”stalwart-cli update HttpForm --field defaultFromAddress='updated value'Nested types
Section titled “Nested types”Defines a rate limit as a count over a time period.
Type:
UnsignedInt· default:0· min: 1 · max: 1000000Count
period
Section titled “period”Type:
Duration· default:"0s"· min: 1Period