/mail/settings
0.2.0Unchanged since publicationSave one or more mail settings together
mailallOnly administrators can call this operation. The token must have the mail scope. UrbeStack returns 400 if settings is missing, is empty, is not an object, or contains a key with an invalid format. Use the urbestack-mail-smarthost-set command to update mail.smarthost.
UrbeStack validates each setting, generates the mail configuration once, and runs one round of checks using postfix check, doveconf, rspamadm configtest, and webmail PHP-FPM. If all checks pass, UrbeStack reloads the affected daemons in one pass and returns 200 with the stored settings and details of the configuration changes and reloads.
If a configuration check fails, UrbeStack returns the check output and rolls back the entire save. It restores the previous settings and configuration files without reloading the daemons.
As a command
Run as root on the serverRequest body
JSON· 1 fieldsettingsobjectRequiredExample
See the API overview for how to set $API and $TOKEN.curl -sS -X POST "$API/mail/settings" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"settings": {}
}'200 OK{
"mail": {},
"settings": {}
}Errors
34 errors, each a status and a sentence400'<zone>' is not a zone this machine knows: timedatectl list-timezones names them400--set wants KEY=VALUE, not '<pair>'400<k> is not a mail setting400<key> is not a mail setting saved here400<what> must be text without control characters, 1 to <max> characters400A new job is queued or running400Domain name required400Domain name too long400Invalid IPv4 address400Invalid IPv6 address400Invalid domain name400Invalid port400Invalid setting key400Job parameters must be an object400No setting was given400PHP <version> cannot be the default: it is hidden from new choices on this server400PHP <version> cannot be the default: it is not installed on this server400Standard input must hold a JSON object of key to value400Unknown job type400Unknown setting '<key>'400jobs.keep_days (<keep>) may not be smaller than jobs.show_days (<show>): a job cannot be shown longer than it is kept; 0 keeps them for good400settings must be an object of mail.* keys to values401Authentication required404Setting '<key>' not found409<key> cannot take that value: <SECOND>{<k>}{on} <sp> (<k>). <SECOND>{<k>}{move}, or choose another409<key> cannot take that value: the panel listens on port <port> (panel.port). Move the panel first, or choose another409<s.subject> cannot take port <port>: 409<s.subject> cannot take port <port>: <why>409<s.subject> cannot take port <port>: it is the panel's port (panel.port)409A change is already armed for revert (409Sharing is required with this license.409The panel cannot take port <port>: 409The panel cannot take port <port>: <why>409These are the nameservers of a distribution network with several nodes, and every node lists the same ones. To remove a nameserver or move it to another node, use the actions beside its name on DNS zones › Nameservers & addresses, or urbestack-dns-nameserverurbestack.com/docs/api/post-mail-settings/