Validate Exim configure file syntax

This function evaluates and validates an Exim configuration file's syntax.

Note:

On servers that run CentOS 7, you may see a named warning about the absence of SPF resource records on DNS.

  • This warning is not relevant on CentOS 7 servers, because RFC 7208 deprecated SPF records. CentOS 7 servers use TXT records instead of SPF records.
  • Red Hat 7.1 and CentOS 7.1 both contain bind-9.9.4-23.el7, which is an updated version of BIND that complies with RFC 7208. To resolve this issue, update your operating system to a version that contains the updated version of BIND. For more information, read the Red Hat Bugzilla case about SPF record errors.
Authorizations:
query Parameters
cfg_text
string <HTML>

The Exim configuration file's raw text.

Note:

If you do not use this parameter, the function will analyze Exim's current configuration.

Example: cfg_text=RAW_CONFIGURATION_TEXT
section
string

The Exim configuration file's section to check.

Note:

If you use this parameter, pass only the desired section to validate as the cfg_text value.

Example: section=acl

Responses

Response Schema: application/json
object or object

An object containing a valid or invalid Exim configuration information.

object

Request samples

whmapi1 --output=jsonpretty \
  validate_exim_configuration_syntax

Response samples

Content type
application/json
Example
{
  • "command": "validate_exim_configuration_syntax",
  • "data": {
    • "broken_cfg_html": "RAW_CONFIGURATION_TEXT",
    • "broken_cfg_text": "==>RAW_CONFIGURATION_TEXT<==\n",
    • "error_line": 1,
    • "error_msg": "This is an error message."
    },
  • "output": {
    • "raw": "\n"
    },
  • "reason": "OK",
  • "result": 1,
  • "version": 1
}