Global
The default is false. The line decides the fate of spool files in which the engine found encoding errors — the manual names data corruption on disk as the cause.
With the default such files are ignored and stay in place. With true they are deleted.
This is not about messages that could not be delivered: those live by their own order of retries and bounces. It is about files the engine cannot read — they cannot be delivered under any conditions.
The second half matters more: the very appearance of such files is a signal. Encoding errors mean data corruption on disk, and deleting the file treats the consequence. The cause — the disk, the file system, memory — has to be looked into separately.
We have nothing to notice them with: the Hub does not keep separate track of the spool and does not show the number of files in the directory. With file holder deletion enabled, the number of files in the spool is comparable to the number of messages in the queue — a mismatch would be the sign.
What to set. A choice between traces and cleanup:
| Value | When |
|---|---|
| false (default) | there is supervision, and you want to keep a corrupted file for investigation |
| true | the node runs unattended: the file cannot be read anyway, and there is no point accumulating it |
The second does not cancel investigation: deletion should go together with knowing about the fact — from the log, not from the directory contents.
# an unattended node: the file cannot be read anyway spool-delete-corrupted true
what people get wrong and how it ends2 mistakes▶
our experience
§ 3.3.1.6
1 relation
grep -n 'spool-delete-corrupted' /etc/pmta/config grep -i 'corrupt' /var/log/pmta/pmta.log | tail -10
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.