send¶
Manage mail sending policies.
read¶
The read API requires an action
field:
configuration
list
check-credentials
Input¶
configuration¶
Return current global configuration.
Input example:
{
"action": "configuration"
}
list¶
Return the list of current configured smarthost (except the default one):
Input example:
{
"action": "list"
}
check-credentials¶
Check cre
{
"action": "check-credentials",
"Host": "my.remotehost.com",
"Password": "Nethesis,1234",
"Username": "giacomo",
"Port": "587"
}
Output¶
configuration¶
Output example:
{
"AccessBypassList": [
"1.2.3.4"
],
"SenderValidation": "disabled",
"AccessPoliciesSmtpauth": "enabled",
"AccessPoliciesTrustednetworks": "disabled",
"HeloHost": ""
}
list¶
List configured smarthosts per sender.
Example:
{
"smarthosts": [
{
"props": {
"Password": "mypass",
"TlsStatus": "enabled",
"Username": "test1",
"status": "enabled",
"Port": "587",
"Host": "localhost"
},
"name": "test1@nethserver.org",
"type": "sender"
},
...
]
}
check-credentials¶
Return standard success or error message.
Example:
{
"action": "check-credentials",
"Username": "myuser",
"Password": "mypass",
"Host": "localhost",
"TlsStatus": "disabled",
"Port": "587"
}
validate¶
Valid actions:
configuration
: validate global configurationupdate
: update an existing smart hostcreate
: create a new smart host
Constraints¶
Constraints for configuration
action:
- AccessBypassList: a list of valid mail IP address or empty
- AccessPoliciesSmtpauth SenderValidation AccessPoliciesTrustednetworks: can be
enabled
ordisabled
- HeloHost: a valid FQDN or empty
Constraints for update
action:
- name: must be an existing key, it can be a valid mail address or a domain starting with "@" symbol
- Host: valid hostname
- Port: valid port
- TlsStatus: can be
enabled
ordisabled
Constraints for create
action:
- name: must be a non-existing key, it can be a valid mail address or a domain starting with "@" symbol
- Host: valid hostname
- Port: valid port
- TlsStatus: can be
enabled
ordisabled
Input¶
configuration¶
Use tha same format as read API.
Example:
{
"AccessBypassList": [
"1.2.3.4"
],
"SenderValidation": "disabled",
"AccessPoliciesSmtpauth": "enabled",
"AccessPoliciesTrustednetworks": "disabled",
"HeloHost": "nethserver.org",
"action": "configuration"
}
update¶
Example:
{
"action": "update",
"Password": "mypass",
"TlsStatus": "enabled",
"Username": "test1",
"status": "enabled",
"Port": "587",
"Host": "smtp.test.org",
"name": "test3@nethserver.org"
}
create¶
Example:
{
"action": "create",
"Password": "mypass",
"TlsStatus": "enabled",
"Username": "test1",
"status": "enabled",
"Port": "587",
"Host": "smtp.test.org",
"name": "3@nethserver.org"
}
update¶
Same input as validate.
Extra valid actions:
enable
: enable given smarthostdisable
: disable given smarthost
Input¶
enable¶
Example:
{
"action": "enable",
"name": "sender1@nethserver.org"
}
disable¶
Example:
{
"action": "disable",
"name": "sender1@nethserver.org"
}
delete¶
Delete the given smarthost.
Example:
{
"name": "sender1@nethserver.org"
}