Regexes in Aliases

Use regular expressions to match patterns in email aliases and forward them dynamically.

What Are Regex Aliases?

Use regular expressions to match patterns in email aliases and forward them dynamically. This handles multiple similar addresses with a single rule.

Using Substitutions

You can use $1, $2, etc. to insert values matched by regex groups (parentheses) into the destination email address.

  • $1 = first matched group
  • $2 = second group, and so on

Example: An alias pattern (.*)@yourdomain.com forwarding to $1+john@gmail.com would forward john.doe@yourdomain.com to john.doe+john@gmail.com.

Note: The alias field must not exceed 150 characters.

Order of Importance When Matching an Email

Evaluation follows this priority:

  1. The exact match
  2. The "Plus sign" match
  3. The Regex match
  4. The Wildcard or catch-all match *

Only the highest priority rule activates regardless of multiple matches.

The "Plus Sign" Match

When an email contains a plus sign (e.g., contact+label@piedpiper.com), ImprovMX:

  • Matches it to the base alias
  • Forwards to the configured destination
  • Adds the same +label to Gmail addresses

Example: Sending to contact+newsletter@piedpiper.com with a base contact alias forwarding to Gmail results in delivery to richardhendricks+newsletter@gmail.com.

Note: Only works for specific email providers, not G-Suite domains.

Accepted Domains for Regex Plus Sign Forwarding

gmail.com, hey.com, protonmail.com, icloud.com, fastmail.com, outlook.com, runbox.com, yandex.com, yandex.ru, mailfence.com

Still have questions? Feel free to reach out to our support team!