Steps to replicate the issue (include links if applicable):
- make UserMailer::makeMsgId return a string with question marks in it, e.g. <myid?1234h@localhost.localdomain>
- change your user's email address to a gmail adress
- make mediawiki send a notification to the user
What happens?:
gmail servers block the email and reply with
host gmail-smtp-in.l.google.com[108.177.119.27] said: 550-5.7.1 [88.99.100.229
7] Our system has detected that this message is 550-5.7.1 likely
unsolicited mail.
i tried my private smtp server (posteo.de) and our company's mail server. both get blocked.
What should have happened instead?:
gmail servers accept the email
Software version
Mediawiki 1.38.2
This change from this commit swapped wfWikiID() with WikiMap::getCurrentWikiDomain()->getId(). The latter introduced an encoding for hyphens. So a wiki id my-database-name is turned into my?hdatabase?hname.
The implication for us is that clients who use gmail and access our applications with hyphens in their urls do not receive any emails from MediaWikis notification system. We have a multi tenancy application where database names are domain names. So my-mediawiki.de would have a corresponding database called wiki_my-mediawiki.de.
I filed a question in the google support forums: https://support.google.com/mail/thread/181400931?hl=en
I guess the RFC5322 is quite clear on this, allowing question marks in the header field. Is there anything I could do other than patching the method myself?