Knowledge base

PMTA knowledge base›Block Global›Directive§ 3.3.1.56.1

pickup

Global

The directory the node picks up messages from, and the directory for bad ones
in the configuration this is a linepickupinside the block Global
Two paths in one line

The value is two paths: the pickup directory and the “bad mail” directory. The second is mandatory: the engine moves files there when a permanent error occurred while processing them.

The manual states the restriction directly: only one pickup directory is supported. Splitting submission across directories — say, by client — cannot be done with this line.

How the file itself is structured and what it must contain is described by the file submission mechanism — pickup-directory.

Besides the paths, the directory has two settings: pickup-remove-dot fixes an extra dot at the start of a line, and pickup-retry-interval has been declared obsolete.

The main trap is a bad mail directory nobody looks into. Everything that could not be processed ends up there, and it does so silently: no refusal to the submitting side, no message. The file is simply moved.

Without watching this directory, lost messages are discovered through complaints from recipients who received nothing — that is, late and from the wrong side.

The other half: there is one directory per node. Permissions on it are shared by everyone who submits, and there is no way to separate submitters from each other — whoever can write a file has submitted mail.

What the Hub does. It does not write it: no pickup directory is declared in the configuration, and the method does not work.

Our submission goes over SMTP with a login — there submitting parties are separated by accounts, which a pickup directory cannot provide: it is a single one, and permissions on it are shared.

Recommended values

What to set. The value is a pair of paths; the requirements come from the purpose:

Property Why
both directories on one file system moving a file between partitions is more expensive and not atomic
permissions only for the submitter and the node process whoever can write a file has submitted mail
the bad mail directory is watched otherwise lost messages are discovered through complaints

Watching is not a nice extra but part of the setup: without it the method loses messages silently.

The two-path syntax, the purpose of the bad mail directory and the “only one directory is supported” restriction come from the manual, § 3.3.1.56.1. The layout and permission requirements are ours.
Example configuration
# two paths: where to pick up from and where to put what was not processed
pickup /opt/pickup/new /opt/pickup/badfiles
The second directory is mandatory. Files end up there silently — no refusal to the submitting side, no message — so it needs to be watched.
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▶

Not watching the bad mail directory

our experience

What it costsFiles end up there silently: no refusal to the submitting side, no message. Lost messages are discovered through complaints from recipients who received nothing.
How to spot itThe bad mail directory holds files of unknown age.
How to do it rightSet up watching of this directory on a par with the queues — any file in it means a lost message.

Counting on splitting submitters across directories

§ 3.3.1.56.1

What it costsOnly one directory is supported. Clients cannot be separated by directories, and permissions on the single one are shared: whoever can write a file has submitted mail.
How to spot itThe configuration has several pickup lines, and only one works.
How to do it rightSeparate submitters by logins through SMTP submission — a pickup directory cannot do that.
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
pickup PICKUP-DIRECTORY BAD-FILE-DIRECTORY
Values
two paths: the pickup directory and the bad mail directory
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 applies to the whole node. Only one directory is supported — there is no inheritance here and no split by sources or clients.
How to check on the node
The paths are visible in the configuration; the operation is checked on both directories:
grep -n 'pickup' /etc/pmta/config
ls -l /opt/pickup/new /opt/pickup/badfiles
Files in the bad mail directory are lost messages: nobody delivered them and nobody was told. Files lingering in the pickup directory mean the engine cannot take exclusive ownership of them.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Connect a sending platform