Skip to main content

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?

  1. Allow lists lock an alias to one store or service so a leaked address stays useless to spammers.
  2. Block lists cut off a single noisy sender while the rest of the alias keeps working.
  3. Domain wildcards cover every address a company sends from without listing each one.

Rule Format

Each sender rule is one of:

  • A full address — [email protected] matches only that sender.
  • A domain wildcard — *@shop.com matches any sender at exactly shop.com.

Matching ignores letter case. A wildcard does not cover subdomains, so *@shop.com won't match [email protected]; add *@mail.shop.com as its own rule for that.

How Rules Combine

The Worker checks the block list first, then the allow list:

  1. A sender that matches any blocked_senders rule is refused.
  2. If allowed_senders is set, a sender that matches none of its rules is refused.
  3. 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

bash
# 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 "[email protected]"

# Combine both, with multiple rules separated by commas.
mm alias add -d personal --allow "*@bank.com,[email protected]" --block "[email protected]"

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.

config.json
json
{
  "address": "trial-signup",
  "destination": "personal",
  "enabled": true,
  "allowed_senders": ["*@example-saas.com"],
  "blocked_senders": ["[email protected]"]
}

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.