Documentation

Aliases

Aliases are the entry point for email processing. Aliases determine which emails can be received on your domain.

An alias is a pattern that matches the first part of an email address, the part before the @ symbol. For example, in the email address, support@mydomain.com, the alias is support.

In addition to simple word aliases, Mailcast also supports pattern matching using regular expressions.

If you wanted to receive emails sent an address for each product you support, and your product codes are all 3 letters followed by a number, you could use the alias /[A-Z]3\d+/@mydomain.com.
This example would match emails sent to ABC123@mydomain.com, and def456@mydomain.com, but not ABCD@mydomain.com.

Every regex alias is matched against the user (the local part before any + tag), with explicit anchors: /regex/ is interpreted like /^regex$/. The plus-address tag is not part of the match. Substrings are not matched implicitly—include something like .* inside the pattern when you need that behavior.

Aliases are case-insensitive, so SUPPORT and support are considered the same alias.

Aliases also support plus-addressing, so support+abc123@mydomain.com and support@mydomain.com match the same alias. Matching uses only support; the abc123 tag is available when forwarding or calling webhooks as {tag}.

If the local part starts with + (for example a phone number like +15551234567@mydomain.com), that first + is part of the user, so a regex such as /+\d+/ can match it. A later + is still a tag: +15551234567+sms@mydomain.com matches the same alias, with tag sms.

Prefix and suffix wildcards

You can use a glob-style star at one edge of an otherwise normal alias:

  • sales* matches local parts that start with sales, including sales alone (the star allows zero or more extra characters after the prefix).
  • *noreply matches local parts that end with noreply, including noreply alone.

Mailcast turns these into regular-expression aliases internally, so they follow the same matching order as other regex aliases: after exact literal aliases, before the catch-all star below.

Catch-all addresses

Sometimes you want to receive every email sent to your domain, no matter what the alias is. You can do this by creating an alias that matches everything. You can add a catch-all address with the alias *@mydomain.com.

Alias matching

Simple word aliases are always matched first.

Regular expression aliases are then checked and matched in order of creation. If two regular expression aliases match the same email, the one that was created first will be used.

A catch-all alias will always be matched after all other aliases, so you can have a catch-all alias along with more specific aliases.

You can test how your aliases will match and send a test email on the aliases page.

Subdomain receiving

If you enable Subdomain receiving, the same aliases can also match email sent to a one-level subdomain such as support@sub.mydomain.com.

Using aliases

Once you have an alias, you can configure it to do a number of things: