Manual Chapter : Email Notifications SMTP

Applies To:

Show Versions Show Versions

ARX

  • 6.3.0
Manual Chapter
13 
The SMTP mail queue holds email messages until they are successfully delivered. Use the clear smtp queue command to delete all such queued messages.
Messages are only in the mail queue for a very short time before the first attempt to deliver them. If you can see a message with show smtp queue, the message has not yet been successfully delivered. Use this command to delete all messages from the queue.
Use show smtp status to see details on the most-recent message delivery, and to view the current configuration for SMTP.
bstnA# clear smtp queue
Use the optional description command to set a descriptive string for the current email-event role. An email event role is a configurable list of SNMP traps, along with a group of users who receive email notifications for those traps. This appears in the show command.
Use the no form of the command to delete the description.
text (1-255 characters) is your description. Surround the text with quotation marks ( ) if it contains any spaces.
bstnA(cfg-email-event[noc3])# description support team at NOC3
Use the email-event command to start defining a set of ARX events to be emailed, the conditions under which the switch sends the email(s), and any recipients who should receive them. This creates a profile, or role, for one or more users who require event notification.
Use no email-event to remove an email event role.
role (1-128 characters) is a name that you choose for this set of email events, trigger conditions, and mail recipients (for example, nocGroup).
Before an email-event can notify any users of system events, smtp must be configured for this ARX.
This command places you in cfg-email-event mode, where you can access several commands that define the email event role. To enable groups of events at a time, use the group (cfg-email-event) command. You can also use this command to set thresholds or schedules for email notification (for example, send for every 3 occurrences of a group event, or once each week). You can enable individual events with the group ... event command, which can also override any default-threshold settings made for the events group. The mail-to (cfg-email-event) command chooses an email recipient for this set of events; enter this command once for each desired recipient. You can use the description (cfg-email-event) command to add an optional description to the email event configuration; this appears in the output of show email-event. Use enable (cfg-email-event) to enable all of the rules in this email event configuration. Notification does not begin until you enable the email event role.
You can reuse the email-event command to define multiple email event roles.
To send a small test message to all configured email recipients, use the smtp test email-event command. After a successful test, you can use smtp welcome to send an introductory email to all of the recipients.
bstnA(cfg)# email-event noc3
bstnA(cfg)# no email-event testEmail
Use no email-severity to revert to a default email severity.
email-severity event-name level {normal | warn | minor | major | critical}
event-name (1-64 characters) identifies an event. An event corresponds to one SNMP trap, cataloged in the ARX SNMP Reference. Use a ? after the email-severity keyword for a full list of eligible email events (for example, email-severity ?).
normal | warn | minor | major | critical sets the severity for the events email messages.
To send SNMP traps in email, configure smtp and then set up at least one email-event role.
Use show email-severity to show the current severities for one or more events.
bstnA(cfg)# email-severity auto-reboot level critical
bstnA(cfg)# no email-severity disk-state
Use no enable to disable the current email event role.
Use the from command to set the From field in all email messages from the ARX.
Use no from to revert to the default From string.
from hostname@domain
hostname@domain is 1-132 characters (for example, admin@arx1000-B.nemed.com). Use only alphabetical characters (a-z and A-Z), numeric characters (0-9), - (dash), _ (underscore), and/or . (period).
Enter an email address that uses acceptable characters (listed above in Syntax). If there are any invalid characters, the CLI rejects the string with an error.
bstnA(cfg-smtp)# from aco_admin@acopia.wwmed.com
Use the no form to remove a group of events from a role.
group group-name [threshold-counter counter | threshold-interval time {minutes | hours | days}]
no group group-name [threshold-counter counter | threshold-interval time {minutes | hours | days}]
group-name is chassis, cifs, storage, metadata, nsck, policy, snapshot, stats-monitor, virtual-server, network, redundancy (for any chassis except the ARX-VE), or all.
threshold-counter counter (optional, 1-128) sets a threshold based on the number of events that occur from this group. For example, threshold-counter 4 means that each event from this group triggers an email if it occurs 4 times.
threshold-interval time {minutes | hours | days} (optional) sets a schedule for this group. For example, threshold-interval 1 days causes the system to accumulate traps throughout the day and, if there are any, send a single email describing all of them. All time calculations begin when you enter this configuration; if the threshold interval is 1 day, the switch sends the email at the current time of day.
You cannot choose the redundancy group on the ARX-VE.
This command enables one group of events for the current email event role. Whenever the system reaches a threshold you set with this command, it sends an email to any or all mail-to (cfg-email-event) recipients. You can optionally use the group ... event command to configure a single event in the group, or to set a different threshold for a particular event.
The system keeps a maximum of 128 events for any event group. This is a hard threshold, even if you use the threshold-interval option to create a time-based schedule. For example, suppose you configure the following:
If you use group ... event to add a specific event, the no group command for its group does not delete that event. For example, the following command sequence does not delete the warmstart event:
bstnA(cfg-email-event[noc3])# group metadata threshold-counter 5
group group-name event event-name [threshold-counter counter | threshold-interval time {minutes | hours | days}]
no group group-name event event-name [threshold-counter counter | threshold-interval time {minutes | hours | days}]
group-name is chassis, cifs, storage, metadata, nsck, policy, snapshot, stats-monitor, virtual-server, network, redundancy (for any chassis except the ARX-VE), or all.
event-name (1-64 characters) is one of the events in the group. Each of these corresponds to one SNMP trap, cataloged in the ARX SNMP Reference. Use a ? after the event keyword for a full list of events in this group (for example, group chassis event ?).
threshold-counter counter (optional, 1-128) sets a threshold based on the number of times this event occurs. For example, threshold-counter 4 means that any four occurrences trigger an email.
threshold-interval time {minutes | hours | days} (optional) sets a schedule for this event. For example, threshold-interval 1 days causes the system to accumulate instances of this event throughout the day and, if there are any, send a single email describing all of them. All time calculations begin when you enter this configuration; if the threshold interval is 1 day, the switch sends the email at the current time of day.
You cannot choose the redundancy group on the ARX-VE.
The no form of the command disables the events threshold (so that the event defaults to the threshold for its group), or removes the event altogether. See the Samples, below.
bstnA(cfg-email-event[noc3])# group metadata event online threshold-counter 2
bstnA(cfg-email-event[testteam])# group virtual-server event server-offline
bstnA(cfg-email-event[noc3])# no group metadata event online threshold-counter 2
bstnA(cfg-email-event[noc3])# no group chassis event cpu-status
The mail-server command identifies the next-hop email server for the ARX.
Use no mail-server to delete the email server name.
mail-server ip-or-name
ip-or-name (1-132 characters) identifies the mail server, either by IP address or DNS name (for example, 192.168.25.44 or mailServer3.myco.com).
To see the currently configured mail server, use the show smtp status command. To test the mail-server configuration, use the smtp test server command.
Important: The no mail server command disables all email deliveries.
bstnA(cfg-smtp)# mail-server email1.wwmed.com
Use the no mail-to command to remove an email recipient.
mail-to recipient
no mail-to recipient
recipient (1-768 characters) is one email recipient (for example, juser@nemed.com).
A sample email appears in Figure 13.1 on page 13-15. You can use the ID (highlighted in the sample) to look up the trap in the ARX SNMP Reference.
bstnA(cfg-email-event[noc3])# mail-to juser@wwmed.com
bstnA(cfg-email-event[noc3])# no mail-to ex@nemed.com
Figure 13.1 Sample Email Event
Use no maximum age to return to the default.
days (1-366) is the number of days to retry before deleting the message.
The ARX retries a message every n minutes for the first two hours; you can use retry interval to set the value of n. The retry interval increases geometrically if the failures persist. After some number of days without success (set by this command, maximum age), the switch deletes the message from the mail queue.
Use show smtp queue to view all messages currently in the mail queue. These are the messages that have failed and are being saved for retries. You can use smtp retry to retry all queued messages now. The clear smtp queue command deletes all the messages without sending them.
bstnA(cfg-smtp)# maximum age 30
bstnA(cfg-smtp)# no maximum age
Use no retry interval to return to the default interval.
minutes (1-119) is the number of minutes to wait between email retries.
The ARX retries a message every n minutes for the first two hours; this command sets the value of n. The retry interval increases geometrically if the failures persist. After some number days without success (set by maximum age), the switch deletes the message from the mail queue.
Use show smtp queue to view all messages currently in the mail queue. These are the messages that have failed and are being saved for retries. You can use smtp retry to retry all queued messages now. The clear smtp queue command deletes all the messages without sending them.
bstnA(cfg-smtp)# retry interval 10
bstnA(cfg-smtp)# no retry interval
show email-event {role-name | all}
role-name (1-128 characters) is one role (for example, tech-support).
all selects all roles.
SMTP shows a summary of the SMTP settings for this ARX:
From is used in the From field of all emails. You can set this with from (cfg-smtp).
Local Mail Server is the SMTP server that is the next hop for all emails. You can set this with mail-server.
Email Event describes the configuration of one email-event role:
Role is the name of the email-event role, set with the email-event command.
Description shows the optional description for this role. You can use the description (cfg-email-event) command to set (or change) this description.
To is a comma-separated list of email recipients. You can add one with the mail-to (cfg-email-event) command.
Admin State shows whether or not this role is enabled. Use enable (cfg-email-event) to enable the role.
Group Name is set with the group (cfg-email-event) command.
Threshold Counter is either a number or n/a. If this many events from the group occur, the system sends an email. This is set with the threshold-counter option in the above group command.
Threshold Interval (every) is either time value (such as 2 hours or 7 days) or n/a. If any events from the group occur during this time, the system sends an email at the end of the time interval. This is set with the threshold-interval option in the group command.
Group Name is set with the group ... event command.
Event Name is set with the same command.
Threshold Counter is either a number or n/a. If this many instances of the event occur, the system sends an email. This is set with the threshold-counter option in the group ... event command.
Threshold Interval (every) is either time value (such as 10 minutes or 12 hours) or n/a. If any instances of this event occur during this time, the system sends an email at the end of the time interval. This is set with the threshold-interval option in the group ... event command.
bstnA# show email-event all
bstnA# show email-event noc3
bstnA# show email-event all
bstnA# show email-event noc3
show email-severity {event-name | all | non-default}
event-name (1-64 characters) is one event (for example, module-failure).
all shows all events.
non-default shows any events that have a non-default severity.
The output is a table with two columns: Event Name and Severity. You can use the email-severity command to reset the severity.
bstnA# show email-severity all
bstnA# show email-severity non-default
bstnA# show email-severity nvram-battery-failure
bstnA# show email-severity all
bstnA# show email-severity non-default
bstnA# show email-severity nvram-battery-failure
Use the show smtp queue command to see the email messages that are queued for delivery, if any.
Status is pending, to indicate that the message is waiting for final delivery.
From can be reset (for future emails) with from (cfg-smtp).
Size is in bytes if no unit (K, M, G, or T) appears after the number. K is for KiloBytes (1024 bytes), M is for MegaBytes (1024*1024 bytes), and so forth.
Time is when the message was created.
To can be reset for future emails with to.
The ARX retries a message every few minutes (set by retry interval) for the first two hours. This retry interval increases geometrically if the failures persist. After some days without success (set by maximum age), the switch deletes the message from the mail queue. You can use smtp retry to retry all queued messages now. The clear smtp queue command deletes all the messages without sending them.
Use show smtp status to see details on the most-recent message delivery, and to view the current configuration for SMTP.
bstnA# show smtp queue
bstnA# show smtp queue
Use the show smtp status command to see the status of the most recent outbound email, as well as all SMTP-configuration settings.
SMTP Last Transfer shows the last email message that was collected for delivery. This is not the most-recent retry; it is the most-recent message (or test) that was generated.
Last file is the file name and size for the attachment file.
Status shows the status of the most-recent delivery:
Delivered to mail-server
Deferred means that the message has been added to the mail queue.
Configuration error means that the configuration is missing some information. (see the SMTP Current Configuration section, below)
Could not communicate with mailserver indicates a network problem, a DNS-configuration error, or an SMTP configuration error (such as the wrong name for mail-server).
Message size exceeds limit means that the local mailserver did not accept the large attachment with the file. You must configure the mail server to allow very large email attachments.
Insufficient disk space indicates that there is not enough disk space to add the message to the mail queue.
Error uuencoding file are internal problems.
Message Created is the time when the message was first generated.
SMTP Current Configuration shows the configuration that is in effect. This configuration will be applied to current and future email messages.
To can be set with to.
From can be set with from (cfg-smtp).
Via is the SMTP server that is the next hop for all emails. You can set this with mail-server.
Retry Interval is the time between retries for messages in the mail queue. The ARX uses this interval for the first two hours, then starts using larger intervals if the failures persist. You can set this initial interval with the retry interval command.
Maximum Age is maximum number of days to keep a message in the mail queue before deleting it. Use maximum age to set this value.
Use show smtp queue to see any pending email messages. To send a test message, use smtp test message. If messages are failing, you can run smtp test server to test SMTP communication with the local email server.
bstnA# show smtp status
bstnA# show smtp status
You can use the smtp welcome command to send an introductory email to all users of an email-event role. Use the show smtp welcome command to see the welcome message for this introductory email.
bstnA# show smtp welcome
Use no smtp to erase all SMTP configuration parameters and disable email notifications.
You must configure DNS for the SMTP service to work. See the instructions for ip name-server. You must have layer-2 and layer-3 connectivity to your server network(s) before DNS or SMTP can function.
Use this command to enter cfg-smtp mode, where you set up the necessary parameters for email. You can use from (cfg-smtp) to set the From field in all out-bound emails (for example, From: hostname@domain). The mail-server command identifies the local mail server to be used as the next hop for mail messages. Use the to command to set one or more destinations for emails. If an email delivery fails, it retries at the frequency set by retry interval, up to a maximum number of days (maximum age). After the maximum age expires, the ARX deletes the message.
To send a test message, use smtp test message reply-to with a local destination for the message. You can view any undelivered messages with the show smtp queue command. Use the smtp retry and clear smtp queue commands to manage this mail queue. If messages are consistently failing, you can run smtp test server to test SMTP communication with the local email server.
After you finish configuring SMTP, you can configure certain system events to be delivered in email messages. Each event is analogous to an SNMP trap; see the ARX SNMP Reference for a full list of ARX Enterprise traps, including the traps that have email support. You can choose individual events or groups of them, one or more email recipients for the events, and thresholds (or a schedule) for sending the emails. All of these components can be assigned to technicians who perform a specific role. Use the email-event command to begin configuring one such role. You can create multiple roles by re-using this command.
SMTP is also useful for sending collected diagnostics and other maintenance files over email. After you configure SMTP, use the collect command to collect and send diagnostics. You can also use copy smtp to send log files, reports, or other files that could be useful for maintenance.
The SMTP mail queue holds email messages until they are successfully delivered. Use the smtp retry command to retry all queued messages at once.
This is particularly useful if there was a network problem between the ARX and the next-hop mail server (mail-server). After you fix the network problem, you can use this command to re send all queued messages. You can use show smtp queue to see the mail queue before and after the retry.
As an alternative, you can use clear smtp queue to remove all messages from the queue.
When you change a parameter in cfg-smtp mode (see smtp) and then exit the mode, the ARX automatically retries all messages in the queue using the new parameters. There is no need to invoke this command under these circumstances.
Use show smtp status to see details on the most-recent message delivery, and to view the current configuration for SMTP.
bstnA# smtp retry
Use the smtp test email-event command to test an email-event configuration. This sends a test email to all configured recipients.
role-name (1-128 characters) is the role to test (for example, tech-support). Use show email-event all for a list of all configured email-event roles.
Use this command to send an email message with a small test attachment. the message goes to all mail-to (cfg-email-event) recipients configured for the chosen email-event role. Use show email-event role-name to see all recipients for a given role. You can use this to verify the email-event configuration and SMTP setup.
An error appears if there is a delivery problem. In this case, you can use show smtp queue to see the test message in the mail queue. To retry the message (perhaps after correcting the network configuration), use smtp retry. Use clear smtp queue to remove all messages from the queue. If the delivery problems persist, you can run an SMTP diagnostic test, smtp test server, and send the output back to F5 for analysis.
Use show smtp status to see details on the most-recent message delivery, and to view the current configuration for SMTP.
After a successful test, you can use the smtp welcome command to send a welcome message to all email recipients. This message informs the recipients of the events that will trigger email messages in the future.
bstnA# smtp test email-event noc3
Use the smtp test message command to send a test email message.
user@domain (optional, 1-256 characters) is an email destination for the test-message reply.
reply-to user@domain defaults to the setting of the to command if you omit the option.
The message is delivered to the next-hop mail-server. An error appears if there is a delivery problem. In this case, or if no reply email arrives for 15 minutes or more, you can use show smtp queue to see the test message in the mail queue. Also, check the email filter at the destination mailbox. To retry the message (perhaps after correcting the network or filter configuration), use smtp retry. Use clear smtp queue to remove all messages from the queue. If the delivery problems persist, you can run an SMTP diagnostic test, smtp test server, and send the output back to F5 for analysis.
Use show smtp status to see details on the most-recent message delivery, and to view the current configuration for SMTP.
bstnA# smtp test message reply-to jsmith@wwmed.com
At the advice of F5 personnel, use the smtp test server command to test the SMTP-layer connection to the email server.
This command runs a series of STMP queries against the next-hop mail-server. After you enter this command, the CLI shows the detailed results of this test.
Run the test when you see email delivery problems. If the SMTP queue has undelivered messages in it (show smtp queue), or if smtp test message fails, you should run this test. Send the results back to F5 for further diagnosis.
bstnA# smtp test server
bstnA# smtp test server
Use the smtp welcome command to send an introductory email message to all users in an email-event configuration. The introductory message informs the recipients of the types of system events they will be receiving through email.
smtp welcome [role-name]
role-name (optional, 1-128 characters) is the role to receive the email message (for example, noc_7). Use show email-event all for a list of all configured email-event roles.
role-name defaults to all roles if you omit it. That is, the command sends a welcome message to all users in all email-event roles.
Use this command to send an introductory email message to the recipients of email events. the message goes to all mail-to (cfg-email-event) recipients configured for the chosen email-event role (or all roles, if no specific role was selected). Use show email-event role-name to see all recipients for a given role.
Use show smtp status to see details on the most-recent message delivery, and to view the current configuration for SMTP. If the message fails, you can use smtp test email-event to test the email-event configuration and SMTP setup.
bstnA# smtp welcome noc3
Use the to command to set destination address(es) for emails from the ARX.
Use the no to command to revert to the default destination.
to destination-list
destination-list (1-1024 characters) is a comma-separated list of email recipients (for example, juser@nemed.com or jqpublic@wwmed.com,juser@nemed.com). Surround this field with quotation marks if it contains any spaces.
bstnA(cfg-smtp)# to juser@das1.wwmed.com,e-support@f5.com