Globalset by the Hub
The line sets the path to the log file. The manual calls it mandatory: it must always be present in the configuration. On Unix the path must be absolute.
One line sets three files. Besides the engine’s own log, it determines the location of the web monitor log (pmtahttp.log) and the SNMP log. This is worth remembering when looking for where the monitor’s records went: they are nearby, but in another file.
The log and accounting are different things, and the separation is deliberate (§ 4.1.2). The log answers the question “what did the node do”: start, stop, errors, connection traces. Accounting — “what happened to the messages.” The first place to look for any malfunction is the log.
The engine writes to the operating system log only what it could not write here — startup errors and similar cases. If the file is unavailable, that is where to look.
🔎 That is, we do not use the engine’s built-in rotation. Neither log-rotate nor log-auto-rotation is in our configuration, and the file is handled by the system’s logrotate. This is a working solution, but it has a cost: the engine keeps the file open, and the rotation rule must either copy and truncate or send the engine a signal — otherwise it will keep writing to the deleted file.
The path is chosen where the system’s other logs are:
| Value | Note |
|---|---|
| /var/log/pmta/log | our choice; the monitor and SNMP logs will go next to it |
| a relative path | only on Windows |
The line has no default — the manual requires it to always be set.
# one line sets three files: the engine's, the monitor's and SNMP's log-file /var/log/pmta/loglog-rotate 8
what people get wrong and how it ends2 mistakes▶
§ 4.1.2
our experience
3 relations
log-rotateGlobalHow many files will remain of the log whose path is set here. § 3.3.1.59.3http-accessGlobalThe monitor’s refusals by address are written to a log of the same family — only to its own file, pmtahttp.log. § 3.3.1.58.3
log-match-info<email-patterns>The entries go into the very log set there. inferencelog-connections<source>The entries go into the very log set there. § 3.3.1.59.2log-commands<source>The entries go into the very log set there. inferencelog-data<source>The entries go into the very log set there. inferencelog-resolution<domain>The entries go into the very log set there. § 3.3.1.59.2log-transfer-failures<domain>The entries go into the very log set there. § 3.3.1.59.2
grep -n '^log-file' /etc/pmta/config ls -l /var/log/pmta/
3 articles
◇What makes a virtual machine riskyRunning on a virtual machine is possible, but the manual does not recommend it without sufficient hardware and properly tuned hypervisor settings: under load the node may stop responding.◇The node needs a resolver that does all the work itselfThe engine requires recursive name resolution; a resolver that answers with a referral to another server forces the query to be repeated and triggers a log warning.◇The activation key is a prerequisite for installation, not a step after itWithout an activation key from SparkPost support the engine neither installs nor runs, and the license tier sets the outbound connection ceiling: on Standard everything above 200 is ignored.