Add mail provider to Greylisting trusted hosts

This function marks the IP addresses for the specified mail provider as trusted. Greylisting will not defer emails from trusted IP addresses.

Authorizations:
query Parameters
provider
required
string

The mail providers’ names.

Call the cpgreylist_load_common_mail_providers_config API function to retrieve the system’s recognized provider names.

Note:

To trust multiple mail providers, increment the parameter name (for example: provider-0, provider-1, and provider-2).

Examples:
provider=provider-1=cpanel&provider-2=google
provider=cpanel

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  cpgreylist_trust_entries_for_common_mail_provider \
  provider='cpanel'

Response samples

Content type
application/json
{
  • "data": {
    • "providers_failed": {
      • "property1": "This failed because it rained.",
      • "property2": "This failed because it rained."
      },
    • "providers_trusted": {
      • "property1": {
        • "ips_trusted": 21
        },
      • "property2": {
        • "ips_trusted": 21
        }
      }
    },
  • "metadata": {
    • "command": "cpgreylist_trust_entries_for_common_mail_provider",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}