[ZBXNEXT-2404] send multiple email notifications in one TCP connection to SMTP server Created: 2014 Aug 06  Updated: 2018 Jan 04

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: None

Type: Change Request Priority: Major
Reporter: Denis Volkov Assignee: Unassigned
Resolution: Unresolved Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mail.txt    

 Description   

Currently there are 2 problems with alerter:
1. For every alert it opens new connection. That means establishing new TCP session, SMTP negotiation (EHLO/HELO). For large volumes of emails that means lots of unnecessary actions. Many smtp servers allow to establish connection, issue EHLO/HELO and then generate more than one message thus reducing overhead (attached log of sending 2 messages over one session)

2. For every alert Zabbix generates separate message, while it can generate 1 message with lots of emails (I've seen such requests on forum). For example, we have 26 users in the group, they all got notified about problems in host group. If there are some serious problems in this group we got LOTS of emails. If the server uses public email server (gmail, aol, etc) for sending alerts it would be sooner or later banned for high volume of emails.
Zabbix has two variants for sending messages on trigger actions:
1) send message to specific user
2) send message to group of users
In the 1st variant there's no need to try to aggregate emails, Zabbix admin should think of it by himself
In the 2nd variant Zabbix do unnecessary and strange things - it parses group and creates separate notifications for every user. I guess this was done for unification of notification process, but I think it should be
But it could create one record in the alerts table: "notify group 7" and then alerter could do smth like: "select group_concat(sendto) from media where mediatypeid in (select mediatypeid from media_type where type=0) and userid in (select userid from users_groups where usrgrpid=7) group by mediatypeid;" (just plain dumb request, I think it could be written much better way). After this request we got list of recipients suitable for "To:" field in email.



 Comments   
Comment by Denis Volkov [ 2014 Aug 06 ]

Of course 2nd variant should be an option, as this variant suits perfectly for own mail server and often not suitable for public servers

Comment by Aleksandrs Saveljevs [ 2016 Feb 02 ]

The description currently mentions two separate ideas:

  1. sending several emails in one TCP connection;
  2. sending one email to multiple recipients.

These are likely to be solved independently, so let's move the 2nd idea to the recently registered ZBXNEXT-3126.

I shall update this feature request's title to reflect the 1st idea.

Comment by richlv [ 2018 Jan 04 ]

ZBXNEXT-4175 might have affected/implemented this feature request.

Generated at Sun Jul 06 09:16:36 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.