Child pages
  • WHM API 1 Functions - validate_current_dkims

Versions Compared

Key

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

Description

Excerpt
This function retrieves and checks the Domain Keys Identified Mail (DKIM) records for one or more domains.

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledSendMailRoleNonVersion
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagetext
https://hostname.example.com:2087/cpsess##########/json-api/validate_current_dkims?api.version=1&domain=example.com

Include Page
LIB:_CallUAPIFromBrowserLink
LIB:_CallUAPIFromBrowserLink


Expand
titleCommand Line


Code Block
languagebash
whmapi1 validate_current_dkims domain=example.com

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagebash
linenumberstrue
{  
   "data":{  
      "payload":[  
         {  
            "state": "VALID",
			"validity_cache_update": "valid",
            "expected": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDw5nw4NP1RsWXlfmiMzByDfOT16QCZO\/xJtrPZKskZF8\/sU0zWGTqKUOErlyJfoJzMDUv3\/zzjGswc2nEmYqxxoQZaBkN4QaS6MvJQxysAr+sK8C248\/r9zMperQdhJedUVejtpFQHJwgqpHy1tQMxY37L7sQjdxmQ5WnQ1acXiwIDAQAB\\",
            "domain": "default._domainkey.example.com",
            "records": [
                {
                    "state": "VALID",
                    "current": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDw5nw4NP1RsWXlfmiMzByDfOT16QCZO\/xJtrPZKskZF8\/sU0zWGTqKUOErlyJfoJzMDUv3\/zzjGswc2nEmYqxxoQZaBkN4QaS6MvJQxysAr+sK8C248\/r9zMperQdhJedUVejtpFQHJwgqpHy1tQMxY37L7sQjdxmQ5WnQ1acXiwIDAQAB\\"
                }
            ]
        }
    ],
    "metadata": {
       "command": "validate_current_dkims",
	   "reason": "OK",
	   "version": 1,
	   "result": 1
    }
  }
}


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

Required

The domain for which to check the DKIM records.

Note
titleNote:

To validate multiple domains, duplicate the parameter. For example, use the domain=example.com, domain=example1.com, and domain=example2.com parameters.


A valid domain that exists on the server.example.com

Returns

ReturnTypeDescriptionPossible valuesExample
payloadarray of hashes

An array that contains information about the domain's DKIM records.

Each hash contains the domain, state, expected, and validity_cache_update returns, and the records array of hashes.

                

domain

string

The domain that the function used to check the DKIM record.

This function returns this value in the payload array.

The value of the domain parameter with a default._domainkey prefix.

default._domainkey.example.com

state

string

The domain's DKIM record status.

This function returns this value in the payload array.

  • VALID — The DKIM record is valid.
  • MALFORMED — A single DKIM record exists, but the record does not match the expected DKIM specifications.
  • MISMATCH — A DKIM record exists, but it does not match the expected public key.
  • MISSING — No DKIM record exists for the domain.
  • MULTIPLE — Multiple DKIM records exist.
  • NOPUB — No key exists on the local server for the domain.
VALID

expected

string

The DKIM record's contents.

This function returns this value in the payload array.

A valid string.


Expand
titleClick to view...
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDw5nw4NP1RsWXlfmiMzByDfOT16QCZO\/xJtrPZKskZF8\/sU0zWGTqKUOErlyJfoJzMDUv3\/zzjGswc2nEmYqxxoQZaBkN4QaS6MvJQxysAr+sK8C248\/r9zMperQdhJedUVejtpFQHJwgqpHy1tQMxY37L7sQjdxmQ5WnQ1acXiwIDAQAB


validity_cache_update

string

The result of the DKIM record's validity cache update operation.

This function returns this value in the payload array.

  • set — The domain is invalid but passed its validity check. The validity check now passes the domain as valid.
  • valid — The domain is valid and passed its validity check. There are no changes required.
  • none — The domain is invalid but the system will not take further action.
  • error — The domain's validity check operation failed.
valid

records

array of hashes

The domain's DNS DKIM TXT records.

This function returns this value in the payload array.

Each hash contains the current and state returns.

current

string

The domain's DKIM TXT record data contents.

This function returns this value in the records array.

The full contents of the domain's DKIM TXT record.


Expand
titleClick to view...
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDw5nw4NP1RsWXlfmiMzByDfOT16QCZO\/xJtrPZKskZF8\/sU0zWGTqKUOErlyJfoJzMDUv3\/zzjGswc2nEmYqxxoQZaBkN4QaS6MvJQxysAr+sK8C248\/r9zMperQdhJedUVejtpFQHJwgqpHy1tQMxY37L7sQjdxmQ5WnQ1acXiwIDAQAB


state

string

The DKIM TXT record's status.

This function returns this value in the records array.

  • VALID — The DKIM TXT record matches the local server's public key.
  • MISMATCH — The DKIM TXT record does not match the local server's public key.
  • PERMFAIL — Multiple DKIM TXT records for the domain exist or a misconfigured DKIM TXT record exists.

VALID