Knowledge base

move-to

<acct-file>

The directory a closed accounting file moves to
in the configuration this is a linemove-to off — files are not moved unless this is configuredinside the block <acct-file>
The line without which two others stay silent

The line sets the directory where the engine moves an accounting file when it closes it. By default there is no moving at all.

🔴 And this is the main thing to know about the whole block: without this line move-interval is silently ignored. The manual says so directly: moving is not done, and the interval, if set, quietly does not work. No warning, no error.

max-size works without it — the new file simply starts in place, with an incremented number in its name.

And the third link: delete-after works only while moving is turned off. As soon as files move away, the retention period no longer applies to them — someone else looks after the destination directory.

The directory must be on the same volume. Moving over the network is not supported, and the destination must differ from the directory where the file was created.

The main trap is setting the interval without setting the directory. It looks like configured rotation and works like its absence. The check is simple: files are not moved anywhere.
What the Hub does. It does not write it: accounting files are not moved anywhere — they are read and deleted in place.

The template’s file block used to have move-interval 5m without this line — that is, the interval did nothing. It was removed on August 29, 2026. What works is max-size 25M (a new file in place) and delete-after 7d — the latter precisely because moving is turned off.

Recommended values

A directory is needed only where someone else picks up the files:

Value When
do not set (default) files are read and deleted in place
a directory path an external collector picks them up from a separate place

Requirements for the directory: the same volume, not the same directory as the file itself. Not over the network.

The “do not move” default, the silent ignoring of the interval, the volume restriction and the link with delete-after come from the manual (§ 3.3.11.2, § 3.3.11.1). The breakdown of our configuration follows the Hub template.
Example configuration
# the interval takes effect only together with a directory
<acct-file /var/log/pmta/acct.csv>
    move-to /var/log/pmta/archive    move-interval 1h
</acct-file>
Without the first line the second stays silent. And note: with moving enabled delete-after stops working — the archive has to be looked after separately.
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 ends3 mistakes▶

Setting a move interval without a directory

§ 3.3.11.3

What it costsThe interval is silently ignored. The configuration looks set up, the file is not moved, and you can tell only by the absence of files in the archive — which does not exist either.
How to spot itThe block has move-interval but no move-to.
How to do it rightEither add a directory or remove the interval so as not to mislead whoever reads the configuration.

Enabling moving and expecting the retention period to catch up with it

§ 3.3.11.1

What it costsdelete-after works only while moving is turned off. Files that moved away are never deleted, and the destination directory grows endlessly.
How to spot itThe archive takes up more than the rest of the node.
How to do it rightLook after the archive separately — with its own rotation or scheduled cleanup.

Pointing to a directory on another volume or over the network

§ 3.3.11.2

What it costsMoving over the network is not supported, and to another volume it is not moving but copying with deletion, which the engine does not do.
How to spot itFiles stay in place, and the log has moving errors.
How to do it rightKeep the destination directory on the same volume; moving files out is a separate scheduled task.
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
move-to <path>
Values
a directory path on the same volume
Default
off — files are not moved unless this is configured § 3.3.11.2
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
<acct-file>
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
There is no inheritance: the line lives inside its <acct-file> and concerns only its files. Different accounting streams can move to different directories or not move at all.
How to check on the node
The check is direct — see whether files appear in the destination directory:
ls -la /var/log/pmta/archive/ 2>/dev/null | tail -5
Empty with an interval set means the directory is not set or is set incorrectly. It is also worth making sure it is on the same volume: df /var/log/pmta /var/log/pmta/archive.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Collect telemetry