Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this in my main.cnf:

alias_maps= regexp:/etc/aliases

Inside that file, I have:

/^reply*$/: jjj

Now, when I send it to, postfix bounces it because

Recipient address rejected: User unknown in local recipient table;

How can I configure my aliases so that people can send reply* and forward it to

share|improve this question
Is your primary domain, or is it a virtual domain? – NickW Apr 12 '13 at 16:36
up vote 1 down vote accepted

Assuming that's not a typo and /^reply*$/: jjj really is the entry in your table, then your regular expression is incorrect for what you are trying to do and you are not using the proper syntax for regexp_table(5)

You'd want /^reply.*$/ jjj.

I think you might also be better served by adding and additional table rather than overriding the standard one.

alias_maps = hash:/etc/mail/aliases, regexp:/etc/postfix/reply-regexp-alias

Also, keep in mind that alias_maps are used for local(8) and not virtual(5) delivery, meaning that the system this is occurring on must think of itself as the final destination for all addresses, though something thing can be done with virtual_alias_maps.

share|improve this answer
What's the difference between local and virtual? For my purpose, actually I am piping it to a script. Whenever someone sends an email to, my postfix will catch it via the regexp and pipe it to a python script. Then, my python script will insert a record into the database. – Alex Apr 14 '13 at 8:55
@Alex You can read the links documentation for a more full understanding, but if you are piping to a script you definitely want local, as virtual does not allow for that kind of behavior. – 84104 Apr 15 '13 at 17:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.