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

 

Description

This function lists Greylisting's deferred triplets. Greylisting identifies incoming email by triplets. A triplet is a collection of three pieces of data: the IP address, the sender's address, and the recipient's address.

Examples 


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


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": {
    "total_rows": 3,
    "limit": 20,
    "server_tzoffset": 60,
    "server_timezone": CDT
    "greylist_deferred_entries": [
      {
        "accepted_count": 0,
        "create_time": "2015-03-23 11:59:32",
        "from_addr": "fromaddress1@example.com",
        "block_exp_time": "2015-03-23 12:09:32",
        "record_exp_time": "2015-03-26 11:59:32",
        "to_addr": "toaddress1.com",
        "must_retry_by": "2015-03-23 15:59:32",
        "sender_ip": "97.215.255.29",
        "deferred_count": 1,
        "id": 43
      },
      {
        "accepted_count": 0,
        "create_time": "2015-03-23 11:59:32",
        "from_addr": "fromaddress2.com@example.com",
        "block_exp_time": "2015-03-23 12:09:32",
        "record_exp_time": "2015-03-26 11:59:32",
        "to_addr": "toaddress2.com@example.com",
        "must_retry_by": "2015-03-23 15:59:32",
        "sender_ip": "74.145.61.223",
        "deferred_count": 1,
        "id": 44
      },
      {
        "accepted_count": 0,
        "create_time": "2015-03-23 11:59:32",
        "from_addr": "fromaddress3.com@example.com",
        "block_exp_time": "2015-03-23 12:09:32",
        "record_exp_time": "2015-03-26 11:59:32",
        "to_addr": "toaddress3.com@example.com",
        "must_retry_by": "2015-03-23 15:59:32",
        "sender_ip": "17.19.204.252",
        "deferred_count": 1,
        "id": 45
      }
    ],
    "offset": 0
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "read_cpgreylist_deferred_entries"
  }
}
 Output (XML)
<result>
    <data>
        <total_rows>3</total_rows>
        <limit>20</limit>
        <server_tzoffset>60</server_tzoffset>
        <server_timezone>CDT</server_timezone>
        <greylist_deferred_entries>
            <accepted_count>0</accepted_count>
            <create_time>2015-03-23 11:59:32</create_time>
            <from_addr>
                fromaddress1.com@example.com
            </from_addr>
            <block_exp_time>2015-03-23 12:09:32</block_exp_time>
            <record_exp_time>2015-03-26 11:59:32</record_exp_time>
            <to_addr>
                toaddress1.com@example.com
            </to_addr>
            <must_retry_by>2015-03-23 15:59:32</must_retry_by>
            <sender_ip>97.215.255.29</sender_ip>
            <deferred_count>1</deferred_count>
            <id>43</id>
        </greylist_deferred_entries>
<greylist_deferred_entries>
            <accepted_count>0</accepted_count>
            <create_time>2015-03-23 11:59:32</create_time>
            <from_addr>
                fromaddress2.com@example.com
            </from_addr>
            <block_exp_time>2015-03-23 12:09:32</block_exp_time>
            <record_exp_time>2015-03-26 11:59:32</record_exp_time>
            <to_addr>
                toaddress2.com@example.com
            </to_addr>
            <must_retry_by>2015-03-23 15:59:32</must_retry_by>
            <sender_ip>97.215.255.29</sender_ip>
            <deferred_count>1</deferred_count>
            <id>44</id>
        </greylist_deferred_entries>
<greylist_deferred_entries>
            <accepted_count>0</accepted_count>
            <create_time>2015-03-23 11:59:32</create_time>
            <from_addr>
                fromaddress3.com@example.com
            </from_addr>
            <block_exp_time>2015-03-23 12:09:32</block_exp_time>
            <record_exp_time>2015-03-26 11:59:32</record_exp_time>
            <to_addr>
                toaddress3.com@example.com
            </to_addr>
            <must_retry_by>2015-03-23 15:59:32</must_retry_by>
            <sender_ip>97.215.255.29</sender_ip>
            <deferred_count>1</deferred_count>
            <id>45</id>
        </greylist_deferred_entries>
        <offset>0</offset>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>read_cpgreylist_deferred_entries</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
total_rowsintegerThe total number of triplets in the database.A valid integer.
3

limit

integerThe number of triplets in the interface.A valid integer.
20

server_tzoffset

integer

The time zone offset in minutes.

A valid time zone bias, in minutes difference from UTC/GMT.60

server_timezone

string

The server time zone abbreviation.

The standard letter code abbreviation for the time zone.CDT
greylist_deferred_entrieshashA hash of deferred triplet data.This hash includes the accepted_count,   create_time,   from_addr,   block_exp_time,   record_exp_time, to_addr, must_retry_by, sender_ip, deferred_count,  and id returns. 

accepted_count

integer

The number of times that Greylisting accepted the triplet.

The function returns this value in the greylist_deferred_entries hash.

A valid integer.
0

create_time

string

The date and time when Greylisting created the triplet.

The function returns this value in the greylist_deferred_entries hash.

The date and time in Day YYYY-MM-DD HH:mm:SS format, where:

  • YYYY represents the year.
  • MM represents the month.
  • DD represents the date.
  • HH represents the hour.
  • mm represents the minute.
  • SS represents the second.
2015-03-23 11:59:32

from_addr

string

The email address that the system identified as the triplet's sender.

The function returns this value in the greylist_deferred_entries hash.

A valid email address.
fromaddress1.com@example.com

block_exp_time

string

The date and time when Greylisting will no longer defer the triplet.

The function returns this value in the greylist_deferred_entries hash.

The date and time in YYYY-MM-DD HH:mm:SS format, where:

  • YYYY represents the year.
  • MM represents the month.
  • DD represents the date.
  • HH represents the hour.
  • mm represents the minute.
  • SS represents the second.
2015-03-23 12:09:32

record_exp_time

string

The date and time when Greylisting will purge the triplet from the database.

The function returns this value in the greylist_deferred_entries hash.

The date and time in YYYY-MM-DD HH:mm:SS format, where:

  • YYYY represents the year.
  • MM represents the month.
  • DD represents the date.
  • HH represents the hour.
  • mm represents the minute.
  • SS represents the second.
2015-03-26 11:59:32

to_addr

string

The email address that the system identified as the triplet's recipient.

The function returns this value in the greylist_deferred_entries hash.

A valid email address.
toaddress1.com@example.com

must_retry_by

string

The date and time when Greylisting will no longer accept the resent triplet.

The function returns this value in the greylist_deferred_entries hash.

The date and time in YYYY-MM-DD HH:mm:SS format, where:

  • YYYY represents the year.
  • MM represents the month.
  • DD represents the date.
  • HH represents the hour.
  • mm represents the minute.
  • SS represents the second.
2015-03-23 15:59:32

sender_ip

string

The IP address that the system identified as the triplet's sender.

The function returns this value in the greylist_deferred_entries hash.

A valid IP address.
97.215.255.29

deferred_count

integer

The number of times Greylisting deferred the triplet.

The function returns this value in the greylist_deferred_entries hash.

A valid integer.
1

id

integer

The identification number that the system assigned to the triplet.

The function returns this value in the greylist_deferred_entries hash.

A valid integer.
45