Hachemi Posted August 23, 2023 Posted August 23, 2023 Hello, I've setup a custom mail domain on Protonmail, with a smtp token, I tried it on https://dnschecker.org/smtp-test-tool.php and it work good, but on my inivision community i have this message : 535 5.7.8 Error: authentication failed: Invalid authentication mechanism What did I missed ?
Randy Calvert Posted August 23, 2023 Posted August 23, 2023 It’s saying something you’ve provided is wrong. It could be that you’ve chosen the wrong version of SMTP protocol or the port number is wrong. But this is not an IPB issue. It cannot handle authentication issues.
Hachemi Posted August 23, 2023 Author Posted August 23, 2023 7 minutes ago, Randy Calvert said: It’s saying something you’ve provided is wrong. It could be that you’ve chosen the wrong version of SMTP protocol or the port number is wrong. But this is not an IPB issue. It cannot handle authentication issues. Thank you for your help but no it's not something I've provided wrong, it said "Invalid authentication mechanism", as I said, my credentials are ok, because I've tried them on https://dnschecker.org/smtp-test-tool.php and the mail was sent and received without any issue. I tried all methods (Plain Text, SSL, TLS) but still same issue.
Randy Calvert Posted August 23, 2023 Posted August 23, 2023 You can wait for an IPS staffer to confirm, but I can almost assure you this is not a problem in the software. It’s either your server not allowing it to reach the smtp server (firewall issue), or the recipient server is rejecting it.
Marc Posted August 23, 2023 Posted August 23, 2023 As has already been mentioned there, you need to check this with your provider. The message there is coming from your email service
Hachemi Posted August 23, 2023 Author Posted August 23, 2023 34 minutes ago, Marc Stridgen said: As has already been mentioned there, you need to check this with your provider. The message there is coming from your email service Hum ok, but how do you explain when I try the credentials on https://dnschecker.org/smtp-test-tool.php the mails are sent and received without any issue and not on my Invision forum ? In my opinion it's an easy response to say "check this with your provider ..." without investigate why we have this message. It's not a credential issues, it's an "authentication mechanism" problem.
Marc Posted August 23, 2023 Posted August 23, 2023 19 minutes ago, Hachemi said: Hum ok, but how do you explain when I try the credentials on https://dnschecker.org/smtp-test-tool.php the mails are sent and received without any issue and not on my Invision forum ? This would be a question for your email host also 20 minutes ago, Hachemi said: In my opinion it's an easy response to say "check this with your provider ..." without investigate why we have this message. It's not a credential issues, it's an "authentication mechanism" problem. While I understand the conclusion you seem to have arrived at here, we have many thousands of people using SMTP on a daily basis on our software, and the error message itself is not being thrown by our software. The error is being returned from your email hosting provider.
Lemarinel Sébastien Posted September 10 Posted September 10 Hi @Hachemi did you found a solution ? I'm trying to configure the same than you (with a smtp from protonmail) But I have the same error.
Lemarinel Sébastien Posted September 10 Posted September 10 So I found a way to fix this problem. And I think Invision shoult add something in the configuration of the SMTP. I'm using the SMTP from Protonmail with SSL. For SSL and TLS Protonmail support only AUTH PLAIN (not AUTH LOGIN). But Invision use only AUTH LOGIN and doesn't support AUTH PLAIN. So when I configure the SMTP I see the following message: 535 5.7.8 Error: authentication failed: Invalid authentication mechanism To fix this In the file system/Email/Outgoing/Smtp.php I replaced this part: if ( $this->smtpUser ) { $responseCode = $this->_sendCommand( 'AUTH LOGIN', 334 ); $responseCode = $this->_sendCommand( base64_encode( $this->smtpUser ), 334 ); $responseCode = $this->_sendCommand( base64_encode( $this->smtpPass ), 235 ); } With this: if ( $this->smtpUser ) { $responseCode = $this->_sendCommand( 'AUTH PLAIN', 334 ); $responseCode = $this->_sendCommand( base64_encode("\0" . $this->smtpUser . "\0" . $this->smtpPass), 235); } And it's working. I think Invision need to add an option in the SMTP configuration to allow user to choose between AUTH PLAN or AUTH LOGIN or automatically detect the options available. Regards
Marc Posted September 10 Posted September 10 11 minutes ago, Lemarinel Sébastien said: So I found a way to fix this problem. And I think Invision shoult add something in the configuration of the SMTP. I'm using the SMTP from Protonmail with SSL. For SSL and TLS Protonmail support only AUTH PLAIN (not AUTH LOGIN). But Invision use only AUTH LOGIN and doesn't support AUTH PLAIN. So when I configure the SMTP I see the following message: 535 5.7.8 Error: authentication failed: Invalid authentication mechanism To fix this In the file system/Email/Outgoing/Smtp.php I replaced this part: if ( $this->smtpUser ) { $responseCode = $this->_sendCommand( 'AUTH LOGIN', 334 ); $responseCode = $this->_sendCommand( base64_encode( $this->smtpUser ), 334 ); $responseCode = $this->_sendCommand( base64_encode( $this->smtpPass ), 235 ); } With this: if ( $this->smtpUser ) { $responseCode = $this->_sendCommand( 'AUTH PLAIN', 334 ); $responseCode = $this->_sendCommand( base64_encode("\0" . $this->smtpUser . "\0" . $this->smtpPass), 235); } And it's working. I think Invision need to add an option in the SMTP configuration to allow user to choose between AUTH PLAN or AUTH LOGIN or automatically detect the options available. Regards Please feel free to post his as a suggestion in our feedback area
Recommended Posts