-
-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mail blocked due to missing "To:" header #1422
Comments
When sending a mail to BCC reveivers only, the TO header should be set to undisclosed-recipients:; Usually this is done automatically by the MTA, but some seem to reject the mail instead.
$subscriber_mail can be a list of receivers. Mail-Addresses should not be leaked to other subscribers, that's why we use BCC here. I created a pull request #1428 that should fix your problem. Can you please try the change and report back? |
Hi @splitbrain, thanks for the explanation. Of course, we should not disclose other subscribers. I have tested pull request #1428, and quite to my surprise I ran into serious troubles since our mail server is using Sendmail 8 which returns I have contacted colleagues and posted a question at serverfault.com. I plan to provide more details here as I receive them. What I got so far:
Please accept my sincere apologies for the confusion and the perhaps rather futile bug report. Worth considering, though:
Edit 2015-12-16 22:43: Apparently, Sendmail does support group addresses, just not empty ones like |
@xrat thanks for the research, please keep us updated. DokuWiki should not generate an empty To: header. I think we even have tests for that. SMTP can be used with the SMTP plugin but is beyond the scope of this ticket. Generating individual messages would probably be a good idea. In fact I think this is the case for most cases already. The only time I can think of where multiple addresses are passed is when you put a comma separated list in $conf['notify'], but I might be wrong. This would need research. |
DokuWiki does generate an empty The operator of the mail server that rejected our DokuWiki notifications informed us that the rejections were actually caused by issues with a broken MySQL database and were not based on the mail server's configuration. Consequently, DokuWiki notifications are accepted again. No patches required. I haven't received any answer for my Sendmail inquiry regarding support for empty groups such as Concluding:
|
The source of the empty header field is not Dokuwiki itself but the the way Dokuwiki and PHP interact.
to sendmail. Its documentation thus specifies
for the first parameter and the RFC requires at least one address (mailbox or group) for "To: ". (PHP missed that the Internet uses RFC 5322 nowdays, but that makes no difference.) It's an error that Dokuwiki passes an empty value to the #1428 would be awesome to get this fixed. |
@cschramm are you opposing the proposal of @xrat above #1422 (comment)? Sending messages separately looks more robust than the 'undisclosed-recipients:' quick fix. |
@Klap-in: That'd work fine as well, yes. |
I have the same error: emails still are send with empty to: Any news on this topic? |
@splitbrain: I've got the same problem with an empty "to:" Parameter but fix it in our installation. To be flexible for the different configurations, here is my idea for a fix.
Depending of the mail system and behave of the user it is possible to use 'undisclosed-recipients:;' or define the sender Mail address, which i see in some Newsletters like to:[email protected] (by the way, in the newsletters are valid Mail addresses used not example.com ;-) The default should be an empty maildefaultto, therefore nothing changed in general. (Edited for better reading ;-) |
Some update on this. I just encountered a similar problem on my local dev machine where I am running mailhog as MTA (see https://www.splitbrain.org/blog/2022-05/03-mailhog_as_default_mta). Mailhog complained:
|
@xrat https://serverfault.com/a/758337 suggests to use the round parentheses as work-around for sendmail. Eg. specifying a To: header that only has a display name but no address. In my tests at dokuwiki.org (running postfix) and on my local machine (running mailhog) this worked fine. It would be helpful if everyone involved in this thread could add the following line
Put it right above above the mail sending here: Lines 769 to 773 in 78b498a
Please report back if this works for you and which MTA you are using. I would be especially interested in Exim, MS Exchange and Sendmail. |
@splitbrain: I've testet your code and it works fine with Sendmail on a Windows machine. |
I have tested "(undisclosed-recipients)" on 2 systems, both Debian 11 w/ FPM-PHP 7.4 with a total of 3 DokuWikis, all v2022-07-31 "Igor". As MUAs I used Alpine 2.24, Mutt 2.0.5, Thunderbird 102.8 and
No problems found at all. Thunderbird's "Reply All" function does not know how to handle "(undisclosed-recipients)". But, that's probably no big issue. And its not DokuWiki's fault. |
I am facing this issue as well. My Dokuwiki instance is running on a HostEurope WebPackage. They are using exim 4.92 as a MTA. This Setup was running very smoothly for several years. Do you have any Idea what ist the root-cause that Mails (without TO)are blocked for two weeks now? |
I did some quick testing using an Exim 4.94.2 providing a message via SMTP with no "To:", with an empty one and with "To: (undisclosed-recipients)". All 3 messages were accepted and forwarded. |
Unfortunately, some recipients (especially mailing lists) do not accept mails if the recipient is not listed in the |
Some recipients (especially mailing lists) do not accept mails if the recipient is not listed in the To-header. With this commit each mail will be sent individually with the email address as To instead of Bcc to preserve privacy. Fixes dokuwiki#1422
Some recipients (especially mailing lists) do not accept mails if the recipient is not listed in the To-header. With this commit each mail will be sent individually with the email address as To instead of Bcc to preserve privacy. Fixes dokuwiki#1422
Some recipients (especially mailing lists) do not accept mails if the recipient is not listed in the To-header. With this commit each mail will be sent individually with the email address as To instead of Bcc to preserve privacy. Fixes dokuwiki#1422
Mail messages sent by our DokuWiki installations sometimes are rejected with the error message
which is due to the fact that DokuWiki generated messages for e.g. subscribers are sent without "To:" header. Changing
in function
send
of classSubscription
ininc/subscription.php
(line 603 in 2015-08-10a "Detritus") tofixes this (at least for us).
Why is DokuWiki using BCC instead of To?
The text was updated successfully, but these errors were encountered: