Compiling the MTA configuration

From Messaging Server Technical Reference Wiki
Jump to: navigation, search


When using a compiled configuration, whenever you make a change to the MTA configuration, such as to mappings, rewrite rules, channels, aliases, conversions, dispatcher configuration (8.0 or later), job controller configuration (8.0 or later), or channel-specific options (8.0 or later), you must recompile your configuration for the changes to take effect. Compilation reads the entire configuration and writes it out as a single binary file.

Whenever a component of the MTA (such as a channel program) must read the configuration file, it first checks to see if a compiled configuration file exists. If it does, the image is loaded instead of reading the various configuration files.

The command to compile the MTA configuration is:


imsimta cnbuild

Prior to MS 7.0.5, two MTA Tailor options were relevant for imsimta cnbuild: imta_config_data specified the default output image file, and imta_config_option_file specified an option file adjusting configuration internal table sizes. As of MS 7.0.5, these MTA Tailor options have been deleted, and hard-coded file paths are used instead, config-root/advanced/config_data and server-root/lib/option_config.dat, where server-root is the install directory or the value of the SERVERROOT environment variable.

Compiled configurations have a static part and a dynamic reloadable part. If the dynamic part is changed, and you run the imsimta reload command, all running MTA processes will reload the dynamic data. The dynamic parts are presently the mapping tables and text databases. Everything else is static.

Using a compiled configuration makes it easy to test configuration changes because the configuration files themselves do not "go live" until they are compiled. Most MTA test utilities provide a -noimage switch which tells them to ignore the compiled configuration and instead read the configuration from the original files. This lets you test things to make sure they are working before affecting the running system.

If you make changes to your mappings or reverse, forward, or general text databases, then after recompiling issue the command imsimta reload to get the changes to take effect. Note that a compiled configuration is a prerequisite to using imsimta reload.

Note that imsimta reload also reloads authentication, SSL/TLS, and as of Messaging Server 8.0.2, affinity group options. This is done even if the MTA's configuration is not compiled.

If you make changes to other parts of the configuration you must restart the components whose configuration was changed. Some of the dependencies are:

imsimta restart smtp
Changes to mappings, aliases, channels, rewrite rules, channel-specific options for SMTP channels, or text databases.
imsimta restart dispatcher
Changes to the dispatcher configuration, mappings, aliases, channels, rewrite rules, channel-specific options for SMTP channels, text databases
imsimta restart job_controller
Changing the job controller configuration, adding or deleting channels, or changing the values of any of the channel options pool, maxjobs, master, slave, single, single_sys, or multiple. Note that adding or changing a threaddepth channel option value can be dealt with instead by using the imsimta cache -change -thread_depth=... command. You must also restart the job controller if you want changes to master channel jobs to take effect immediately (rather than waiting for the controller to time-out existing channel jobs).

Try to avoid restarting the Job Controller, especially at times when large numbers of messages are in the queues, unless one of the preceding conditions necessitates a restart.

The following changes for compiled MTA configurations were introduced in Messaging Server 8.0:

  • The dispatcher configuration, job controller configuration, and channel-specific options are now part of the compiled configuration.
  • The configure command no longer generates a compiled configuration by default, for both legacy and Unified Configuration.
  • Unified Configuration provides the -xmlfile=xml-config-file switch in various test utilities like imsimta test -rewrite. When combined with the -noimage, this allows testing of configuration files in non-default locations.
  • The imsimta version command now shows if a compiled configuration is used or not.


See also: