Queue messages and send them out in small batches
Bug #1413431 reported by
Kristina Hoeppner
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When a Mahara training is taking place on a site and pages / collections are created in / shared with a group and "Shared page notifications" are turned on, a lot of emails can be generated. When they are sent out they can result in a mail server to reject them esp. if all users have the same email domain.
It would be better if a queue was established and sent out in smaller batches so that mail servers don't blackmail the sender.
tags: | added: email notifications scalability |
Changed in mahara: | |
milestone: | 15.04.0 → 15.10.0 |
Changed in mahara: | |
status: | New → Confirmed |
Changed in mahara: | |
milestone: | 15.10.0 → 16.04.0 |
Changed in mahara: | |
milestone: | 16.04.0 → 16.10.0 |
Changed in mahara: | |
milestone: | 16.10.0 → 16.10.1 |
Changed in mahara: | |
milestone: | 16.10.1 → 17.04.0 |
Changed in mahara: | |
milestone: | 17.04.0 → 17.10.0 |
importance: | High → Medium |
Changed in mahara: | |
milestone: | 17.10.0 → 18.04.0 |
Changed in mahara: | |
milestone: | 18.04.0 → 18.10.0 |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I did some initial work towards this under Bug 1284887.
Honestly, I feel like in a perfect world this would be something that your friendly sysadmin could configure your mail server to deal with. Kind of like how denial-of-service stuff is also better handled at the server level.
But this is a less-than-perfect world, so we may as well tackle it in Mahara.
The implementation route I took, was to create a mail_queue table in the Mahara database. All emails sent to users in Mahara go through the function "email_user()", so instead of making this function actually send the email, we would make it insert into the mail_queue table.
A later cron task would then take the most recent X emails from mail_queue and actually send them out. The number of messages to send out on each cron task, would be configurable.