Skip to main content
POLICIES

You decide who may send as whom

An anonymous relay connector on Exchange lets anything that reaches it send as anyone in your domain. Sendman checks every session against an allow list and your policies, inside the SMTP conversation, before a byte of the message is read.

  • IPv4 allow list, up to 16,384 addresses per range
  • Scope: user name, IP range, or both
  • Regular expressions, anchored and case-insensitive

The allow list is checked before the greeting

Every connection is checked against the global allow list before the SMTP greeting, and on port 465 before the TLS handshake. An address outside every range gets no reply at all, and while the list is empty, no connection gets in.

Ranges are IPv4, with up to 16,384 addresses each, so a branch office is one entry.

203.0.113.9 → Sendmanport 587
[ connection accepted from 203.0.113.9 ][ 203.0.113.9 is in no range of the allow list ][ connection closed, no greeting ]

How a policy finds its session

  • A user name, an address range, or both

    Scope a policy to the user name a device signs in with, to the range it connects from, or to both. A policy with a user name also names where that name must come from, Entra ID or the vault, so a vault credential never borrows the rights of a directory account with the same name.

  • The lowest priority number wins

    Of the policies whose scope fits a session, only those with the lowest priority number count. Rules that tie are alternatives: a recipient goes through only when one of them allows both the sender and that recipient.

  • A changed policy counts from the next connection

    Sendman reads its configuration fresh for every connection. Edit a policy and the next device that connects is governed by it, with no restart and no change window.

Sender and recipient rules decide at MAIL FROM and at every RCPT TO

Each policy lists the sender addresses it allows and the recipients, with up to 100 patterns on each side. Patterns are regular expressions, anchored and case-insensitive, so scan@contoso\.com allows one address and .*@contoso\.com a whole domain.

A sender that no policy allows is refused at MAIL FROM, before the message is sent. Every recipient is judged on its own: a recipient no policy allows gets a 550, and the message still reaches the recipients that were accepted.

mfp-3f → Sendmanpolicy p20
MAIL FROM:<ceo@contoso.com>550 5.7.60 Sender address rejected: not authorized. No cookies no email.MAIL FROM:<scan@contoso.com>250 2.1.0 Sender OKRCPT TO:<accounting@contoso.com>250 2.1.5 Recipient OKRCPT TO:<anyone@gmail.com>550 5.7.1: Recipient not authorized, your account is not permitted to send to this address

Anonymous relay only from a range you name

A policy without a user name needs an address range, and only such a policy can allow sending without a sign-in. The range is capped at 16,384 addresses, and the sender and recipient rules apply as they do to everyone else. Nothing becomes an open relay by accident.

TRY IT

Change who is knocking and watch three policies decide

The real evaluation order: the allow list, then the policies that apply to this identity and this address, then the sender, then every recipient on its own.

Who is connecting
Connecting from
MAIL FROM
RCPT TO
Evaluation
connect220 ESMTP Service readyFrom the backend
auth235 Authentication successful. Let's send some emails!
policypriority 10 applies
mail from250 2.1.0 Sender OKFrom the backend
rcpt to250 2.1.5 Recipient OKFrom the backend
data250 2.6.0 Queued mail for deliveryFrom the backend
Why

Policy 10 is scoped to svc-scan@contoso.com from 198.51.100.24. scan@contoso.com matches its allowed senders and accounting@contoso.com matches its allowed receivers, so Sendman opens its own session to the backend and hands the message over unchanged.

The policies being evaluated

Global allow list: 198.51.100.16 – 198.51.100.31, 192.0.2.128 – 192.0.2.143

Priority 10Entra ID

svc-scan@contoso.com, from headquarters

senders: scan@contoso\.com
receivers: .*@contoso\.com

Priority 20Sendman vault

mfp-3f, from anywhere on the allow list

senders: .*@contoso\.com
receivers: .*@contoso\.com

Priority 30anonymous allowed

Any device at headquarters, no sign-in

senders: noreply@contoso\.com
receivers: .*@contoso\.com

Policies are selected by scope, then reduced to the lowest priority number that applies. Policies that tie on priority are tried side by side, and a recipient is accepted only when one of them allows both the sender and that recipient. A sender from one policy never combines with a recipient from another.

Questions about policies

01How do we stop a device from sending as the CEO?

With a sender rule. Every policy names the sender addresses it allows, and a device that claims any other address is refused at MAIL FROM, before the message is sent.

02What happens to a recipient that no policy allows?

Sendman refuses that recipient and carries on. Every recipient is judged on its own, so the message still reaches the recipients that were accepted.

03Can a device send without signing in?

Yes, if a policy allows it. Such a policy needs an address range of at most 16,384 addresses, and its sender and recipient rules apply as they do to everyone else.

04How fast does a policy change take effect?

From the next connection. Sendman reads its configuration fresh for every connection, so there is no restart and no cache to wait out.

Request a preview and write the first policy for your copier.