Logging, nologging, logheader Channel Options

Message transaction logging
The MTA provides facilities for logging each message as it is enqueued and dequeued. All log entries are made to the MTA message transaction log file    in the MTA log directory, (i.e.,   ). Message transaction logging is controlled on a per-channel basis. The  channel option activates message transaction logging for a particular channel while the   channel option disables it. Logging is disabled on all channels by default although most default configurations enable logging on all channels.

The message ,  which runs every night around midnight, appends any existing   to the cumulative log file,  , renames the current   file to  , and then begins a new   file. Note that the MTA itself never does anything to the cumulative  file and it is up to each site to manage (e.g., delete, truncate, backup, etc.) that log file however they choose.

The MTA message transaction log file is written as a normal ASCII text file, whose exact format is configurable via the   MTA option.

If you wish to have all of your channels log message activity to the logging file, then simply add the  channel option to a defaults channel.

When message transaction logging is enabled, the (new in MS 6.0)   option may be used on channels to additionally enable logging of message headers. It takes an encoded integer argument, where bit 0 (value 1) causes logging during both enqueue and dequeue operations, while a value of 2  causes logging during enqueue operations without enabling logging for message dequeues. As of MS 8.0.2, a value of 3 causes logging during dequeues without enabling logging for message enqueues. The specific header lines to be logged are controlled by the  file, discussed along with the MTA option.

When enabling, consider also enabling the   MTA option,  as it is helpful for correlating header entries with corresponding regular message entries.

If the goal is to record subsets of information from one or more header lines, rather than necessarily logging full header lines via, see as an alternative the (both new-in-MS-8.0)   MTA option and Sieve " " action.

See also:
 * MTA transaction logging
 * Transaction logging MTA options
 * logheader Option
 * log_format MTA Option
 * log_header MTA Option
 * Scheduler task options
 * log_process MTA Option
 * log_transactionlog MTA Option
 * Logging and debugging channel options
 * Channel options