Thank you for your help. This setup is for lab/qa indeed. What I intend to do is have only certain email form a test account forward to outside and everything else to a single local user. Am I correct to assume that there is no way to accomplish this with regex?
On Thu, Feb 14, 2013 at 10:26 AM, Noel Jones <[email protected]> wrote: > On 2/14/2013 11:16 AM, Alex wrote: > > Hello, > > > > I am having an issue with setting up virtual-regex email > > redirection. It appears that my wild card redirection is overriding > > an entry with less specific criteria. > > > > Here is what I have in my /etc/postfix/virtual-regex > > > > /somename+.*@somedomain.com/ [email protected] > > /.*@.*/ somelocaluser > > > > > > Line one is being ignored > > Line 1 is not ignored, the problem is that wildcards are evil and > should be avoided. > > Virtual alias lookups are recursive, so you'll need a 1-1 mapping to > stop the recursion. Also be careful with your expressions so you > don't get unintended matches. Something like: > > > /somename+.*@example\.com$/ [email protected] > /^some...@gmail\.com$/ [email protected] > > IF /@example\.com$/ > /./ [email protected] > ENDIF > > > If you really intend your wildcard to capture the whole internet > address space and redirect it to somelocaluser, you can remove the > IF and ENDIF statements. Such a setup is common in a testing lab, > but never in the real world. > > > -- Noel Jones >
