mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-29 12:50:07 +02:00
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:
parent
aa7e9adbd7
commit
e9780d9b4e
1 changed files with 5 additions and 4 deletions
|
@ -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={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue