Description

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

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/cpgreylist_trust_entries_for_common_mail_provider?api.version=1&provider=cpanel&provider-0=dpanel
https://hostname.example.com:2087/cpsess##########/xml-api/cpgreylist_trust_entries_for_common_mail_provider?api.version=1&provider=cpanel&provider-0=dpanel
whmapi1 cpgreylist_trust_entries_for_common_mail_provider provider=cpanel provider-0=dpanel

{
  "data": {
    "providers_trusted": {
      "cpanel": {
        "ips_trusted": 21
      }
    },
    "providers_failed": {
      "dpanel": "Unknown mail provider: dpanel\n"
    }
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "cpgreylist_trust_entries_for_common_mail_provider"
  }
}
<result>
    <data>
        <providers_trusted>
            <cpanel>
                <ips_trusted>21</ips_trusted>
            </cpanel>
        </providers_trusted>
        <providers_failed>
            <dpanel>Unknown mail provider: dpanel\n</dpanel>
        </providers_failed>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>cpgreylist_trust_entries_for_common_mail_provider</command>
    </metadata>
</result>

Parameters

ParameterTypeDescriptionPossible valuesExample
providerstring

Required.

The mail provider.

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

Call WHM API 1's cpgreylist_load_common_mail_providers_config function to return a list of valid provider keys.

cpanel

Returns

Return

TypeDescriptionPossible valuesExample
providers_trustedhashA hash of the mail providers that Greylisting trusts.This hash includes the provider_key hash. 

provider_key

hash

A hash of the mail provider's data.

The hash's name is the mail provider's key name.

The function returns this hash in the providers_trusted hash.

This hash includes the ips_trusted return.

 

ips_trusted

integer

The total number of the mail provider's IP addresses that Greylisting trusts.

The function returns this value in the provider_key hash.

A positive integer.

21

providers_failed

hash

A hash of the mail providers that failed to update.

This hash includes the provider_key return.

 

provider_key

string

The reason why the provider failed to update.

The return's name is the mail provider's key name.

The function returns this value in the providers_failed hash.

A valid string.Unknown mail provider.