Handlers can be viewed and managed - registered, enabled/disabled, or removed - with the mail_handlers_control utility located in the /usr/local/psa/admin/bin directory on the Plesk server (Linux).

Note: We do not recommend usage of the obsolete mailmng utility.

The utility uses the following syntax:

# ./mail_handlers_control [parameters] [options]

The mail_handlers_control utility stores information about registered handlers in the SQLite database, which is then accessed by the patched MTA or an add-on to MTA.

A handler can be registered to be called in the following situations:

  • For all messages.
  • For messages having specific sender or recipient address.
  • For messages having specific sender or recipient domain part of the address.

For matching addresses, simple case-insensitive string comparison is done. It does not matter whether the specified domains or mail accounts exist in Plesk.

The executable file specified for the handler must exist. If it does not exist, or is not executable, the handler is not called. The core is allowed to automatically remove handlers whose executable files do not exist, but it must not remove handlers whose files exist but are not executable.