On Sat, Jan 28, 2017 at 10:56:09AM +0100, Stefan Nobis wrote: > Package: logwatch > Version: 7.4.3+git20161207-1 > Severity: important > > Since my upgrade from jessie to stretch (a couple of days ago), logwatch > stopped being able to parse postfix logs. The old jessie version worked > fine, but with the current stretch system I get the following output > from logwatch for postfix logs: > > --------------------- Postfix Begin ------------------------ > > Unescaped left brace in regex is deprecated, passed through in regex; marked > by <-- HERE in m/^... .. ..:..:..[ ]*[^ ]* postfix{ <-- HERE > ,-int,-ext}/[-a-zA-Z\d]*(\[[0123456789]*\])?:? / at > /usr/share/logwatch/scripts/shared/onlyservice line 32, <STDIN> line 1. > Unescaped left brace in regex is deprecated, passed through in regex; marked > by <-- HERE in m/^... .. ..:..:.. [^ ]* [^ ]*(\[[0123456789]*\])?: \[ID > [0-9]+ postfix{ <-- HERE ,-int,-ext}/[-a-zA-Z\d]*/ at > /usr/share/logwatch/scripts/shared/onlyservice line 35, <STDIN> line 1. > > ---------------------- Postfix End -------------------------
Hi, I'm not the logwatch maintainer, just noticed this bug by chance. Apparently something like 'postfix{,-int,-ext}' ends up in the $ServiceName argument to the script, and this is interpolated into the regular expression as-is. I doubt this ever worked; it looks like shell syntax for listing three strings, but {N,M} has a totally different meaning in regexps. So the warning seems appropriate and highlights a real issue. I suggest logwatch insert \Q...\E quoting (see perlre(1)) to the $ServiceName interpolation to fix these warnings (which are fatal in Perl 5.26 btw), but whatever is passing the 'postfix{,-int,-ext}' parts (probably local configuration?) may well need fixing too. Hope this helps a bit, -- Niko Tyni nt...@debian.org