aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-10-06 19:48:30 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-10-06 21:42:00 +0200
commit87b136f3a9c6b389f6cf95d37a4f0b638555c796 (patch)
treedcb957a4a37499d52a620bab96bf4647fcf2f537 /mod
parent702abd2a5d84dc95312bac3f43aebaaa5f159754 (diff)
mod/notification-email: handle new property name...routeros-7.12rc1-1
... which changed in RouterOS 7.12rc1.
Diffstat (limited to 'mod')
-rw-r--r--mod/notification-email.rsc5
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/notification-email.rsc b/mod/notification-email.rsc
index e266201..a505a50 100644
--- a/mod/notification-email.rsc
+++ b/mod/notification-email.rsc
@@ -42,7 +42,8 @@
:return false;
}
- :if ([ :typeof [ :toip [ /tool/e-mail/get address ] ] ] != "ip" && [ $IsDNSResolving ] = false) do={
+ :local EMailSettings [ /tool/e-mail/get ];
+ :if ([ :typeof [ :toip [ $EitherOr ($EMailSettings->"server") ($EMailSettings->"address") ] ] ] != "ip" && [ $IsDNSResolving ] = false) do={
$LogPrintExit2 debug $0 ("Server address is a DNS name and resolving fails, not flushing.") false;
:return false;
}
@@ -136,7 +137,7 @@
:local Cc [ $EitherOr ($EmailGeneralCcOverride->($Notification->"origin")) $EmailGeneralCc ];
:local EMailSettings [ /tool/e-mail/get ];
- :if ([ :len $To ] = 0 || ($EMailSettings->"address") = "0.0.0.0" || ($EMailSettings->"from") = "<>") do={
+ :if ([ :len $To ] = 0 || [ $EitherOr ($EMailSettings->"server") ($EMailSettings->"address") ] = "0.0.0.0" || ($EMailSettings->"from") = "<>") do={
:return false;
}