Mail Server Configuration Restore: mchk.exe

The mchk.exe utility serves to restore the mail server (MS) configuration basing on the configuration of mail system in the Parallels Plesk Panel database. The utility allows restoring mail on the level of:

Using the utility is indispensable when changing the mail server used with Parallels Plesk Panel from one to another, or when a mail server configuration is corrupt.

 

Restoring Domain Mail Configuration

Restoring MS configuration on the domain level means that, if missing, the following objects are created and properties set:

If the domain-level restoring of mail is performed with the --fix=local option specified, the following additional changes are made:

For your convenience, mchk.exe allows restoring a single domain, several domains, and all domains with one command (see the available options in the table below).

 

Restoring Global Mail Settings

Restoring global mail settings includes the following:

 

Location

%plesk_bin%

Usage

mchk.exe [option] [<param>]

 

Example

This command checks and restores the missing mail configuration data for all domains, and, if errors are found in the existing domain settings, reconfigures them:

>mchk.exe --all-domains --fix=local

 

Options

Option

Parameter

Description

Example

--domain

--domain-name=<domain name>

Checks and restores mail configuration for a single domain. (See the details above.)

To restore mail server configuration for the example.com domain:

>mchk.exe --domain --domain-name=example.com

--domains

--domain-names=<dom1[;dom2;dom3;...]>|--via-file <file>

Checks and restores mail configuration for several domains listed either right in the command line or in the plain text file specified by the --via-file option. (See the details above.)

To restore mail server configuration for the domains example.com, sample.net:

>mchk.exe --domains --domain-names-example.com;sample.net

To restore mail server configuration for the domains listed in the file restore-domains.txt located at C:\Program files\Parallels\plesk\temp\:

>mchk.exe --domains --via-file "C:\Program files\Parallels\plesk\temp\restore-domains.txt"

--all-domains

 

Checks and restores mail configuration for all domains. (See the details above.)

>mchk.exe --all-domains

--global-settings

 

Checks and restores only server-wide mail settings. (See the details above.)

>mchk.exe --global-settings

--all

 

Checks and restores server-wide mail settings and mail settings for all domains.

>mchk.exe --all

--fix=local

 

Checks the existing mail configuration data and reconfigures the mail settings if finds something wrong. (See the details above.)

Used with the --domain, --domains, --all-domains, and the --all options.

To restore the example.com domain so that its configuration in mail server, if exists, was changed:

>mchk.exe --domain --domain-name=example.com --fix=local

--fix=all

 

Resets forcedly the mail configuration: removes all the existing configuration data, and sets it up according to the Parallels Plesk Panel database.

Used only with the --all option.

Note: It is recommended to use this option only if the mail server database is seriously corrupted.

>mchk.exe --all -- fix=all