Child pages
  • WHM API 1 Functions - cpgreylist_load_common_mail_providers_config
Skip to end of metadata
Go to start of metadata

 

Description

This function returns Greylisting's list of common mail service providers.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/cpgreylist_load_common_mail_providers_config?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/cpgreylist_load_common_mail_providers_config?api.version=1
 Command Line
whmapi1 cpgreylist_load_common_mail_providers_config


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "data": {
    "common_mail_providers": {
      "google": {
        "is_trusted": 1,
        "display_name": "Google",
        "autoupdate": 1
      },
      "verizon": {
        "is_trusted": 1,
        "display_name": "Verizon",
        "autoupdate": 1
      },
      "outlook": {
        "is_trusted": 1,
        "display_name": "Outlook",
        "autoupdate": 1
      },
      "apple": {
        "is_trusted": 1,
        "display_name": "Apple",
        "autoupdate": 1
      },
      "aol": {
        "is_trusted": 1,
        "display_name": "AOL",
        "autoupdate": 1
      },
      "roadrunner": {
        "is_trusted": 1,
        "display_name": "Roadrunner",
        "autoupdate": 1
      },
      "microsoft": {
        "is_trusted": 1,
        "display_name": "Microsoft",
        "autoupdate": 1
      },
      "cpanel": {
        "is_trusted": 1,
        "display_name": "cPanel",
        "autoupdate": 1
      },
      "microsoft_eop": {
        "is_trusted": 1,
        "display_name": "Microsoft Exchange Online Protection",
        "autoupdate": 1
      },
      "office365": {
        "is_trusted": 1,
        "display_name": "Microsoft Office 365",
        "autoupdate": 1
      },
      "comcast": {
        "is_trusted": 1,
        "display_name": "Comcast",
        "autoupdate": 1
      },
      "hotmail": {
        "is_trusted": 1,
        "display_name": "Hotmail",
        "autoupdate": 1
      },
      "yahoo": {
        "is_trusted": 1,
        "display_name": "Yahoo",
        "autoupdate": 1
      }
    },
    "autotrust_new_common_mail_providers": 1
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "cpgreylist_load_common_mail_providers_config"
  }
}
 Output (XML)
<result>
    <data>
        <common_mail_providers>
            <google>
                <is_trusted>1</is_trusted>
                <display_name>Google</display_name>
                <autoupdate>1</autoupdate>
            </google>
            <verizon>
                <is_trusted>1</is_trusted>
                <display_name>Verizon</display_name>
                <autoupdate>1</autoupdate>
            </verizon>
            <outlook>
                <is_trusted>1</is_trusted>
                <display_name>Outlook</display_name>
                <autoupdate>1</autoupdate>
            </outlook>
            <apple>
                <is_trusted>1</is_trusted>
                <display_name>Apple</display_name>
                <autoupdate>1</autoupdate>
            </apple>
            <aol>
                <is_trusted>1</is_trusted>
                <display_name>AOL</display_name>
                <autoupdate>1</autoupdate>
            </aol>
            <roadrunner>
                <is_trusted>1</is_trusted>
                <display_name>Roadrunner</display_name>
                <autoupdate>1</autoupdate>
            </roadrunner>
            <microsoft>
                <is_trusted>1</is_trusted>
                <display_name>Microsoft</display_name>
                <autoupdate>1</autoupdate>
            </microsoft>
            <cpanel>
                <is_trusted>1</is_trusted>
                <display_name>cPanel</display_name>
                <autoupdate>1</autoupdate>
            </cpanel>
            <microsoft_eop>
                <is_trusted>1</is_trusted>
                <display_name>Microsoft Exchange Online Protection</display_name>
                <autoupdate>1</autoupdate>
            </microsoft_eop>
            <office365>
                <is_trusted>1</is_trusted>
                <display_name>Microsoft Office 365</display_name>
                <autoupdate>1</autoupdate>
            </office365>
            <comcast>
                <is_trusted>1</is_trusted>
                <display_name>Comcast</display_name>
                <autoupdate>1</autoupdate>
            </comcast>
            <hotmail>
                <is_trusted>1</is_trusted>
                <display_name>Hotmail</display_name>
                <autoupdate>1</autoupdate>
            </hotmail>
            <yahoo>
                <is_trusted>1</is_trusted>
                <display_name>Yahoo</display_name>
                <autoupdate>1</autoupdate>
            </yahoo>
        </common_mail_providers><autotrust_new_common_mail_providers>1</autotrust_new_common_mail_providers>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>cpgreylist_load_common_mail_providers_config</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

Return

TypeDescriptionPossible valuesExample
common_mail_providershashA hash of common mail provider settings.This hash includes the provider_key hash. 

provider_key

hash

A hash of the provider's data.

Note:

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

The function returns this hash in the common_mail_providers hash.

This hash includes the is_trusted, display_name, and autoupdate returns.

 

is_trusted

Boolean

Whether Greylisting trusts this mail provider's IP addresses.

The function returns this value in the provider_key hash.

  • 1 — Trusted.
  • 0 — Not trusted.
1

display_name

string

The mail provider's name.

The function returns this value in the provider_key hash.

A valid string.cPanel

autoupdate

Boolean

Whether Greylisting automatically trusts new IP addresses that cPanel, Inc. adds for this mail provider.

The function returns this value in the provider_key hash.

  • 1 — Enabled.
  • 0 — Disabled.
1

autotrust_new_common_mail_providers

Boolean

Whether Greylisting automatically trusts new mail providers that cPanel, Inc. adds to the common mail providers list.

  • 1 — Enabled.
  • 0 — Disabled.
1