Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function sets whether Greylisting trusts new entries to cPanel's common mail providers list.

Examples 


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

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. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
  "data": {
    "common_mail_providers": {
      "google": {
        "is_trusted": 1,
        "display_name": "Google",
        "autoupdate": 0
      },
      "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": 0
      }
    },
    "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>0</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>0</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

ParameterTypeDescriptionPossible valuesExample
autotrust_new_common_mail_providersBoolean

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

  • 1 — Enabled.
  • 0 — Disabled.
1
provider_keyBoolean

Whether Greylisting automatically trusts new IP addresses that cPanel adds to this mail provider.

Note:

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


  • 1 — Enabled.
  • 0 — Disabled.
0

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 value 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 — Trusts.
  • 0 — Does not trust.
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 to this mail provider.

The function returns this value in the provider_key hash.

  • 1 — Trusts.
  • 0 — Does not trust.
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 — Trusts.
  • 0 — Does not trust.
1