[MNT-21776] Ability to configure how many emails are sent via one connection to the mail server Created: 06-Aug-20  Updated: 23-Sep-20

Status: Need Info
Project: Service Packs and Hot Fixes
Component/s: Email Notifications
Affects Version/s: 5.1.1
Fix Version/s: None

Type: Improvement
Reporter: Elisabeth Wetchy Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File logExcerpt.txt    
Bug Priority:
Category 4
ACT Numbers:

01012667


 Description   

Feature summary
It should be possible to configure how many emails ACS can send on a single connection to a mail server, allowing the connection to be renewed periodically for security reasons.

Current behaviour
It's currently not possible to configure how many emails ACS will send per connection opened to the mail server and opened connections are potentially kept open and reused indefinitely.

This can cause issues with mail servers or spam gateways that impose a limit on how many emails can be sent per session and throw an error when this number is exceeded.

Currently the only way to get around this is to configure exceptions on the mail server, e.g. by whitelisting the Alfresco server and excluding it from spam checks, but this may not be acceptable for security reasons (for example to avoid a server that is whitelisted being hacked and used to send spam emails).

Supporting Evidence
Attached file "logExcerpt.txt"

  • Part of a log file starting with a new Transport being created by AlfrescoJavaMailSender and ending with the Transport being destroyed after a 421 error (too many messages in one session) is received from the mail server
  • External mail server allows 100 emails per session
  • Between the log messages "Creating new Transport" at 21:31:59 and "Destroying Transpaort" at 21:38:56 there are exactly 100 debug messages from MailActionExecuter sending out emails.
    The 100th message it tries to send fails and we see the 421 error straight after, so the Transport created by AlfrescoJavaMailSender seems to correspond exactly to a session in the mail server

Generated at Mon Jun 21 20:50:23 BST 2021 using Jira 7.13.15#713015-sha1:7c5ddd2c3e1709974ae9c48c17df8edd3919fe2c.