Configuring Email Notifications in Zabbix



Introduction

When reviewing metrics in Zabbix, sometimes it’s not enough to just check the Current problems section on the dashboard. Zabbix has many additional ways to notify the administrator about certain events. One of them, which interests me, is configuring SMTP to send emails directly via Zabbix. I will describe in detail how to set up this configuration.

In fact, this important configuration is done in three stages:

  • Configuring user email
  • Configuring SMTP
  • Configuring notifications

After completing these steps, it will be necessary to check whether everything works correctly.

Configuring user email

For a user to receive emails, their address must be set in the account. To do this, go to the Users → Users menu, select the required user from the list, and go to the Media tab.

In the Media section, click Add. A Media window will open, where you just need to enter the user’s email and click Add. In this window, you can also set the schedule for sending emails and specify the type of event that will trigger an email. In other words, this configuration is quite flexible.

After saving the changes, the email address will be linked to the user, and you can proceed to the next step.

Configuring SMTP

The main settings are found under Alerts → Media types. From the list of available types, choose Email. Initially, you need to fill in the values on the Media type form. The Message templates and Options tabs can be configured later.

For testing, I created a dedicated email account specifically for Zabbix. Emails will be sent on behalf of this user. Now, using this information, you need to fill in the following fields:

Media type

  • Name – Email
  • Type – Email
  • Email provider – Generic SMTP
  • SMTP server – mail.yourdomain.com
  • SMTP server port – 465
  • Email[email protected]
  • SMTP helo – <mail.yourdomain.com>
  • Connection security – SSL/TLS
  • SSL verify peer – Checkbox
  • SSL verify host – Checkbox
  • Authentication – Username and password
  • Username[email protected]
  • Password – <password>
  • Message format – HTMLPlain text
  • Description – Postfix server for sending notifications from Zabbix
  • Enabled – Checkbox

To ensure the settings are correct, you can immediately test sending a test message. To do this, click the Test button, select the recipient, optionally write a message, and send the test email.

Once the test email is received, you can move on to the next stage – configuring notifications.

Configuring notifications

Notification settings are located under Alerts → Actions → Trigger actions. In this window, you will already see a list of created notification triggers, but we will create a new one by clicking the Create action button.

In the New action window, fill in the following fields:

On the Action tab:

  • Name – Email notification
  • Conditions – Select the appropriate trigger, for example, the one responsible for CPU temperature
  • Enabled – Checkbox

On the Operations tab, I configured only Operations action by clicking Add in this block. In this window, you only need to change two fields:

  • Send to users – select the recipient from the list
  • Send to media type – select the previously created media type – email

I decided to uncheck the following options: Notify about canceled escalations, Pause operations for symptom problems, Pause operations for suppressed problems. During notification testing, you can re-enable them if needed.

After completing this step, save the settings and notifications.

Viewing activity

To see the activity of email sending, go to Reports → Action log, where you will be able to view all successful or unsuccessful actions that were executed.

It is very strange that notifications are only sent to the Zabbix administrator’s email, while an ordinary user – user – does not receive such notifications. If you have the same issue, please describe in the comments how you solved it.

Conclusion

Configuring SMTP in Zabbix is a straightforward but crucial process that significantly enhances monitoring efficiency. Thanks to this configuration, the administrator can receive timely notifications about system issues without constantly checking the dashboard.

The process consists of clearly defined steps: setting up the user’s email, configuring SMTP parameters, and defining notification rules. Each of these stages is logical and easy to verify through built-in test tools.

However, it’s worth noting a potential nuance — notifications may not reach standard users even if everything is set up correctly. This may be due to additional permissions or configuration peculiarities within Zabbix. If you encounter a similar situation, I encourage you to share your solution, as this could help others who are trying to implement the same functionality.