Knowledge base

PMTA knowledge base›Block <domain>›Directive§ 3.3.10.113.3

sparkpost-sandbox

<domain>

Sending from the SparkPost sandbox domain
in the configuration this is a linesparkpost-sandbox falseinside the block <domain>
First messages without your own domain

The default is false. The line passes SparkPost the option of the same name — the sandbox. The PowerMTA manual limits itself to the words “Sets the sandbox SparkPost option”; the meaning is described in the SparkPost documentation.

The sandbox is a sending domain, not a dry run. The message goes out from the sparkpostbox.com test domain: this is how SparkPost lets you send a first message without setting up your own sending domain.

The limit is strict: according to the SparkPost documentation, no more than five sandbox messages over the entire lifetime of an account, and enterprise accounts have no sandbox at all. It is not suitable for testing traffic redirection on a live stream.

The main trap is taking the sandbox for a safe test. Messages in it are not held back but go out from someone else’s test domain, and the five-message account limit runs out on the first real test; an enterprise account has no sandbox.

The second half: the line lives in the recipient block and follows merging. Left in a broad block, it will apply not only to the {sparkpost} route.

What the Hub does. It does not write it: the Hub does not use traffic redirection to SparkPost.
Recommended values

What to set:

Value When
false, the default a production stream through {sparkpost}
true an account’s first messages without its own sending domain, within the SparkPost limit

The limit is counted by SparkPost, not the node: the node does not know how many sandbox messages are left.

The default and the line’s purpose come from the manual, § 3.3.10.113.3; the sandbox domain, the five-message limit and the absence of the sandbox for enterprise accounts come from the SparkPost documentation (Transmissions API, the section on the sandbox domain). The analysis is ours.
Example configuration
# an account's first messages without its own sending domain
<domain {sparkpost}>
    auth-username SMTP_Injection
    auth-password d41d8cd98f00b204e9800998ecf8427e
    sparkpost-sandbox true</domain>
The messages will go out from the SparkPost sandbox domain; the sandbox limit is five messages for the whole account.
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▶

The live route is tested with the sandbox

our experience

What it costsMessages go out from the SparkPost test domain, and the five-message account limit runs out before the test is finished.
How to spot itThe first messages came from someone else’s domain, and further sandbox sends are rejected.
How to do it rightTest redirection with your own sending domain and a control mailbox, and keep the sandbox for a new account’s first messages.

Putting the sandbox into a broad recipient block

our experience

What it costsBy the merging rule it goes to all recipients that did not say otherwise themselves — not only to the route that was being tested.
How to spot itThe line stands in the * block or in a block broader than the reserved domain.
How to do it rightKeep it only in the {sparkpost} block.
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
sparkpost-sandbox <boolean>
Values
yes | no | true | false
Default
false § 3.3.10.113.3
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
<domain>
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The directive lives in <domain> and follows the merging of recipient blocks — but it is meaningful only in the reserved {sparkpost} domain. Left in a broad block, it will go to all recipients that did not say otherwise themselves.
How to check on the node
From the node’s side the sandbox state is not visible — only the line in the configuration:
grep -n -A5 'domain {sparkpost}' /etc/pmta/config
There is nothing else to check with: the option goes to SparkPost, and the node writes an ordinary transfer to the {sparkpost} queue into accounting.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Capacity planning