log-forward: fix the pattern excluding mail errors

This looked smart, but did not work... 🤪
Unicode characters have to be in place to make $QuotedPrintable have an
effect. So fix it... We have duplicate pattern if symbols are disabled,
but that does not hurt.
This commit is contained in:
Christian Hesse 2022-06-08 19:36:14 +02:00
parent aa7e9adbd7
commit e9780d9b4e

View file

@ -19,7 +19,6 @@
:global LogForwardRateLimit; :global LogForwardRateLimit;
:global NotificationsWithSymbols; :global NotificationsWithSymbols;
:global CharacterReplace;
:global EscapeForRegEx; :global EscapeForRegEx;
:global HexToNum; :global HexToNum;
:global IfThenElse; :global IfThenElse;
@ -49,9 +48,11 @@ $ScriptLock $0;
:local MessageVal; :local MessageVal;
:local MessageDups [ :toarray "" ]; :local MessageDups [ :toarray "" ];
:local LogForwardFilterLogForwarding ("^" . [ $CharacterReplace [ $EscapeForRegEx ("Error sending e-mail <" . \ :local LogForwardFilterLogForwarding ("^Error sending e-mail <(" . \
[ $QuotedPrintable ("[" . $Identity . "] %SYMBOLREGEX%Log Forwarding") ] . ">:") ] "%SYMBOLREGEX%" \ [ $EscapeForRegEx [ $QuotedPrintable ("[" . $Identity . "] " . \
("((" . [ $SymbolByUnicodeName "memo" ] . "|" . [ $SymbolByUnicodeName "warning-sign" ] . ") )?") ]); [ $SymbolForNotification "memo" ] . "Log Forwarding") ] ] . "|" . \
[ $EscapeForRegEx [ $QuotedPrintable ("[" . $Identity . "] " . \
[ $SymbolForNotification "warning-sign" ] . "Log Forwarding") ] ] . ")>:");
:foreach Message in=[ /log/find where (!(message="") and !(message~$LogForwardFilterLogForwarding) and \ :foreach Message in=[ /log/find where (!(message="") and !(message~$LogForwardFilterLogForwarding) and \
!(topics~$LogForwardFilter) and !(message~$LogForwardFilterMessage)) or \ !(topics~$LogForwardFilter) and !(message~$LogForwardFilterMessage)) or \
topics~$LogForwardInclude or message~$LogForwardIncludeMessage ] do={ topics~$LogForwardInclude or message~$LogForwardIncludeMessage ] do={