SMTP Monitor

The SMTP monitor works in along with the IMAP4 or POP3 monitors to test the performance of an email service.

The following table lists the SMTP monitor files.

Table 1. SMTP monitor files 
Monitor files Name or location
Monitor executable nco_m_smtp
Properties file $ISHOME/etc/props/smtp.props
Rules file $ISHOME/etc/rules/smtp.rules
Log file $ISHOME/log/smtp.log
Guidelines for monitoring SMTP monitor

The SMTP monitor operates along with the POP3 or IMAP4 monitors. It periodically sends an email message to a mailbox on the target server and records the time taken to issue the send email request. The POP3 or IMAP4 monitor then reads the messages from the mailbox and uses them to calculate the response time and availability of the email service.

Note: The SMTP monitor operates along with the POP3 or IMAP4 monitors. It periodically sends an email message to a mailbox on the target server and records the time taken to issue the send email request. The POP3 or IMAP4 monitor then reads the messages from the mailbox and uses them to calculate the response time and availability of the email service.
Mailboxes

You may configure the monitor to send email messages to any existing mailbox, even if the mailbox belongs to a real user. However, it’s recommended that you create a special mailbox account for service testing. The email parameter specifies the recipient mailbox. By default, the monitor sends test messages with the subject line SMTP Monitor Test Message.If required, you can configure SMTP profile elements without a mailbox name. In this configuration, the monitor simply checks that the SMTP service is accepting connections.

Secure mails

The SMTP monitor supports connections to secure mail services. It can connect using SSL/TLS, or the STARTTLS command. When defining an SMTP monitor element, use the Security Type field to select the appropriate security. If the mail server requires a client-side certificate for SSL encryption, use the SSLname properties or command line options to specify a certificate file, key file, key password and cipher suite.

Client-side certificate
The SMTP monitor enables you to monitor servers that require client-side certificates for mutual authentication. You specify the SSL certificate file, key file, and key password when creating a profile element. Certificates must be in Privacy Enhanced Mail (PEM) format. If the certificate is in another format, you must convert it to PEM format. Certificates can be converted using software such as openSSL, which is available from http://www.openssl.org.
Note: If you always use the same certificate, key, and password in all profile elements, specify them using monitor properties instead of defining them in every profile element you create.
Configure the SMTP monitor service tests

Use the SMTP monitor configuration parameters to define service tests. When you configure the monitor, default values are shown for the timeout and poll interval parameters. These defaults are 30 and 300 seconds respectively. If no value is specified other defaults listed in the table aren’t shown during configuration but are applied when the configuration details are saved.

Table 2. SMTP monitor configuration
Field Description
server

The IP address of the mail server. Example is mail.mycompany.com

description A text field for providing descriptive information on the element.
port

The port number of the mail server.

Default: 25

If you use a server other than an SMTP server, update the port on which to connect to the server. For example, if you use an IMAP4 server over SSL for Microsoft Exchange, specify port 465.

securitytype

The type of secure connection opened with the mail server:

  • NONE - Connect without security
  • SSL - Send an SSLv2 hello, then negotiate SSLv2, SSLv3 or TLSv1
  • STARTTLS - Connect without security, issue a STARTTLS command, then establish a connection over TLSv1

Default: NONE

username

The username used to log in to the SMTP server. Used with PLAIN or CRAM-MD5 authentication.

password

The password used to log in to the SMTP server. Used with PLAIN or CRAM-MD5 authentication.

authenticationtype

The method to authenticate the monitor to the SMTP server. The available options are:

  • NONE - No authentication is attempted
  • PLAIN - Plain text username and password authentication
  • CRAM-MD5- CRAM-MD5 authentication is used

Default value is NONE.

sharedsecret The shared secret key for CRAM-MD5 authentication.
email The email address of the mailbox used by the SMTP and POP3 monitors.
timeout

The time, in seconds, to wait for the SMTP server to respond.

Default: 30

poll

The time, in seconds, between each poll.

Default: 300

failureretests

The number of times to retest before indicating a failure.

Default: 0

retestinterval

The time, in seconds, to wait between each failure retest.

Default: 10

Note: Monitor the availability of the mail server mail.mycompany.com by attempting to connect to it at 10-minute intervals. Use a connection timeout of 30 seconds and, if the connection fails, retry three times with 5 seconds between each retry.
Monitor element

In addition to the test results common to all elements, the SMTP monitor generates a set of test results containing data specific to SMTP service tests.

The following table describes the additional elements for the SMTP monitor.

Table 3. SMTP monitor elements 
Element Description
$authentication The type of user authentication method required by the SMTP server (Standard or APOP).
$bytesPerSec The average number of bytes transferred each second.
$bytesTransferred The number of bytes uploaded or downloaded.
$connectTime*

(ConnectTime)

The time taken to connect to the SMTP server.
$email*

(EmailAddress)

The email address of the mailbox to which the monitor to sends test email.

$lookupTime*

(LookupTime)

The time taken to obtain the IP address of the host server.

$port*

(Port)

The port on which the service is monitored.

$responseTime*

(ResponseTime)

The time taken, after a connection is created, until the first byte of the test email can be sent to the SMTP server.

$security

The type of secure connection opened with the mail server (NONE, STARTTLS or SSL) as set in the profile element securitytype field.

$SSLHandshakeTime*

(SslHandshakeTime)

The time taken to establish the SSL connection.

$status*

(ResultStatus)

The status code returned by the SMTP server.

$uploadTime*

(UploadTime)

The time taken to upload the file.

$user*

(SmtpUser)

The username (account name) used by the monitor to log in to the SMTP server.
Status message

The SMTP monitor provides status messages in the $message element when using IBM® Application Performance Management. These messages indicate the result of the test.

Properties

Properties specific to the SMTP monitor are described in the following table.

Table 4. SMTP monitor properties and command-line options
Property name Property parameter Description
MailMessage Path string Path to a file containing text to send in the test email. A default message is sent if this isn’t set.
Originator string

Specifies the From field to set when sending the test email. Ensure that this matches the corresponding string in the IMAP4 monitor.

Default: SMTP-Monitor.

SSLCertificate File string

The path and filename of the digital certificate file used if no certificate is explicitly specified for an SMTP element during its creation.

If the path isn’t absolute, the monitor interprets it relative to the working directory ($ISHOME/platform/arch/bin).

SSLCipherSuite string

The cipher suite to use for SSL operations. For a description of possible values, see Cipher suites.

Default: RC4:3DES:DES:+EXP

SSLDisableTLS integer

Disables TLSv1 for legacy support.

Default: 0 - TLSv1 is enabled.
1 TLSv1 is disabled.

SSLKeyFile string

The file containing the SSL private key.

SSLKeyPassword string

The password used to encrypt the SSL private key.

UseBody integer

Specifies where the monitor writes tracking information in the mail message, either in the mail header or mail body.

Default: 0 - information is included in the mail header.
1 - write information to the mail body.

Cipher suites

The SSLCipherSuite property specifies the cipher suite used by the SMTP monitor. For more information about SSL settings, see SSL setting in Internet Service Monitoring.