45.21 ‑‑log

Specifies the directory where the MTA will store its log files. The default location varies by platform.




mslocal subdirectory in the directory specified by the ‑‑work switch

For more information, see Section 43.3, Using MTA Log Files.

Linux MTA

Windows MTA


  • ‑‑log /dir
  • /log-[drive:]\dir
  • /log-\\svr\sharename\dir


  • ‑‑log /gwsystem/logs
  • /log-\agt\log
  • /log-m:\agt\log
  • /log-\\server2\c\mail\agt\log

You typically find multiple log files in the specified directory. The first four characters represent the date. The next three characters identify the agent. A three-digit extension allows for multiple log files created on the same day. For example, a log file named 0518mta.001 indicates that it is an MTA log file, created on May 18. If you restarted the MTA on the same day, a new log file is started, named 0518mta.002.

See also ‑‑loglevel, ‑‑logdiskoff, ‑‑logdays, and ‑‑logmax.