Regex email?


I’d like to be able to create a simple regex for email to a domain, so that I can make up mailing addresses that match the place I am registering as a user, on the fly. For instance: when I register on I use zzznotsosecuresitedotcom@mydomain as my address. My mail allows it through because it begins with “zzz” or some other pattern.

Any suggestions on how to do this?

Maybe I should chill out instead and take the dog for a walk?



I thought there was some disucssion of using "" since the plus acts like a transparent alias, but I recall from the discussion that some sites choke on the plus, or just discard it and what follows. But test it and give it a try.

Another option would be to create a subdomain, then set up a catch-all email address for that subdomain.

In addition, chilling and taking the dog for a walk will make you both happier.



I have something like this worked out.

First enable catch-all for your domain.
Then make a .procmailrc file in your admin’s home folder like shown below (you’ll need to modify it accordingly).

In this example, "" is the admin w/ catch-all, and "" is the real e-mail address.
This will catch any "" or "" and forward to "".
It also puts anything to "" into the normal mailbox.
Everything else is considered spam and is deleted.
Note that ‘+’ is actually an illegal character for an e-mail address, although only the most pedantic of apps will care.

Another cool thing to do is add a .procmailrc to the real account ( to strip the ‘foo’ and embed it in the subject. So an e-mail to "" with subject “Bar” shows as being to "" with subject “[foo] Bar”. That’s the 2nd script below.

These probably aren’t perfect but so far so good for me.


Shunt to


Forward anything of “name[±]” to


Send anything to "" to regular mail


  • ^

Flush the rest to /dev/null



Forward anything of ""

to with subject “[foo] subject”


  • ^TO_name[±]

Get “foo” from To: address, and original subject

SRC = formail -x "To:" | tr '@' '\n' | grep -i name- | head -n 1 | tr '+' '-' | cut -f 2 -d -
SUB = formail -x "Subject:"
:0 fhw
| formail -I “Subject: [${SRC}] ${SUB}”


Hello oncebitter,


Awesome, thanks for the tip, and the URL for suggestions. There’s already one in there, called:

Allow “semi-catch-all” emails like “sales-*”.

Go vote for it!

Thanks again, all.