mail-server
To configure an SMTP e-mail server address for Call Home, use the mail-server command in call home configuration mode. To remove one or all mail servers, use the no form of this command.
mail-server {ipv4-address | name} priority number
no mail-server { [ipv4-address | name [priority number]] | all}
Syntax Description
ipv4-address |
IPv4 address of the mail server. |
name |
Fully qualified domain name (FQDN) of 64 characters or less. |
priority number |
Number from 1 to 100, where a lower number defines a higher priority. |
all |
Removes all configured mail servers. |
Command Default
No e-mail server is configured.
Command Modes
Call home configuration (cfg-call-home)
Command History
Release |
Modification |
---|---|
12.2(33)SXH |
This command was introduced. |
12.2(33)SRC |
This command was integrated into Cisco IOS Release 12.2(33)SRC. |
12.4(24)T |
This command was integrated into Cisco IOS Release 12.4(24)T. |
12.2(52)SG |
This command was integrated into Cisco IOS Release 12.2(52)SG. |
Cisco IOS XE Release 2.6 |
This command was integrated into Cisco IOS XE Release 2.6. |
Cisco IOS XE 16.11.a Gibraltar |
The no mail-server all command is changed to no mail-server |
Usage Guidelines
To support the e-mail transport method in the Call Home feature, you must configure at least one Simple Mail Transfer Protocol (SMTP) mail server using the mail-server command.
You can specify up to four backup e-mail servers, for a maximum of five total mail-server definitions.
Consider the following guidelines when configuring the mail server:
-
Only IPv4 addressing is supported.
-
Backup e-mail servers can be defined by repeating the mail-server command using different priority numbers.
-
The mail-server priority number can be configured from 1 to 100. The server with the highest priority (lowest priority number) is tried first.
Note
Starting from Cisco IOS XE 16.11.a Gibraltar release, the configuration of mail-server command is case sensitive.
Examples
The following example configures two mail servers, where the mail server at “smtp.example.com” serves as the primary (with lower priority number than the second mail server), while the mail server at 192.168.0.1 serves as a backup:
Router(config)# call-home
Router(cfg-call-home)# mail-server smtp.example.com priority 1
Router(cfg-call-home)# mail-server 192.168.0.1 priority 2
The following example shows how to remove configuration of both configured mail servers:
Router(cfg-call-home)# no mail-server all