The deny rules allow you to setup assorted types of rules which will automatically deny the email from being sent through our system when the citeria match.
Adds a new email deny rule into the system to block new emails that match the given criteria
Body
Required
These are the fields needed to create a new email deny rule.
-
Mail account username that will be tied to this rule. If not specified the first active mail order will be used.
-
The type of deny rule.
Values are
domain,email,startswith, ordestination. -
The content of the rule. If a domain type rule then an example would be google.com. For a begins with type an example would be msgid-. For the email typer an example would be user@server.com.
Body
Required
These are the fields needed to create a new email deny rule.
-
Mail account username that will be tied to this rule. If not specified the first active mail order will be used.
-
The type of deny rule.
Values are
domain,email,startswith, ordestination. -
The content of the rule. If a domain type rule then an example would be google.com. For a begins with type an example would be msgid-. For the email typer an example would be user@server.com.
curl \
--request POST 'https://my.interserver.net/apiv2/mail/{id}/rules' \
--header "X-API-KEY: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"data":"domeinwo@server.guesshost.net","type":"email","user":"mb20682"}'
curl \
--request POST 'https://my.interserver.net/apiv2/mail/{id}/rules' \
--header "X-API-KEY: $API_KEY" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'data=domeinwo%40server.guesshost.net&type=email&user=mb20682'
{
"data": "domeinwo@server.guesshost.net",
"type": "email",
"user": "mb20682"
}
{"data" => "domeinwo@server.guesshost.net", "type" => "email", "user" => "mb20682"}
{
"text": "The command completed successfully.",
"status": "ok"
}
{
"code": "string",
"message": "string"
}
{
"code": "string",
"message": "string"
}
{
"code": "string",
"message": "string"
}