aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--global-functions11
1 files changed, 11 insertions, 0 deletions
diff --git a/global-functions b/global-functions
index ad5651e..ba957a1 100644
--- a/global-functions
+++ b/global-functions
@@ -417,8 +417,19 @@
:set MailServerIsUp do={
:local MailServer [ / tool e-mail get address ];
+ :global EmailGeneralTo;
+
:global LogPrintExit;
+ :if ([ :len $EmailGeneralTo ] = 0) do={
+ :return true;
+ } else={
+ :if ($MailServer = "0.0.0.0") do={
+ $LogPrintExit warning ("No mail server is configured! Returning gracefully...") false;
+ :return true;
+ }
+ }
+
:if ([ :len [ / tool netwatch find where comment=$MailServer ] ] = 0) do={
$LogPrintExit warning ("Adding netwatch entry for mail server.") false;
:local MailHost $MailServer;