3

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 reply-124233@mydomain.com, 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*@mydomain.com and forward it to jjj@mydomain.com?

Alex
  • 8,839

1 Answers1

2

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 @mydomain.com addresses, though something thing can be done with virtual_alias_maps.

84104
  • 13,181
  • 6
  • 49
  • 80