notifications - smtp - handle burst notifications


zoggy

Recommended Posts

I have my unraid (v 6.8.3) box connected to UPS and set to email me if power outages happen.

We just had a few quick blips (off/on) which then of course triggered unraid to send multiple notifications in quick succession which triggered sender thread limit.


https://docs.microsoft.com/en-us/exchange/troubleshoot/send-emails/smtp-submission-improvements

Quote

 

An additional limit is being added. Under the new limit, up to three concurrent connections are allowed to send email messages at the same time. If an application tries to send more than three messages at the same time by using multiple connections, each connection will receive the following error message:

432 4.3.2 STOREDRV.ClientSubmit; sender thread limit exceeded

 

 

 

This resulted me not getting the final power back up notification.

 

Logs:

Feb 11 10:55:46 husky apcupsd[8835]: Power failure.
Feb 11 10:55:49 husky apcupsd[8835]: Power is back. UPS running on mains.
Feb 11 10:55:50 husky apcupsd[8835]: Power failure.
Feb 11 10:55:56 husky apcupsd[8835]: Running on UPS batteries.
Feb 11 10:55:56 husky sSMTP[30556]: Creating SSL connection to host
Feb 11 10:55:56 husky sSMTP[30556]: SSL connection using ECDHE-RSA-AES256-GCM-SHA384
Feb 11 10:55:59 husky sSMTP[30556]: Sent mail for [email protected] (221 2.0.0 Service closing transmission channel) uid=0 username=root outbytes=651
Feb 11 10:56:01 husky apcupsd[8835]: Mains returned. No longer on UPS batteries.
Feb 11 10:56:01 husky apcupsd[8835]: Power is back. UPS running on mains.
Feb 11 10:56:02 husky apcupsd[8835]: Power failure.
Feb 11 10:56:03 husky sSMTP[30627]: Creating SSL connection to host
Feb 11 10:56:03 husky sSMTP[30627]: SSL connection using ECDHE-RSA-AES256-GCM-SHA384
Feb 11 10:56:05 husky sSMTP[30627]: Sent mail for [email protected] (221 2.0.0 Service closing transmission channel) uid=0 username=root outbytes=636
Feb 11 10:56:08 husky apcupsd[8835]: Running on UPS batteries.
Feb 11 10:56:12 husky apcupsd[8835]: Mains returned. No longer on UPS batteries.
Feb 11 10:56:12 husky apcupsd[8835]: Power is back. UPS running on mains.
Feb 11 10:56:15 husky sSMTP[30705]: Creating SSL connection to host
Feb 11 10:56:15 husky sSMTP[30705]: SSL connection using ECDHE-RSA-AES256-GCM-SHA384
Feb 11 10:56:15 husky sSMTP[30706]: Creating SSL connection to host
Feb 11 10:56:15 husky sSMTP[30706]: SSL connection using ECDHE-RSA-AES256-GCM-SHA384
Feb 11 10:56:16 husky sSMTP[30706]: 432 4.3.2 STOREDRV.ClientSubmit; sender thread limit exceeded. Visit aka.ms/concurrent_sending for more info. [Hostname=SN7PR06MB7199.namprd06.prod.outlook.com]
Feb 11 10:56:17 husky sSMTP[30705]: Sent mail for [email protected] (221 2.0.0 Service closing transmission channel) uid=0 username=root outbytes=651

 

There are various smtp options to slow down sending/throttle if postfix was being used:

http://www.postfix.org/TUNING_README.html#slowdown

 

Not sure how to solve this with ssmtp/sendmail (notify wrapper), I guess just add slight delay before/after notification is sent out? so next one doesnt trigger limit?

 

Edited by zoggy
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.