mkemailserver

Use the mkemailserver command to create an email server object that describes a remote Simple Mail Transfer Protocol (SMTP) email server.

Syntax

Read syntax diagramSkip visual syntax diagrammkemailserver-nameserver_name-ipip_address_or_domain_name-portport-usernameusers_username-passwordusers_password-secureyesnotry

Parameters

-name server_name
(Optional) Specifies a unique name to assign to the email server object. The name must be a 1- through 63-character string, and cannot start with a hyphen or number. If a name is not specified, then a system default of emailservern is applied, where n is the object ID. When specifying a server name, emailserver is a reserved word.
-ip ip_address_or_domain_name
(Required) Specifies the IP address or domain name of a remote. This must be a valid IPv4 or IPv6 address or a fully qualified domain name. IPv6 addresses can be zero compressed. If you specify a fully qualified domain name, a DNS server must be configured on your system. You can use the mkdnsserver command to configure DNS servers.
-port port
(Optional) Specifies the port number for the email server. This must be a value of 1 - 65535. The default value is 25.
-username users_username
(Optional) Specify the username for authenticating to the email server. The maximum number of characters for the username is 64.
-password users_password
(Optional) Specify the password for authenticating to the email server. The maximum number of characters for the password is 64.
-secure yes|no|try
(Optional) Specify whether to establish a TLS connection to the email server. The following options are available:
  • try - if the email server does not support TLS connection, then continue and send the email insecurely.
  • yes - if the email server does not support TLS, stop the connection. Emails fail to send.
  • no - do not attempt to establish a TLS connection to the email server. Emails are sent insecurely.

Description

This command creates an email server object that represents the SMTP server. The system uses the email server to send event notification and inventory emails to email users. It can transmit any combination of error, warning, and informational notification types.

The system supports multiple email servers to provide redundant access to the external email network. The email servers are used in turn until the email is successfully sent. The attempt is successful when the system gets a positive acknowledgment from an email server that the email has been received by the server.

If you are using a cloud-based email server, authentication can be achieved by setting up the username and password.

You can specify -secure flag and the system proceeds based on whether the email server supports TLS connection.

An invocation example

mkemailserver -ip servername.example.com -port 78

The resulting output:

Emailserver id [2] successfully created