Silence a sender who won't stop
A shop keeps mailing you after you unsubscribed. Block everything from its domain, on every alias.
- Sender ends with @offers.example-shop.com
- Block it
Decide what happens to each email the moment it reaches your alias: block it, send it to another inbox, label its subject, or tell your own apps about it with a signed webhook. No code needed for rules; webhooks are there when you want to automate.
Every rule has two parts. When describes the emails it applies to, and Then says what to do with them. You build rules on the Rules page of your dashboard, give them a name, switch them on or off, and move them up or down to set their order.
Up to 5 conditions, matched all or any. Each condition checks one field:
with contains, equals, starts with or ends with. Matching ignores upper and lower case.
Up to 4 actions:
A rule that blocks can't also forward or relabel the email.
Six ready-made ideas, written exactly as you'd build them in the dashboard.
A shop keeps mailing you after you unsubscribed. Block everything from its domain, on every alias.
Make bills easy to spot and filter in your inbox, whichever alias they arrive on.
Keep work sign-ups out of your personal inbox by naming those aliases work-something.
Push important mail to your phone or chat through an automation tool.
Combine conditions: only mail to your jobs alias that comes from a recruiting platform.
Keep receiving mail on an alias you suspect was sold, while every message is logged by your own app.
When a rule with a webhook matches, we send an HTTPS POST with a small JSON summary of the email to your URL. It works with your own server and with automation tools that accept webhooks, such as Zapier, Make and n8n. The email body and attachments are never included.
{
"event": "email.received",
"rule": { "id": "6f0c…", "name": "Bank alerts" },
"alias": "bank@yourdomain.com",
"from": "alerts@yourbank.com",
"subject": "Your statement is ready",
"blocked": false,
"log_id": "9b2e…",
"received_at": "2026-11-14T09:30:00Z"
}POST /your/path HTTP/1.1
Content-Type: application/json
User-Agent: EmailAlias-Webhook/1.0
X-EmailAlias-Event: email.received
X-EmailAlias-Timestamp: 1794648600
X-EmailAlias-Signature: sha256=5d41c0…eventemail.received for real email, test for the Send test webhook button
alias / from / subjectthe alias that received the email, the sender address and the subject
blockedtrue when one of your rules blocked the email
log_idthe entry in your inbox log, so you can match the event to the email
Every rule has its own signing secret, shown with Show signing secret on the rule. The X-EmailAlias-Signature header is sha256= followed by the HMAC-SHA256 of the timestamp, a dot and the raw request body, using that secret. Check it, reject old timestamps, and you know the request came from us and wasn't replayed. If a secret leaks, choose New secret to replace it.
import crypto from "node:crypto";
import express from "express";
const app = express();
const SECRET = process.env.EMAILALIAS_WEBHOOK_SECRET; // from "Show signing secret"
// Use the raw body: the signature covers the exact bytes we sent.
app.post("/emailalias", express.raw({ type: "application/json" }), (req, res) => {
const ts = req.get("X-EmailAlias-Timestamp") || "";
const sig = req.get("X-EmailAlias-Signature") || "";
const expected = "sha256=" + crypto.createHmac("sha256", SECRET)
.update(ts + ".").update(req.body).digest("hex");
const valid = sig.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
const fresh = Math.abs(Date.now() / 1000 - Number(ts)) < 300;
if (!valid || !fresh) return res.sendStatus(401);
const event = JSON.parse(req.body);
console.log(event.alias, event.from, event.subject);
res.sendStatus(200); // reply quickly: we wait 5 seconds at most
});
app.listen(3000);import hashlib, hmac, os, time
from flask import Flask, abort, request
app = Flask(__name__)
SECRET = os.environ["EMAILALIAS_WEBHOOK_SECRET"].encode() # from "Show signing secret"
@app.post("/emailalias")
def emailalias():
ts = request.headers.get("X-EmailAlias-Timestamp", "")
sig = request.headers.get("X-EmailAlias-Signature", "")
body = request.get_data() # the exact bytes we sent
expected = "sha256=" + hmac.new(SECRET, ts.encode() + b"." + body, hashlib.sha256).hexdigest()
fresh = ts.isdigit() and abs(time.time() - int(ts)) < 300
if not hmac.compare_digest(sig, expected) or not fresh:
abort(401)
event = request.get_json()
print(event["alias"], event["from"], event["subject"])
return "", 200 # reply quickly: we wait 5 seconds at most20 rules per account
Each with up to 5 conditions and 4 actions, including up to 2 webhooks.
300 webhook calls an hour
Per account. Rules keep blocking, forwarding and labelling beyond that.
One attempt, 5-second timeout
Reply with a 2xx quickly and do slow work afterwards. Failed calls aren't retried.
Public https only
Port 443, verified TLS, no redirects, and the host must resolve to public addresses.
Test before you rely on it
Send test webhook posts a sample event and shows your endpoint's response.
Nothing sensitive in the payload
No body, no attachments, and no address of your own inbox.
Rules and webhooks are part of EmailAlias Premium. You can create up to 20 rules per account.
No. A webhook carries only the alias, the sender address, the subject, the time, whether a rule blocked the email, and IDs for the rule and the inbox log entry. The body and attachments are never sent.
Yes. Rules run on every incoming email for your account. To limit a rule to certain aliases, add an Alias condition such as Alias equals shop@yourdomain.com or Alias starts with work-.
No. Conditions use contains, equals, starts with and ends with, and they ignore upper and lower case. Combine up to five conditions with Match all or Match any to cover most cases.
Each event is sent once, with a 5-second timeout, and is not retried. The rule shows the result of its last webhook call, and the email itself is delivered or blocked as normal. If you can't afford to miss events, queue them on your side or use an automation tool that stores incoming webhooks.
A rule can only forward to your account email or to an inbox you have already verified in EmailAlias, so a rule can't be used to send your mail to someone else.
Rules and webhooks come with Premium, alongside custom domains, PGP encryption and replies from your aliases.
Building something bigger? See the API documentation and EmailAlias for developers.