Re: Postfix [Postfwd2 error]

2018-04-15 Thread Jan P. Kessler



So the thing to check with the author of postfwd2 is what's going on
with the regular expression on line 1168.


That is a scary one. It seems like an attempt to express all of the 
leniencies in a config format in a single regex, where a preliminary 
canonicalization (reducing all runs of whitespace to a single space 
maybe?) would eliminate the need for some of the complexities.


postfwd takes regular expressions from a user's configuration file. 
These expressions were malformed (starting from line 230 in the config 
file).


But yes, that's really an issue to take up with the author and/or 
other postfwd2 users. The postfwd.org site indicates that a user 
mailing list exists.


Yep, that's the right place for it. Sorry, for the "noise" :)



Re: Postfix [Postfwd2 error]

2018-04-13 Thread Bill Cole

On 12 Apr 2018, at 18:20, Viktor Dukhovni wrote:

On Apr 12, 2018, at 5:57 PM, Bill Cole 
 wrote:


postfwd2/policy[4807]: warning: Complex regular subexpression 
recursion limit (32766) exceeded at 
/opt/postfix/postfwd/sbin/postfwd2 line 1168, <$fh> line 230.?


Perhaps ask whoever maintains "postfwd2" what they mean by "<$fh>" ?


The "<$fh>" is not the issue. The problem is on line 1168 of the 
postfwd2
Perl script, while matching a regular expression against line 230 of 
the

file handle <$fh>.


One would expect that I'd recognize that error message but it seems that 
I need to write MORE bad Perl. In my defense, I don't use postfwd2 and 
didn't know it was written in Perl.



So the thing to check with the author of postfwd2 is what's going on
with the regular expression on line 1168.


That is a scary one. It seems like an attempt to express all of the 
leniencies in a config format in a single regex, where a preliminary 
canonicalization (reducing all runs of whitespace to a single space 
maybe?) would eliminate the need for some of the complexities.


But yes, that's really an issue to take up with the author and/or other 
postfwd2 users. The postfwd.org site indicates that a user mailing list 
exists.


Re: Postfix [Postfwd2 error]

2018-04-12 Thread Viktor Dukhovni


> On Apr 12, 2018, at 5:57 PM, Bill Cole 
>  wrote:
> 
>> postfwd2/policy[4807]: warning: Complex regular subexpression recursion 
>> limit (32766) exceeded at /opt/postfix/postfwd/sbin/postfwd2 line 1168, 
>> <$fh> line 230.?
> 
> Perhaps ask whoever maintains "postfwd2" what they mean by "<$fh>" ?

The "<$fh>" is not the issue. The problem is on line 1168 of the postfwd2
Perl script, while matching a regular expression against line 230 of the
file handle <$fh>.

So the think to check with the author of postfwd2 is what's going on
with the regular expresssion on line 1168.

-- 
Viktor.



Re: Postfix [Postfwd2 error]

2018-04-12 Thread Bill Cole

On 12 Apr 2018, at 15:43, Emanuel wrote:


Hello, thanks for reply.

any idea what file to review???


The error message tells you, after a fashion:

postfwd2/policy[4807]: warning: Complex regular subexpression 
recursion limit (32766) exceeded at /opt/postfix/postfwd/sbin/postfwd2 
line 1168, <$fh> line 230.?


Perhaps ask whoever maintains "postfwd2" what they mean by "<$fh>" ?


Re: Postfix [Postfwd2 error]

2018-04-12 Thread Emanuel

Hello, thanks for reply.

any idea what file to review???

Regards,


El 12/04/18 a las 16:39, Viktor Dukhovni escribió:

Avoid complex regular expressions.


--


Re: Postfix [Postfwd2 error]

2018-04-12 Thread Viktor Dukhovni


> On Apr 12, 2018, at 3:35 PM, Emanuel  wrote:
> 
> In /var/log/maillog i see this error, which produce an excessive cpu usage
> 
> postfwd2/policy[4807]: warning: Complex regular subexpression recursion limit 
> (32766) exceeded at /opt/postfix/postfwd/sbin/postfwd2 line 1168, <$fh> line 
> 230.?
> 
> any ideas?

Avoid complex regular expressions.

-- 
Viktor.