martijn.list: > It's probably my misunderstanding on the reject_rbl_client syntax but if > I use the following reject_rbl_client configuration , the mail logs > tells me that the reject_rbl_client syntax is invalid: > > reject_rbl_client example.com=[127;128].0.0.1 > > I use this as a restriction in smtpd_recipient_restrictions: > > smtpd_recipient_restrictions = permit_mynetworks > reject_unauth_destination reject_rbl_client example.com=[127;128].0.0.1 > > Upon receiving an email I get the following error in the mail log: > > fatal: RBL reply error: missing "]" character
There was an off-by-one error while stripping the optional [] around a DNS[BW]L address pattern (a user-friendliness feature). This part of the code is not documented and had escaped testing. Patch is attached. Wietse
20121210 Bugfix (introduced: Postfix 2.9) nesting count error while stripping the optional [] around a DNS[BW]L address pattern. This part of the code is not documented and had escaped testing. Files: util/ip_match.c, util/ip_match.in, util/ip_match.ref. *** src/util/ip_match.c- Tue Jan 18 16:35:17 2011 --- src/util/ip_match.c Mon Dec 10 08:50:27 2012 *************** *** 445,451 **** * Simplify this if we change to {} for wildcard notation. */ #define FIND_TERMINATOR(start, cp) do { \ ! int _level = 1; \ for (cp = (start) ; *cp; cp++) { \ if (*cp == '[') _level++; \ if (*cp != ']') continue; \ --- 445,451 ---- * Simplify this if we change to {} for wildcard notation. */ #define FIND_TERMINATOR(start, cp) do { \ ! int _level = 0; \ for (cp = (start) ; *cp; cp++) { \ if (*cp == '[') _level++; \ if (*cp != ']') continue; \