From 5610926d0af994aad826dc031ebbd587144cb965 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 17 Mar 2021 08:55:33 +0100 Subject: log-forward: use $EscapeForRegEx --- log-forward | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'log-forward') diff --git a/log-forward b/log-forward index 2866e2f..8842c7c 100644 --- a/log-forward +++ b/log-forward @@ -17,7 +17,7 @@ :global LogForwardRateLimit; :global NotificationsWithSymbols; -:global CharacterReplace; +:global EscapeForRegEx; :global IfThenElse; :global LogPrintExit2; :global QuotedPrintable; @@ -45,9 +45,9 @@ $WaitFullyConnected; :local MessageVal; :local MessageDups [ :toarray "" ]; -:local LogForwardFilterLogForwarding [ $CharacterReplace ("^Error sending e-mail <" . \ - [ $QuotedPrintable ("\\[" . $Identity . "\\] " . [ $SymbolForNotification "warning-sign" ] . \ - "Log Forwarding") ] . ">:") ("\?") ("\\\?") ]; +:local LogForwardFilterLogForwarding ("^" . [ $EscapeForRegEx ("Error sending e-mail <" . \ + [ $QuotedPrintable ("[" . $Identity . "] " . [ $SymbolForNotification "warning-sign" ] . \ + "Log Forwarding") ] . ">:") ]); :foreach Message in=[ / log find where !(topics~$LogForwardFilter) !(message="") \ !(message~$LogForwardFilterLogForwarding) !(message~$LogForwardFilterMessage) ] do={ :set MessageVal [ / log get $Message ]; -- cgit v1.2.3-70-g09d2