Louis-David Mitterrand: > Hi, > > I am using an (insanely) long pcre (see below) to reject > african/chinese/etc. spam that relays through large ISP's. An now it > seems I have reached a limit. When trying to add a single more > expression with a set of () parens I get this error: > > postmap: warning: pcre map /etc/postfix/header_access_local, line 2: > too many (...)
Postfix logs this when pcre_exec() returns a match count of zero. According to documentation: If the vector is too small to hold all the captured substring offsets, it is used as far as possible (up to two-thirds of its length), and the function returns a value of zero. About 10 years ago, someone decided that Postfix needs no more than 99 () in a PCRE regular expression. I suppose this is one of many things in Postfix that should eventually be made configurable. For now, you would have to edit dict_pcre.c, and update the PCRE_MAX_CAPTURE constant. Wietse