-
Improvement
-
Resolution: Fixed
-
Minor
-
3.0.2
-
MOODLE_30_STABLE
-
MOODLE_31_STABLE
-
MDL-52818-divertallemailsexcept -
-
We typically don't use the $CFG->divertallemailsto, we instead set this up instead at the postfix level because we can do more fine grained filtering using recipient_canonical. eg we allow all email through that are to our developers domain, and selected client testing emails so we can do end to end testing with no risk of test emails going to real students.
But in some cases we want to use the smpt inside moodle rather than at the system level, but we'd still like this level of fine grained filtering. So proposing a new config.php var to complement:
$CFG->divertallemailsto = 'some@email.com';
$CFG->divertallemailsexcept = '@catalyst, client@organisation.com';
divertallemailsexcept would be a comma separated list of whitelist strings which if found in the email let it pass through un-diverted.