diff --git a/check-postfix.sh b/check-postfix.sh index 8297af4..3f793be 100755 --- a/check-postfix.sh +++ b/check-postfix.sh @@ -30,13 +30,11 @@ send_email () { The only option is to manually telnet to the smtp port on the authoritative mailserver for the target domain. As otherwise unless a mail-host is configured as an email relay, you will be unable to send an email to a user outside of the mailservers domain (without authentication). " do_emergency_email () { - local MESSAGE="${1:-"The Postfix service has failed to come up on tartarus (192.168.3.2) after a service restart. Please ssh into server to troubleshoot the issues."}" - + local MESSAGE="${1:-"The Postfix service has failed to come up on `hostname` (`hostname -i`) after a service restart. Please ssh into server to troubleshoot the issues."}" ## Getting a mailserver IP for manual message MAILSERVER=`dig $DOMAIN mx | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1` - ## Setting up coprocess to send commands to telnet session - coproc TELNET { telnet $MAILSERVER 25; } + ## Setting up coprocess to send commands to telnet session coproc TELNET { telnet $MAILSERVER 25; } ## Commands to send email manually local -a commands=(