CanastaWiki / Canasta

MediaWiki Docker image for Canasta, an all-in-one MediaWiki stack for easy deployment and management of enterprise-ready MediaWiki on production environments.
https://www.canasta.wiki
MIT License
37 stars 28 forks source link

Figure out ideal mailing approach for Canasta #446

Open yaronkoren opened 1 week ago

yaronkoren commented 1 week ago

As I understand it, currently Canasta by default does not allow for any emailing from the wiki - you have to set $wgSMTP in LocalSettings.php to get emailing done, via an outside service like Gmail or AWS SES. There is even a set of code in CanastaUtils.php that - if $wgSMTP is not set on the wiki - notifies the user that no emails will be sent, if they're on the page Special:CreateAccount or Special:Preferences (both of which usually generate an email).

It does seem that $wgSMTP is the ideal approach, since it's most likely to produce emails that don't get categorized as spam. But is it a problem that Canasta has this kind of all-or-nothing strategy? If someone forgets their password on a Canasta wiki that has not had SMTP set up, for example, then, as far as I know, they will not be able to log in - since password reset is done via email. (Presumably, they would prefer to get an email in their spam folder than not to get email at all.)

From what I understand, MediaWiki calls PHP's mail() function by default - but the PHP mail() can't be called from within a Docker container. Canasta would have to include some library like Sendmail, Postfix, Exim, etc. in order to do basic mailing. Or perhaps Symfony Mailer - though it's not clear to me if that is a substitute for Sendmail, etc. or a substitute for $wgSMTP. (Or both.)

Clearly, there are a lot of options for mailing. What would the ideal approach look like for Canasta - if the current approach is not it?

yaronkoren commented 1 week ago

Cc @jeffw16, @pastakhov, @vedmaka, @freephile.