Configuring mail server (SMTP) for alert notifications and Call Home use
With the ap config command you can configure the mail server (SMTP) to be used both for sending alert notifications from the platform as well as from Call Home.
About this task
Command syntax:
ap config --set smtp
--mail_server_name "mail server hostname or IP address"
--mail_server_port 25
--sender_name "user name for email sender"
--sender_address "valid email address for sender"
- --set smtp option <value> [option <value> [option <value> ...]]
- Sets SMTP details:
- If any of the options below is provided, all of the options from this list must be provided:
- --mail_server_name <server_name>
- Mail server name
- --mail_server_port <port>
- Mail server port
- --sender_name <sender_name>
- Sender signature to be displayed at the end of the notification email, for example:
Yours, Adam
- --sender_address <email>
- Email address of the sender
- Other options where all of the options below must be provided if
login_username
orlogin_password
is:- --login_method <value>
- Login method to be used. The following values are supported:
0 - no login
1 - cram-md5
2 - login
3 - plain - --login_username <username>
- User login.
- --login_password <password>
- User password. Note that the
--login_password
parameter might be provided without value. In such a case the user will be interactively prompted for password.
- If any of the options below is provided, all of the options from this list must be provided:
- --smtp_encryption <smtp_encryption>
- SMTP encryption method to be used. The following values are supported:
0 - no encryption
1 - STARTTLS
2 - SSL/TLS connection - --list smtp
- Lists SMTP configuration.
Example:
ap config --set smtp --mail_server_name na.relay.ibm.com --mail_server_port 25 --sender_name gt03 --sender_address gt03@ibm.com
The configured SMTP settings can be queried with this command:
ap config --list smtp
The configured SMTP settings can be tested with the following
command:
ap config --test smtp --value <email address or list>
and the
following response is
returned:SMTP connectivity test: message successfully sent to <specified address(es)>