MyBB Community Forums

Full Version: SMTP authentication problem with DIGEST-MD5 or CRAM-MD5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hey all,

As I am trying to set up a new SMTP server and  I've encoutered this weird problem where I can not authetificate.
I get this error message saying "The SMTP server does not support any of the AUTH methods that MyBB supports". Doesn't matter if I use ssl, tls or plain authetication, it just won't work.

So I poked around in the auth() function of smtp.php and I found out, that my SMTP server is returning these authentication methods DIGEST-MD5, CRAM-MD5 but the function is only checking for LOGIN or PLAIN methods. (see lines 357 and 381)

If I change these lines:

Quote:if(in_array("LOGIN", $auth_methods)) 

to:

Quote:if(in_array("DIGEST-MD5", $auth_methods))

,doesn't matter which line I change to DIGEST-MD5 or CRAM-MD5, the email gets sent.

Now that is cool that I can send emails by changing these values, but:

  1. I might won't be the only once facing this issue
  2. I am not sure, if the code bellow the "if" is the right way to use CRAM-MD5 or DIGEST-MD5
Thank you for the time devs! I think this issue should be solved in the next release, or just point me into the right direction Rolleyes .

Have a nice day!
May I ask what email server you're using? We try to cater to a fairly vast range, but there are a lot of different configurations out there that all behave slightly differently.
I don't know its full specs but here you go: mail server is IceWarp and you might find these specs useful: https://www.icewarp.com/product/technica...ification/.

May I ask who is responsible for maintaining the mail handlers code in mybb?
Thank you!
(2017-07-06, 03:20 PM)memeber1 Wrote: [ -> ]I don't know its full specs but here you go: mail server is IceWarp and you might find these specs useful: https://www.icewarp.com/product/technica...ification/.

May I ask who is responsible for maintaining the mail handlers code in mybb?
Thank you!

Interesting, I've never heard of them before now.

It's a joint effort between staff and community members - all of the code is on GitHub here: https://github.com/mybb/mybb/blob/featur...s/smtp.php
(2017-07-06, 04:37 PM)Euan T Wrote: [ -> ]
(2017-07-06, 03:20 PM)memeber1 Wrote: [ -> ]I don't know its full specs but here you go: mail server is IceWarp and you might find these specs useful: https://www.icewarp.com/product/technica...ification/.

May I ask who is responsible for maintaining the mail handlers code in mybb?
Thank you!

Interesting, I've never heard of them before now.

It's a joint effort between staff and community members - all of the code is on GitHub here: https://github.com/mybb/mybb/blob/featur...s/smtp.php


Well... there is always a first time.

In my humbe opinion, MyBB should use some more robost SMTP library, PHPMailer for example, or there should be another robust equivalent. My email server is returning the above mentioned AUTH options but on the other side the two, coded into MyBB smtp library, works as well. I've even tested in terminal, it works like charm but HEY, I'd like to use more secure option if there is one.

Don't know exactly yet how this problem is going to be solved on my side, butif so, I will try to make a pull request with the changes.
I've helped a couple of people patch in SwiftMailer, but unfortunately I doubt there's much chance that'll get into the core for 1.8.

2.0 is using SwiftMailer under the hood to handle mail attachments and more.
(2017-07-06, 09:39 PM)Euan T Wrote: [ -> ]2.0 is using SwiftMailer under the hood to handle mail attachments and more.

Laravel ftw!


@OP: I agree, there are definitely a lot of good free PHP mail wrappers out there but the issue is just integrating them with MyBB fully, as Euan said. You have to consider then that the licenses for any third-party libraries need to be respected and included, and MyBB itself will have to maintain an updated implementation of the library and include it with each new release since most board owners are likely not using any package management tools themselves. Maybe try to push the code up yourself and become the hero you were born to be Big Grin Big Grin

Also never heard of icewarp, but their SSL cert is invalid and the site forces the connection over HTTPS. Too lazy to add an exception so I'll check it out whenever they fix that.
These pull request should resolve the issue
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2798

Thanks for contributing to MyBB!

Regards,
The MyBB Group