mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-31 00:04:51 +02:00
log-forward: generate filter in mod/notification-email
This commit is contained in:
parent
34ed387343
commit
868557a24a
2 changed files with 20 additions and 8 deletions
|
@ -4,6 +4,7 @@
|
|||
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||
|
||||
:global FlushEmailQueue;
|
||||
:global LogForwardFilterLogForwarding;
|
||||
:global NotificationFunctions;
|
||||
:global SendEMail;
|
||||
:global SendEMail2;
|
||||
|
@ -88,6 +89,21 @@
|
|||
}
|
||||
}
|
||||
|
||||
# generate filter for log-forward
|
||||
:set LogForwardFilterLogForwarding do={
|
||||
:global Identity;
|
||||
|
||||
:global EscapeForRegEx;
|
||||
:global QuotedPrintable;
|
||||
:global SymbolForNotification;
|
||||
|
||||
:return ("^Error sending e-mail <(" . \
|
||||
[ $EscapeForRegEx [ $QuotedPrintable ("[" . $Identity . "] " . \
|
||||
[ $SymbolForNotification "memo" ] . "Log Forwarding") ] ] . "|" . \
|
||||
[ $EscapeForRegEx [ $QuotedPrintable ("[" . $Identity . "] " . \
|
||||
[ $SymbolForNotification "warning-sign" ] . "Log Forwarding") ] ] . ")>:");
|
||||
}
|
||||
|
||||
# send notification via e-mail - expects one array argument
|
||||
:set ($NotificationFunctions->"email") do={
|
||||
:local Notification $1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue