Hello,
I recently setup ipMonitor to use an external process to send email to a backup smtp server in case of a mail server outage. In case anyone else needs this info I'm documenting it below.
Requirements:
Install Powershell on your ipMonitor server.
External Process Configuration:
Executable Name: powershell.exe
Directory: c:\windows\system32\windowspowershell\v1.0\
Startup DIrectory: c:\scripts <---- NOTE: This is the directory where you save the script.
Failure Command Line: -command "& {c:\scripts\MailServerDown.ps1}" <----- update this to match the path and name of your script.
Script: MailServerDown.ps1
#####################################
# Configure variables for email
#####################################
$filename = “”
$smtpServer = "servername.company2.com"
$sender = ”ipmonitor@company.com”
$recipient = "amanda@company2.com”
$subject = “Mailserver Down”
#####################################
# Dump file into message body
#####################################
$message = "This is an alert from the ipMonitor system at Company. One of the mail servers has a down alert. Please investigate."
#$message = Get-Content $filename | out-string <--- You can use this to dump a file into your message body. Just remove the '#' at the beginning
#####################################
# Email Audit file to Admins
#####################################
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($sender, $recipient, $subject, $message)
Last Step:
Attach the external process to an alert.
Kind Regards,
Amanda