Starting in Moodle 3.2, we are considering doing relatively significant changes to the way Moodle delivers email, following on from various issues reported over the years. Adrian and Simey have been working on a patch in MDL-44467 and I have been discussing the issue quite a bit with them.
I was particularly reminded of these problems by Jamie Kramer's presentation at #mootus16 - Moodle Email Problems and Solutions and it brought me back to my own experience doing Moodle hosting. But I would be interested to hear from other system administrators views on the current plan.
From my point of view, the main issue that we need to fix is that Moodle in it's out of the box configuration very often tries to send emails as the users of the system either as the 'From' or the 'Reply-to' address and this behaviour is incompatible with current spam-prevention measures in use today.
The proposed solution (and you can see the patch in progress in MDL-44467) is:
- We will remove the current 'Only send from no reply address' flag.
- We will replace this with a list of allowed email domains (which defaults to none)
- We will start delivering all emails from the no reply address at all times, unless the email is in this list of allowed domains
- We'll update the From name to include a 'via Moodle' (much like other websites do), to prevent address book confusion when sent via no-reply
This means that out of the box, the only task for anyone configuring Moodle to send email will be getting the no-reply address set to something which is not flagged as spam (e.g. has SPF records which trust the Moodle host as the sender).
For more advanced configurations, e.g. a university - where you are under control of a mail domain, and you want to allow emails to be sent out from Moodle directly as the user - you can add this domain to the allowed domains list. But, unlike the previous noreply setting - Moodle still will not try and send the mail directly if sending 'from' gmail.com and instead fallback to from the no reply address.
I'd love to hear your feedback on this proposal.
(this is not exactly on topic for this forum, but in my experience has the audience most interested)