How do you use regex flags in postfix?

Solution 1:

There is no supported flag g, neither in POSIX regexp tables or PCRE tables. Therefore it's impossible to understand what you intended. Is that a typo? Just remove it.