Skip to main content
Version: 1.4

Action

An SMTP rule has one action, edited right on its Action tab. There is no Add menu as in policy rules. The action says how a matching client, message or recipient is refused.

The action of a limit rule is the limit itself.

The Action tab of an SMTP rule of the Connect stage, headed Reject connection, with the Type list open on Permanently, Temporarily and With custom reply

Reject​

The heading of the tab says what is refused, which depends on the stage:

StageHeadingWhat is refused
Connect, HELOReject connectionEvery message on the connection. Postfix tells the client at its MAIL FROM.
Sender, DataReject messageThe whole message, for every recipient
RecipientReject recipientThat one recipient; the others still get the message

Type says how:

TypeThe client getsThe client
Permanently (default)A permanent error from Postfix, such as 550 5.7.1 Command rejectedDoes not try again. A mail server bounces the message to its sender; a mail client shows the error.
TemporarilyA temporary error from Postfix, such as 451 4.7.1 Service unavailable - try again laterKeeps the message and tries again later
With custom replyThe Response code, Status and Message you enterRetries for a 4xx code, gives up for a 5xx code

The Response code, Status and Message fields are enabled only for With custom reply. Response code is required, the other two are optional. For example:

Response codeStatusMessageUse
5505.7.1Mail from your network is not acceptedA network you never want mail from
5545.7.1Relay access deniedA recipient you do not accept mail for
4504.7.1Try again laterA client you want to slow down

Unlike the Block message action of policy rules, an SMTP rule cannot discard: the client always learns that it was refused.

tip

A temporary refusal is the safer choice while you try a new rule: a sender wrongly refused keeps the message and delivers it once you change the rule. Watch the SMTP Events page, then switch to Permanently.

Additional resources​