From 87b136f3a9c6b389f6cf95d37a4f0b638555c796 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 6 Oct 2023 19:48:30 +0200 Subject: mod/notification-email: handle new property name... ... which changed in RouterOS 7.12rc1. --- mod/notification-email.rsc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mod') 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; } -- cgit v1.2.3-70-g09d2