Global
During rotation the engine renames old files, appending a number: on Unix log becomes log.1, log.1 becomes log.2 and so on — and then starts a new one. The line sets how many files to keep in total. The default is 8.
The number includes the current file. The value 1 means “only the current one, no history,” 2 means the current one plus one old one. 0 turns rotation off entirely, and the file will grow without limit.
Rotation can be triggered by hand — with the pmta rotate log command. This is useful before handing the log to support: the current file is closed and can be taken in full.
Automatic rotation happens at midnight, and it is controlled by the neighboring line log-auto-rotation.
So the vendor default of 8 applies, and two rotations — the built-in one and the system one — run at the same time. This does not break anything by itself, but it is worth remembering: there may be more numbered files than expected.
The depth is chosen by how long the history is needed:
| Value | What it means |
|---|---|
| 8 (default) | the current one plus seven old ones |
| 1 | only the current one, no history |
| 0 | no rotation at all, the file grows without limit |
These are files, not days. The period depends on the switching frequency.
# the current file plus seven old ones log-file /var/log/pmta/log log-rotate 8
what people get wrong and how it ends2 mistakes▶
our experience
our experience
2 relations
ls -la /var/log/pmta/log*
3 articles
◇What the node tells about itself and through which channelsSeven observation surfaces: the web monitor, the console in four formats, the log, accounting, accounting search, metrics and export to external analytics.◇The watchdog that restarts the engineKeeps an eye on the engine and brings it back up after a crash by itself, sending a crash report to the postmaster address.◇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.