1 E-mail

Overview

To configure e-mail as the delivery channel for messages, you need to configure e-mail as the media type and assign specific addresses to users.

Multiple notifications for single event will be grouped together on the same email thread.

Configuration

To configure e-mail as the media type:

  • Go to Alerts → Media types
  • Click on Create media type (or click on Email in the list of pre-defined media types).

The Media type tab contains general media type attributes:

1 E-mail - 图1

All mandatory input fields are marked with a red asterisk.

The following parameters are specific for the e-mail media type:

ParameterDescription
Email providerSelect the email provider: Generic SMTP, Gmail, Gmail relay, Office365, or Office365 relay.
If you select the Gmail/Office365-related options, you will only need to supply the sender e-mail address and password; such options as SMTP server, SMTP server port, SMTP helo, and Connection security will be automatically filled by Zabbix. See also: Automated Gmail/Office365 media types.
SMTP serverSet an SMTP server to handle outgoing messages.
This field is available if Generic SMTP is selected as the email provider.
SMTP server portSet the SMTP server port to handle outgoing messages.
This field is available if Generic SMTP is selected as the email provider.
EmailThe address entered here will be used as the From address for the messages sent.
Adding a sender display name (like “Zabbixinfo” in Zabbixinfo <[email protected]> in the screenshot above) with the actual e-mail address is supported since Zabbix 2.2 version.
There are some restrictions on display names in Zabbix emails in comparison to what is allowed by RFC 5322, as illustrated by examples:
Valid examples:
[email protected] (only email address, no need to use angle brackets)
Zabbixinfo <[email protected]> (display name and email address in angle brackets)
∑Ω-monitoring <[email protected]> (UTF-8 characters in display name)
Invalid examples:
Zabbix HQ <a href=”https://www.zabbix.com/cdn-cgi/l/email-protection“ class=”_cf_email“ data-cfemail=”9ee4fffcfcf7e6defdf1f3eefff0e7b0fdf1f3”>[email protected]
(display name present but no angle brackets around email address)
“Zabbix\@\<H(comment)Q\>” <<a href=”https://www.zabbix.com/cdn-cgi/l/email-protection“ class=”__cf_email
“ data-cfemail=”f18b9093939889b1929e9c81909f88df929e9c”>[email protected]>
(although valid by RFC 5322, quoted pairs and comments are not supported in Zabbix emails)
SMTP heloSet a correct SMTP helo value, normally a domain name.
If empty, the domain name of the email will be sent (i. e. what comes after @ in the Email field). If it is impossible to fetch the domain name, a debug-level warning will be logged and the server hostname will be sent as the domain for HELO command.
This field is available if Generic SMTP is selected as the email provider.
Connection securitySelect the level of connection security:
None - do not use the CURLOPT_USE_SSL option
STARTTLS - use the CURLOPT_USE_SSL option with CURLUSESSL_ALL value
SSL/TLS - use of CURLOPT_USE_SSL is optional
SSL verify peerMark the checkbox to verify the SSL certificate of the SMTP server.
The value of “SSLCALocation” server configuration directive should be put into CURLOPT_CAPATH for certificate validation.
This sets cURL option CURLOPT_SSL_VERIFYPEER.
SSL verify hostMark the checkbox to verify that the Common Name field or the Subject Alternate Name field of the SMTP server certificate matches.
This sets cURL option CURLOPT_SSL_VERIFYHOST.
AuthenticationSelect the level of authentication:
None - no cURL options are set
(since 3.4.2) Username and password - implies “AUTH=*” leaving the choice of authentication mechanism to cURL
(until 3.4.2) Normal password - CURLOPT_LOGIN_OPTIONS is set to “AUTH=PLAIN”
UsernameUser name to use in authentication.
This sets the value of CURLOPT_USERNAME.
PasswordPassword to use in authentication.
This sets the value of CURLOPT_PASSWORD.
Message formatSelect message format:
HTML - send as HTML
Plain text - send as plain text

To make SMTP authentication options available, Zabbix server should be compiled with the —with-libcurl compilation option with cURL 7.20.0 or higher.

See also common media type parameters for details on how to configure default messages and alert processing options.

Media type testing

To test whether a configured e-mail media type works correctly:

  • Locate the relevant e-mail in the list of media types.
  • Click on Test in the last column of the list (a testing window will open).
  • Enter a Send to recipient address, message body and, optionally, subject.
  • Click on Test to send a test message.

Test success or failure message will be displayed in the same window:

1 E-mail - 图2

User media

Once the e-mail media type is configured, go to the Users → Users section and edit user profile to assign e-mail media to the user. Steps for setting up user media, being common for all media types, are described on the Media types page.