Skip to content
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

SMTP return code upon message sending completion should be checked #3984

Closed
yuliu opened this issue May 7, 2020 · 2 comments · Fixed by #3985
Closed

SMTP return code upon message sending completion should be checked #3984

yuliu opened this issue May 7, 2020 · 2 comments · Fixed by #3985
Assignees
Labels
b:1.8 Branch: 1.8.x s:duplicate Status: Duplicate. Has been reported already, issue for the same exists t:bug Type: Bug. An issue causing error / flaw / malfunction

Comments

@yuliu
Copy link
Member

yuliu commented May 7, 2020

Community thread: https://community.mybb.com/thread-224905-post-1349025.html#pid1349025

Relevant code that will trigger errors:

my_mail($mybb->input['email'], $mybb->input['subject'], $message, $from, "", "", false, "text", "", $mybb->input['fromemail']);

./sendthread.php - send thread to a friend:
$from: $mybb->input['fromemail'] from $mybb->user['email'] for logged in user
$return_email: $mybb->input['fromemail'] from $mybb->user['email'] for logged in user
The mail will be sent from [b]a user-specified email address[/b] which confronts mail SMTP service's requirement, like Zoho's requiring from is the same as sending account's email address.

Still for Zoho, setting a different Return Email other than SMTP username will result in no mail delivered and MyBB frequently set Return Email as from: field if it's empty.

So in the above circumstances, Zoho's SMTP authentication will pass but when the full message is sent with a final ending ., the server will probably return a 553 code 553 Relaying disallowed as xxx@yyy.zzz, which MyBB doesn't take care of.

@yuliu yuliu self-assigned this May 7, 2020
@yuliu yuliu added b:1.8 Branch: 1.8.x easy-pick Not difficult; good first issue to resolve s:confirmed Status: Confirmed. Retested and found the issue exists t:bug Type: Bug. An issue causing error / flaw / malfunction labels May 7, 2020
@yuliu yuliu added s:review-needed Status: Review Needed. Possible solution submitted and removed s:confirmed Status: Confirmed. Retested and found the issue exists labels May 7, 2020
@yuliu
Copy link
Member Author

yuliu commented May 7, 2020

Oh by the way, the underlying reason that prevents mail's delivering is MyBB's wildly setting from: (and return-path:).

Ah just find it a duplicate of #2644. Should we fix it? @euantorano

According to https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#SMTP_transport_example , a final 250 upon message acceptance should be issued from server and we should check.

@euantorano
Copy link
Member

Yeah, I think it’s worth fixing if the fix is simple.

@yuliu yuliu added s:resolved Status: Resolved. Solution implemented or scheduled and removed s:review-needed Status: Review Needed. Possible solution submitted labels May 10, 2020
@yuliu yuliu added this to the 1.8.23 milestone May 10, 2020
@yuliu yuliu closed this as completed May 10, 2020
@yuliu yuliu added the s:duplicate Status: Duplicate. Has been reported already, issue for the same exists label May 10, 2020
@yuliu yuliu removed this from the 1.8.23 milestone May 10, 2020
@dvz dvz removed easy-pick Not difficult; good first issue to resolve s:resolved Status: Resolved. Solution implemented or scheduled labels Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x s:duplicate Status: Duplicate. Has been reported already, issue for the same exists t:bug Type: Bug. An issue causing error / flaw / malfunction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants