|
|
Configuring for alert notification via email
Email alert notifications when triggered are sent with Simple Mail Transfer Protocol (SMTP). To configure SMTP:
- In the SMTP Server field in the Alerts & Logging: SMTP&SMS menu enter the IP address of your outgoing mail server (and secure connection type and alternate SMTP port # - if applicable)
- Enter a Sender email address which will appear as the "from" address in all email notifications sent from this console server
- Enter a Username and Password if your SMTP server requires authentication
- Similarly you can specify the specific Subject Line that will be sent with the email. Generally the email subject will contain a truncated version of the alert notification message which is contained in full in the body of the email body
Configuring to send an SMS alert via an external SMTP gateway
You can use email-to-SMS gateway services to send SMS alert notifications to mobile devices from any console server. Almost all mobile phone carriers provide an SMS gateway service that forwards email to mobile phones on their networks. There’s also a wide selection of SMS gateway aggregators who provide email to SMS forwarding to phones on any carriers.
To enable this select SMS Gateway in the SMTP Settings field. An SMS via Email Gateway field will appear. To configure:
- Enter the IP address of the SMS SMTP mail server (and secure connection type and alternate SMTP port # - if applicable)
- Enter a Sender email address which will appear as the "from" address in all email notifications sent from this console server. This is particularly important with SMS alerts as some SMS gateway service providers will only forward email to SMS when the email has been received from nominated senders. So you may need to assign a specific authorized email address for the console server
- Enter a Username and Password if your SMS SMTP server requires authentication
- Similarly you can specify the specific Subject Line that will be sent with the email. Generally the email subject will contain a truncated version of the alert notification message which is contained in full in the body of the email body. Take care however as some SMS gateway service providers require blank Subject Lines or require specific authentication headers to be included in the Subject Line
Configuring to send an SMS alert via cellular modem
If your console server has an attached or internal cellular modem, you will be given the option to send the SMS directly over the carrier connection.
- Select Cellular Modem In the SMS Settings field
- Check Receive Messages to enable incoming SMS messages to be received. A custom script will be called on receipt of incoming SMS messages (see below)
- You may need to enter the phone number of the carrier’s SMS Message Centre (only if advised by your carrier or Support)
Sending the email or SMS alert over SMTP
The Alert and Auto Response facilities can send email or SMS alert notifications to nominated destination over the configured SMTP server. For firmware V3.4.1 and later this is Trigger Action is set up in the Alerts & Logging: Auto-Response menu:
For earlier firmware the alert response is set up in the Alerts & Logging: Auto-Response menu:
- For email alert notification, nominate the email address for the Email Recipient(s) to be notified of the alert. For multiple recipients you can enter comma separated addresses
- If an SMS alert is to be sent via a SMTP gateway you will need to specify the SMTP SMS Email Recipient(s) to be notified of the alert. For multiple recipients you can enter comma separated addresses. The recipient address will be in a format specified by the gateway provider e.g.
- T-Mobile: phonenumber @tmomail.net
- Virgin Mobile: phonenumber@vmobl.com
- Sprint: phonenumber@messaging.sprintpcs.com
- Verizon: phonenumber@vtext.com
- Nextel: phonenumber@messaging.nextel.com
where phonenumber = your 10 digit phone number.
There's also a wide selection of SMS gateway aggregators who provide email to SMS forwarding to phones on any carriers. Sending SMS via email using SMTP can be much faster than sending text pages via a modem using the TAP Protocol.
Sending an SMS alert direct over cellular connection
For firmware V3.4.1 and later :
- Select Send SMS as the trigger action in the Alerts & Logging: Auto-Response menu
- Specify a unique Action Name and any Action Delay Time (time after the trigger to perform this action)
- Enter the SMS phone number (in international format, without the +)
- Enter the SMS Message Text
For earlier firmware the direct SMS alert response is set up in the Alerts & Logging: Auto-Response menu.
Some custom email/SMS scripts
- The script /etc/scripts/alert-email is responsible for sending the email (and SMS email) alerts. This script gets run from within all the alert scripts (e.g. portmanager-user-alert or environmental-alert). However if you wish you can create your own custom or replacement alert script refer faq 332
- If you selected the Receive Messages option, the smstool program is configured to call /etc/config/scripts/sms-event on message receipt. This is a customer written script, which can take actions in response to incoming SMS message content e.g. the script below will cycle an RPC port:
#!/bin/bash
if [[ "$1" == "RECEIVED" ]]; then
password_set=`grep secretpassword $2`
if [ -n "$password_set" ]; then
/bin/pmport -l port02 -o 1 cycle
fi
fi
This script looks for secretpassword inside the message so it has a modicum of security.
|