diff options
author | Christian Hesse <mail@eworm.de> | 2023-10-06 23:37:54 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-01-30 00:30:32 +0100 |
commit | 6ad7ca2c1a424395fdb22b62a80591ed23ea602e (patch) | |
tree | 0e0d5534bf2740dc66c3b497c2bf8fca55c035f8 /mod/notification-email.rsc | |
parent | ccd7e6d1ed39b6e0d05cfe1cf367442e5ac90313 (diff) |
mod/notification-email: drop support for old property name
Diffstat (limited to 'mod/notification-email.rsc')
-rw-r--r-- | mod/notification-email.rsc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/notification-email.rsc b/mod/notification-email.rsc index 93cb941..16d2b86 100644 --- a/mod/notification-email.rsc +++ b/mod/notification-email.rsc @@ -3,6 +3,8 @@ # Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de> # https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md # +# requires RouterOS, version=7.12 +# # send notifications via e-mail # https://git.eworm.de/cgit/routeros-scripts/about/doc/mod/notification-email.md @@ -43,7 +45,7 @@ } :local EMailSettings [ /tool/e-mail/get ]; - :if ([ :typeof [ :toip [ $EitherOr ($EMailSettings->"server") ($EMailSettings->"address") ] ] ] != "ip" && [ $IsDNSResolving ] = false) do={ + :if ([ :typeof [ :toip ($EMailSettings->"server") ] ] != "ip" && [ $IsDNSResolving ] = false) do={ $LogPrintExit2 debug $0 ("Server address is a DNS name and resolving fails, not flushing.") false; :return false; } @@ -138,7 +140,7 @@ :local Cc [ $EitherOr ($EmailGeneralCcOverride->($Notification->"origin")) $EmailGeneralCc ]; :local EMailSettings [ /tool/e-mail/get ]; - :if ([ :len $To ] = 0 || [ $EitherOr ($EMailSettings->"server") ($EMailSettings->"address") ] = "0.0.0.0" || ($EMailSettings->"from") = "<>") do={ + :if ([ :len $To ] = 0 || ($EMailSettings->"server") = "0.0.0.0" || ($EMailSettings->"from") = "<>") do={ :return false; } |