07.02.22, 11:56 + 0100 Benoit Gschwind:

I'm using the following configuration in main.cf:

virtual_alias_maps = regexp:/etc/postfix/virtual

And I using the following rule in /etc/postfix/virtual file:

/^(.+)\.(.+)@noreply\.(.+)\.net$/ix $1.$2...@newdomain.com

but I get the following errors:

warning: regexp map /etc/postfix/virtual, line 7: out of range
replacement index "2": skipping this rule

I cannot figure out what I did wrong ?

The "x" flag *toggles* the use of the extended expression syntax. Since the default is on, by specifying x you turned the extended syntax off.
The same applies to "i".

/^(.+)\.(.+)@noreply\.(.+)\.net$/ $1.$2...@newdomain.com
should work.

--
Regards
  mks

Reply via email to