aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-06-08 19:36:14 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-06-08 21:05:08 +0200
commite9780d9b4e07af9b09446fc74ae43f31aba1a233 (patch)
tree7af37134fc250556235b80909f7bed9825013a37
parentaa7e9adbd7dff399ffbf677ca7dc8e70bb6b18b6 (diff)
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.
-rw-r--r--log-forward9
1 files changed, 5 insertions, 4 deletions
diff --git a/log-forward b/log-forward
index 6ccf39c..63c7ea7 100644
--- a/log-forward
+++ b/log-forward
@@ -19,7 +19,6 @@
:global LogForwardRateLimit;
:global NotificationsWithSymbols;
-:global CharacterReplace;
:global EscapeForRegEx;
:global HexToNum;
:global IfThenElse;
@@ -49,9 +48,11 @@ $ScriptLock $0;
:local MessageVal;
:local MessageDups [ :toarray "" ];
-:local LogForwardFilterLogForwarding ("^" . [ $CharacterReplace [ $EscapeForRegEx ("Error sending e-mail <" . \
- [ $QuotedPrintable ("[" . $Identity . "] %SYMBOLREGEX%Log Forwarding") ] . ">:") ] "%SYMBOLREGEX%" \
- ("((" . [ $SymbolByUnicodeName "memo" ] . "|" . [ $SymbolByUnicodeName "warning-sign" ] . ") )?") ]);
+:local LogForwardFilterLogForwarding ("^Error sending e-mail <(" . \
+ [ $EscapeForRegEx [ $QuotedPrintable ("[" . $Identity . "] " . \
+ [ $SymbolForNotification "memo" ] . "Log Forwarding") ] ] . "|" . \
+ [ $EscapeForRegEx [ $QuotedPrintable ("[" . $Identity . "] " . \
+ [ $SymbolForNotification "warning-sign" ] . "Log Forwarding") ] ] . ")>:");
:foreach Message in=[ /log/find where (!(message="") and !(message~$LogForwardFilterLogForwarding) and \
!(topics~$LogForwardFilter) and !(message~$LogForwardFilterMessage)) or \
topics~$LogForwardInclude or message~$LogForwardIncludeMessage ] do={