Child pages
  • WHM API 1 Functions - cpgreylist_untrust_entries_for_common_mail_provider

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt
This function marks the IP addresses for the specified mail provider as not trusted.
 Greylisting defers emails from non-trusted IP addresses.

 

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleJSON API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/cpgreylist_untrust_entries_for_common_mail_provider?api.version=1&provider=cpanel&provider-0=dpanel
Expand
titleXML API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/cpgreylist_untrust_entries_for_common_mail_provider?api.version=1&provider=cpanel&provider-0=dpanel
Expand
titleCommand Line
Code Block
languagebash
whmapi1 cpgreylist_untrust_entries_for_common_mail_provider provider=cpanel provider-0=dpanel

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{
  "data": {
    "providers_untrusted": {
      "cpanel": {
        "ips_untrusted": 21
      }
    },
    "providers_failed": {
      "dpanel": "Unknown mail provider: dpanel\n"
    }
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "cpgreylist_untrust_entries_for_common_mail_provider"
  }
}
Expand
titleOutput (XML)
Code Block
languagetext
linenumberstrue
<result>
    <data>
        <providers_untrusted>
            <cpanel>
                <ips_untrusted>21</ips_trusted>
            </cpanel>
        </providers_untrusted>
        <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>

Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

Parameters

ParameterTypeDescriptionPossible valuesExample
providerstring

Required.

The mail provider.

Note
titleNote:

To trust multiple mail providers, increment the parameter name (for example, provider-0, provider-1, 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_untrustedhashA hash of the mail providers that Greylisting does not trust.This hash includes the provider_key return. 

provider_key

hash

A hash of the mail provider's data.

Note
titleNote:

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

The function returns this hash in the providers_untrusted hash.

This hash includes the ips_untrusted return.

 

ips_untrusted

integer

The total number of the mail provider's IP addresses that Greylisting does not trust.

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 change for a provider failed.

Note
titleNote:

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.