Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation

Check and Repair the Exim Configuration — exim_configuration_check

This function will check and, if it encounters any errors, attempt to repair your Exim configuration.

Calling Functions

Using the XML API

To use the XML API to perform the exim_configuration_check function from within your custom script:

  • Append the /xml-api/exim_configuration_check function call name, plus the required variables (see below), to a URL which includes the address of your server.

  • For example, on a server whose hostname is example.com, you would include the following string in your script: https://example.com:2087/xml-api/exim_configuration_check

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Using the JSON API

To use the JSON API to perform the exim_configuration_check function from within your custom script:

  • Append the /json-api/exim_configuration_check function call name, plus the required variables (see below), to a URL which includes the address of your server.

  • For example, on a server whose hostname is example.com, you would include the following string in your script: https://example.com:2087/json-api/exim_configuration_check

  • You need to be logged in with the proper permissions in order to call a function. See our document about Authenticating API Function Calls for more information about authenticating APIs from within a script.

  • You can also perform the function by entering the string in your web browser's address bar. This may be useful for testing the function call and viewing its output.

Variables

Input

None

Output

  • exim_configurationi_check — The function's results container.
    • message (string) — The specific reason the configuration check failed. This output parameter only contains a message if the configuration fails the check.
    • status (boolean) — A boolean value that indicates success or failure. A value of 1 indicates success.
    • statusmsg (string) — A message of success or a reason for failure.

Examples

XML API

Calling the URL https://example.com:2087/xml-api/exim_configuration_check in WebHost Manager will produce output similar to:

<exim_configuration_check>
	<message/>
	<status>1</status>
	<statusmsg>Configuration OK</statusmsg>
</exim_configuration_check>

JSON API

Calling the URL https://example.com:2087/json-api/exim_configuration_check in WebHost Manager will produce output similar to:

{
   "status":1,
   "message":null,
   "statusmsg":"Configuration OK"
}

Topic revision: r1 - 14 Feb 2012 - 21:51:31 - Main.JustinSchaefer