Sender Rules
Accept mail at an alias only from the senders you expect, and turn away the ones that abuse it.
Why Use This Feature?
- Allow lists lock an alias to one store or service so a leaked address stays useless to spammers.
- Block lists cut off a single noisy sender while the rest of the alias keeps working.
- Domain wildcards cover every address a company sends from without listing each one.
Rule Format
Each sender rule is one of:
- A full address —
news@shop.commatches only that sender. - A domain wildcard —
*@shop.commatches any sender at exactlyshop.com.
Matching ignores letter case. A wildcard does not cover subdomains, so *@shop.com won't match deals@mail.shop.com; add *@mail.shop.com as its own rule for that.
How Rules Combine
The Worker checks the block list first, then the allow list:
- A sender that matches any
blocked_sendersrule is refused. - If
allowed_sendersis set, a sender that matches none of its rules is refused. - Everyone else is forwarded.
Leaving allowed_senders out means any sender is welcome unless blocked. Refused mail is a refusal and never falls through to a default destination.
Usage
# Only accept mail from the store you bought from.
mm alias add -d personal -l "Shoe store" --allow "*@shoestore.com"
# Accept anyone except one persistent marketer.
mm alias add -d personal --block "promo@partner-offers.com"
# Combine both, with multiple rules separated by commas.
mm alias add -d personal --allow "*@bank.com,alerts@bank-notify.com" --block "marketing@bank.com"
The interactive menu asks for an allow list when you create an alias. To change rules on an existing alias, edit its allowed_senders or blocked_senders in the config and deploy.
{
"address": "trial-signup",
"destination": "personal",
"enabled": true,
"allowed_senders": ["*@example-saas.com"],
"blocked_senders": ["marketing@example-saas.com"]
}
tip
Sender addresses can be forged, so it is recommended to treat sender rules as a filter against unwanted mail rather than as proof of who sent a message.