Knowledge base

spool-min-free-space

Globaldeprecated

Free space threshold before refusing intake — a deprecated form
in the configuration this is a linespool-min-free-space 0inside the block Global
One threshold for all directories

The line stopped accepting messages into a spool directory when free space on its file system dropped below the threshold. When space came back, intake resumed on its own. On Unix the count was based on space available to unprivileged users.

The directive has been declared deprecated. The replacement is min-free-space inside the <spool> block.

The difference is not in behavior but in scope: the former line set one threshold for all directories at once, the new one — a separate one for each. That was the reason for the replacement: spool directories often live on different file systems, and a common threshold makes no sense for them.

The main trap is keeping both lines. They solve one task with different scopes, and the manual does not specify the combination “common threshold plus the directory’s own”. Which one wins would have to be found out by experiment — and there is no need: the new one covers all the cases of the old one.
What the Hub does. It does not write this line — it writes the replacement: min-free-space inside <spool /var/spool/pmta>, five percent of the node’s disk, but no less than a gigabyte and no more than ten.

The deprecated line is worth looking for in configurations assembled by hand before the move to the Hub.

Recommended values

What to set. Nothing: the line should be removed.

Value When
do not write always: the task is solved by the line inside the directory block
number of megabytes only in an old configuration that has not been migrated yet

The migration is simple: the threshold moves inside each directory’s block — now with a size multiplier, 1024 becomes 1024m or 1g — and is refined there for its file system.

The purpose, the caveat about space for unprivileged users and the deprecation mark naming the replacement are from the manual, § 3.3.1.7. The analysis of the difference in scope is ours.
Example configuration
# this is how it was before — one threshold for all directories, a number in megabytes
spool-min-free-space 1024
Today the same is written inside each directory’s block: they have different file systems, and each has its own threshold.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
▲

Common mistakes and problems

what people get wrong and how it ends2 mistakes▶

Leaving the deprecated line next to the new one

§ 3.3.1.7

What it costsTwo lines solve one task with different scopes, and which one wins, the manual does not say. It would have to be found out by experiment.
How to spot itBoth forms occur in the configuration.
How to do it rightRemove the deprecated one: the new one covers all its cases.

Setting a common threshold for directories on different disks

our experience

What it costsA threshold that is reasonable for a large disk turns out too lenient for a small one — and the small one runs out before the safety fuse triggers.
How to spot itOne of the directories hits the end of its disk, but the threshold does not trigger.
How to do it rightSet the threshold inside each directory’s block, looking at its file system.
Compatibility
PowerMTA 6.0
described in the manual of this version · platform: any
The vendor does not state the first version for every directive — there is no note here. The name also appears in the 5.0 edition of the manual.
Reference data
Syntax
spool-min-free-space N
Values
an integer number of megabytes, or 0
Default
0 § 3.3.1.7
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
Global
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The directive is written at the root of the configuration file and applied to all spool directories at once. That very commonality became the reason for the replacement: the new line’s scope is one directory.
How to check on the node
The deprecated line is worth looking for together with its replacement:
grep -n 'spool-min-free-space' /etc/pmta/config
grep -n -A4 '^<spool' /etc/pmta/config
If both forms are found, the configuration should be brought to one: remove the deprecated line, set the threshold inside each directory’s block.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Prepare a node for sending