On Mon, Feb 07, 2022 at 12:13:20PM +0100, Markus Schönhaber <[email protected]> wrote:
> 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 [email protected] > > > > 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$/ [email protected] > should work. > > -- > Regards > mks I don't see how that would cause this problem. Turning off i just makes it case-sensitive, and turning on/off x just means that space characters in the pattern are/aren't ignored. There aren't any space characters there so it should be immaterial. The error message indicates a syntax error in the pattern itself. None of that should affect how many replacement indexes are available for use. It looks like there should be 3. Is that really line 7? Or am I missing something? cheers, raf
