Knowledge base

accept-invalid-recipients

<source>

Whether to accept syntactically invalid addresses instead of refusing them in the session
in the configuration this is a lineaccept-invalid-recipients falseinside the block <source>
Refusal now or refusal by report

The default is false. This is only about syntactically invalid addresses — me@there, you@yahoo..com — not about non-existent mailboxes: those are syntactically correct, and this line does not concern them.

The manual stresses the main point in a separate note: such addresses are still immediately bounced and never delivered. The line changes not the message’s fate but where the refusal happens: with false it comes right in the submission session, with true — as a bounce report.

Not supported for pickup directories; there the same thing is controlled by the XACK switch.

The main trap is reading the name as “accept.” Nothing will be accepted: the address is bounced either way. The only thing that changes is whether the submitting platform learns about the error right away or gets a report later.

Hence the real question: can your platform read in-session refusals. If it can, keep the default, and the error will surface at the moment of submission. If it cannot, enable it, otherwise the platform will stumble over every malformed address.

What the Hub does. It does not write it — the vendor false stays, that is, a malformed address is rejected right in the session.

This is right for our submission: messages are sent by a library that sees an in-session refusal and records it in the send record. A refusal by report would come later and into the general telemetry stream, where tying it to a specific address is harder.

Recommended values

What to set. There is exactly one question — what the submitting side can do:

Value When
false (default) the platform reads in-session refusals and can react to them
true the platform does not handle in-session refusals and stumbles over them

The second is a concession to old platforms, not an improvement: the address is bounced anyway, just later and through a report.

The false default, the “syntactically invalid, not non-existent” distinction, the note about immediate bouncing and the caveat about the pickup directory come from the manual, § 3.3.7.68. The breakdown of cases is ours.
Example configuration
# a concession to a platform that does not read in-session refusals
<source 10.0.0.0/24>
    accept-invalid-recipients true</source>
An address like me@there will be accepted and immediately bounced by report. It will not be delivered with this line either — the line only changes where the sender learns about the error.
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▶

Expecting a malformed address to be delivered

§ 3.3.7.68

What it costsThe manual says it directly: such addresses are immediately bounced and never delivered. The line changes only where the refusal happens, not whether it happens.
How to spot itThe line is enabled, yet addresses with errors still end up among the bounces.
How to do it rightFix the addresses on your side: the engine will not correct them with any value.

Counting on the line for file submission

§ 3.3.7.68

What it costsIt is not supported for the pickup directory at all. There the same behavior is switched by its own means, and the source setting does not affect it.
How to spot itWith file submission the behavior does not change, however you edit the line.
How to do it rightUse the pickup switch, not this directive.
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
accept-invalid-recipients <boolean>
Values
yes | no | true | false
Default
false § 3.3.7.68
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
<source>
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The directive lives in <source> and follows source merging: a connection falls under all address blocks that cover it, and a narrow one overrides a broad one. A concession granted in a broad block also goes to a submission that can read refusals — and its errors will become visible later.
How to check on the node
The setting is visible in the configuration; the behavior is checked with a deliberately malformed address:
grep -n 'accept-invalid-recipients' /etc/pmta/config /etc/pmta/virtualhost.txt
printf 'HELO test\r\nMAIL FROM:<a@example.com>\r\nRCPT TO:<me@there>\r\nQUIT\r\n' | nc <node-address> 2525
A refusal on the RCPT line means the default. A 250 response means the concession is enabled: the message will be accepted, and the refusal will come as a report.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Connect a sending platform