Knowledge base

deliver-only

<spool>set by the Hub

Only deliver messages from this directory without writing new ones
in the configuration this is a linedeliver-only falseinside the block <spool>
A directory that only drains

The default is false. With true the engine delivers messages from the directory but does not write new ones to it. The directory gradually empties and no longer fills up.

The manual names the purpose directly: recovery after a failure. The spool directory from a crashed server is attached to a working one, and the messages from it are delivered — while new mail keeps landing in the regular directories.

It is the only standard way not to lose a failed node’s queue.

The main trap is forgetting to turn it off. A directory marked “deliver only” will empty and stay empty: the engine no longer writes to it. If it was the node’s main directory, messages will go to the others — and if there are no others, acceptance will stop completely.

The other half: an attached foreign spool carries someone else’s messages. They will go out from the addresses of this node, not the one where they were submitted — so SPF, the signature and the reputation will all be yours. Before attaching, it is worth understanding what exactly is in there.

What the Hub does. It writes no — explicitly, in the block of the single spool directory in the baseline configuration.

The line repeats the default, and that makes sense: we have one directory, and yes in it would mean acceptance stops. An explicit no next to delete-file-holders yes reads as “this directory is a working one, and this is how it behaves.”

Recommended values

What to set. The value is temporary by purpose:

Value When
no (default) a regular working directory
yes an attached spool from a failed server — until it empties

The second is removed together with the directory itself: an emptied spool is detached, not returned to service.

The false default and the “attach the spool of a failed server” purpose come from the manual, § 3.3.2.2. The warning about someone else’s messages and reputation is ours.
Example configuration
# a spool from a failed server: drain and detach
<spool /var/spool/pmta/recovered>
    deliver-only true</spool>
Messages from this directory will go out, and new ones will not land in it. They will go out from the addresses of this node — with everything that implies for signing and reputation.
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▶

Setting the mode on the node's only directory

our experience

What it costsThere is nowhere to write new messages: the engine no longer writes to it, and there are no other directories. Acceptance stops entirely.
How to spot itSubmission is bounced with a temporary error, while the spool empties.
How to do it rightSet no back — or create a second directory if the mode is really needed.

Attaching a foreign spool without figuring out what is in it

our experience

What it costsThe messages will go out from this node’s addresses — with its signature, its SPF and its reputation. The contents of a foreign queue can turn out to be anything.
How to spot itSenders and recipients that were never on this node appear in the queues.
How to do it rightLook at the attached spool’s queues before allowing delivery.
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
deliver-only <boolean>
Values
yes | no | true | false
Default
false § 3.3.2.2
Applying
reload, no restart needed
Queue
also affects what is already in the queue
Where to write it
<spool>
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The directive lives in <spool> and applies to one directory. There is no inheritance between directories — that is the point: one directory can be draining while the others work normally.
How to check on the node
The mode is visible in the configuration, the draining — from the directory contents:
grep -n -A4 '^<spool' /etc/pmta/config
find /var/spool/pmta -type f | wc -l
A directory in draining mode should empty. If the count does not change, the messages in it are not being delivered — and the cause should be looked for in the queues, not in this line.
In the Hub
Managed at
Analytics → Node accounting
Value
The Hub picks it itself — pace, warm-up stage, metrics
Cost of a mistake
disruptive: applying it interrupts the node
Scenarios
Prepare a node for sending