diff options
-rw-r--r-- | global-functions | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/global-functions b/global-functions index 83d7b2a..bae9fd6 100644 --- a/global-functions +++ b/global-functions @@ -338,7 +338,12 @@ $LogPrintExit warning ("Adding netwatch entry for mail server.") false; :local MailHost $MailServer; :if ([ :typeof [ :toip $MailHost ] ] != "ip" ) do={ - :set MailHost [ :resolve $MailServer ]; + :do { + :set MailHost [ :resolve $MailServer ]; + } on-error={ + $LogPrintExit warning ("Resolving mail server failed.") false; + :return false; + } } / tool netwatch add comment=$MailServer host=$MailHost; } |