Skip to content
Open Source

Mailmask, Disposable Email Aliases on Your Own Domain.

Published on

Featured image for "Mailmask, Disposable Email Aliases on Your Own Domain."

Give every sign-up a different address on a domain you own, then turn off the one that starts attracting spam. Mailmask is a self-hosted alias service built on Cloudflare Email Routing and a Worker in your own account.

Mailmask 1.0.0 is available now on GitHub.

One address for one job

Mailmask can generate memorable or random aliases, or accept a custom name you choose. Each alias forwards to a verified inbox and can carry an exact expiration, a duration such as 30m or 7d, and sender rules for the addresses or domains you expect.

When an alias has served its purpose, disable it without changing your real address. Unknown addresses follow a policy you control: reject them with a bounce, drop them without giving a sender a signal, or forward them to a default inbox.

The Worker stays in your account

Cloudflare hands each message to your Worker, which checks the alias, expiration, and sender rules before forwarding it in memory. Mailmask does not store the message, and no hosted alias provider sits between the sender and your destination inbox.

The interactive mm command manages the configuration, validates it, deploys the Worker, registers destination inboxes, and points the domain’s catch-all Email Routing rule at the deployment. The configuration ships inside the Worker bundle, so one deployment can hold tens of thousands of aliases. Mailmask is forward-only, so replies still come from your real address.

Know when an alias refuses mail

A disabled, expired, or filtered alias can send a refusal notification to Discord, Telegram, Slack, Pushover, Gotify, Matrix, email, a webhook, Apprise, ntfy, or Reverse Proxy for ntfy. The alert identifies the alias, the envelope sender, and the reason for the refusal so you can spot an expired address or an allow list that needs attention.

Notifications go out after the routing decision and never change it: refused mail remains refused even if a notifier cannot be reached, and every failed delivery is logged so you can find out why.

To get started, read the Mailmask docs and keep the configuration under version control.