Knowledge base

spool

Globaldeprecated

Spool directory — a deprecated form of notation
in the configuration this is a linespoolinside the block Global
A line instead of a block

The line named the directory in which the engine keeps message files while they wait for delivery.

The directive has been declared deprecated. The replacement is the <spool> block, where the block name is the directory path.

The difference is not in where messages are stored but in what can be said about the directory. The block has priority — the order of use, min-free-space — the free space threshold, deliver-only — the draining mode, and delete-file-holders — the fate of temporary files. The line had none of this.

That is why the block form appeared: several directories with different properties cannot be described with a line.

The main trap is mixing the forms in one configuration. The line and the block name the same thing in different ways, and what happens with both at once, the manual does not specify.

In practice, though, the issue is not a conflict but a loss: staying with the line, you are deprived of all directory settings — including the free space threshold, without which running out of space stops the whole node.

What the Hub does. It does not write it: it uses the block form — <spool /var/spool/pmta> with three lines inside: the free space threshold, the directory mode and the fate of file holders.

The deprecated line is worth looking for in configurations assembled by hand before the move to the Hub: it does occur there, and with it all directory settings are missing.

Recommended values

What to set. Nothing: the line should be replaced with a block.

Value When
do not write always: the directory is declared with a block
directory path only in an old configuration that has not been migrated yet

The migration is mechanical: the path becomes the block name, and the settings the line could not have are added inside.

The purpose and the deprecation mark naming the replacement are from the manual, § 3.3.1.5. The list of what appeared in the block form is from § 3.3.2. The conclusion about the reason for the replacement is ours.
Example configuration
# this is how it was before — a path without any settings
spool /var/spool/pmta
Today the same is written as a block, and inside you can put the priority, the free space threshold and the modes the line did not have.
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▶

Staying on the line form and losing the safety fuse

our experience

What it costsThe directory has no free space threshold: running out of space stops not intake but the whole node — neither the spool, nor accounting, nor the log has anywhere to write.
How to spot itThe configuration has a spool line but no <spool> block.
How to do it rightMigrate to the block and set the free space threshold inside.

Keeping both forms at once

§ 3.3.1.5

What it costsOne location is named twice in different ways. What happens, the manual does not specify, and it would have to be found out by experiment.
How to spot itThe configuration has both the line and the block.
How to do it rightKeep the block, remove the line.
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 <directory>
Values
directory path
Applying
reload, no restart needed
Queue
also affects what is already in the queue
Where to write it
Global
How many times
may be repeated
Everything here comes from the manual, with the section.
Inheritance
The directive is written at the root of the configuration file. It has no inheritance — and no settings: everything that can be said about the directory appeared only in the block form.
How to check on the node
The deprecated line is worth looking for together with the block form:
grep -n '^spool ' /etc/pmta/config
grep -n -A4 '^<spool' /etc/pmta/config
If only the line is found, the directory has neither a free space threshold nor a priority. Migrate to the block together with setting them.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Configuration lifecycle