souramoo / commentoplusplus

Commento with out of the box patches and updates to add useful features and fixes. Also with one-click deploy to Heroku so you can get up and running fast.
MIT License
389 stars 62 forks source link

504 5.7.4 Unrecognized authentication type #53

Open raguser opened 3 years ago

raguser commented 3 years ago

I successfully integrated Commento PlusPlus with Ghost and Traefik on Docker, running on an AWS EC2 instance. Everything works perfectly, with one exception: I am unable to configure SMTP using our Exchange Online account for Commento PlusPlus. For Ghost, the SMTP configuration, using our Exchange Online account, works perfectly, without any error. The administrator is receiving confirmation mails as well as all invited staff users are getting confirmation mails. But with Commento PlusPlus I'm not able to register, because I'm not able to receive a confirmation email at all. I always get an error message like this:

2021/07/26 16:17:51 [ERROR] smtp_owner_confirm_hex.go:19 smtpOwnerConfirmHex(): cannot send confirmation email: 504 5.7.4 Unrecognized authentication type [LO2P123CA0073.GBRP123.PROD.OUTLOOK.COM]

My SMTP-Configuration for Ghost. It works very well!

mail__transport=SMTP
mail__options__host=smtp.office365.com
mail__options__port=587
mail__options__service=O365
mail__options__secure=false
mail__options__requireTLS=true
mail__options__auth__user=<ACCOUNT>@<DOMAIN>
mail__options__auth__pass=<PASSWORD>
mail__from=<ACCOUNT>@<DOMAIN>

My SMTP-Configuration for Commento PlusPlus. It fails, as described above.

COMMENTO_SMTP_HOST=smtp.office365.com
COMMENTO_SMTP_PORT=587
COMMENTO_SMTP_USERNAME=<ACCOUNT>@<DOMAIN>
COMMENTO_SMTP_PASSWORD=<PASSWORD>
COMMENTO_SMTP_FROM_ADDRESS=<ACCOUNT>@<DOMAIN>

Do you have an idea how to fix it?

I am happy to help with troubleshooting and testing.

souramoo commented 3 years ago

Thanks very much for the bug report, I will be looking into this! We have had a similar issue with google's g-suite (https://github.com/souramoo/commentoplusplus/issues/15) but I actually also have a office365 account so I will see how far I get with debugging this - I may need your help to isolate the issue if I get stuck!

raguser commented 3 years ago

Dear Souradip

Thank you very much for your quick reply.

I would be very happy if you could solve the problem.

Please let me know, how I can help you.

Best regards

Stephan


From: Souradip Mookerjee @.> Sent: Tuesday, July 27, 2021 02:17 To: souramoo/commentoplusplus @.> Cc: Stephan Rudolph @.>; Author @.> Subject: Re: [souramoo/commentoplusplus] 504 5.7.4 Unrecognized authentication type (#53)

Thanks very much for the bug report, I will be looking into this! We have had a similar issue with google's g-suite (#15https://github.com/souramoo/commentoplusplus/issues/15) but I actually also have a office365 account so I will see how far I get with debugging this - I may need your help to isolate the issue if I get stuck!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/souramoo/commentoplusplus/issues/53#issuecomment-887114827, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA7T473PZEFN7MELTTLI65DTZX3JJANCNFSM5BAQ2V4A.

Stephan Rudolph Vorsitzender der Geschäftsleitung [Logo rudolph ag]https://www.rudolph-ag.ch [Badge AWS Select Consulting Partner] https://aws.amazon.com/partners/find/partnerdetails/?id=0010L00001v31gVQAQ [Badge Oracle Gold Partner Weblogic Specialized] https://partner-finder.oracle.com/catalog/scr/Partner/SCPP-RUDOLPH-AG.html rudolph ag https://www.rudolph-ag.chWaldeckstrasse 6 CH-4900 Langenthal https://www.google.com/maps/dir//Waldeckstrasse+6,+4900+Langenthal,+Switzerland +41 31 312 19 20 @. @.>www.rudolph-ag.ch https://www.rudolph-ag.ch

simonmeggle commented 2 years ago

(Is the commentoplusplus project dead...?)

souramoo commented 2 years ago

Not dead! This bug is still under investigation, anyone else facing the same issue is welcome to help me debug it!

raguser commented 2 years ago

Dear Souradip

I am very happy to read from you that the project is not "dead".

I hope you are doing well.

I am still very interested in running Commento PlusPlus, along with Ghost, for us as a blog on AWS. I would also be happy to help you, find and fix the cause of the "504 5.7.4 Unrecognized authentication type" error.

Recently I wrote a program in Java that reads email addresses from an Excel spreadsheet and then sends emails through our MS Exchange Online account. Maybe I can use the code to test parameters and work towards you that way.

Best regards

Stephan

souramoo commented 2 years ago

Please try the latest unstable release after having merged the pull request above to see if this is still an issue!

raguser commented 2 years ago

Dear Souradip I am very glad to know that Commento PlusPlus has made improvements in sending emails. Currently I am very involved in customer projects. I will be very happy to test the latest release of Commento PlusPlus as soon as possible. I will contact you shortly. Best regards Stephan

raguser commented 1 year ago

Hello Souradip

I'm currently on vacation for a few days and I'm using the opportunity to test Commento++ with the adjustments you mentioned, regarding SMTPS and StartTLS.

For this I deployed my environment, under Docker, on an AWS EC2 again, using the Docker image caroga/commentoplusplus. In doing so, I assume that this image corresponds to the latest version v1.8.7 of your code.

Unfortunately the error still occurs.

When I try to create an account with Commento++, I always get the following error messages:

I have a couple of questions about this:

  1. You mention in the README: "Commento++ allows configuration of the tlsConfig for both SMTPS as well as StartTLS for email sending.". I put a clone of your code from github locally and couldn't find a corresponding option in it. Did I miss something?
  2. Could you successfully test the current Commento++ code in connection with smtp.office365.com?
  3. Which options should be set, in order to use StartTLS and SMTPS?
  4. If I set the environment variable ENABLE_LOGGING=true, where does Commento++ write the log output to?

I would be very happy to be able to run Commento++ in conjunction with Microsoft Exchange Online (smtp.office365.com) as mail provider and would be happy to help you to make this happen.

Please let me know if I can assist you with any further information.

I look forward to your message.

Best regards

Stephan

raguser commented 1 year ago

Hello Souradip

To make sure that my email service smtp.office365.com is working correctly, I checked it with openssl s_client. Thus, everything seems to be in order from this side.

I would be glad if we could find the cause of the error "451 5.7.3 STARTTLS is required to send mail" as mentioned in the comment before.

Best regards

Stephan

Test:

openssl s_client -connect smtp.office365.com:587 -starttls smtp -crlf -quiet
EHLO localhost
AUTH LOGIN
334 VXNlcm5hbWU6
<base64 encoded username>
334 UGFzc3dvcmQ6
<base64 encoded password>
235 2.7.0 Authentication successful
MAIL FROM: <myemailaccount>@<mydomain>
250 2.1.0 Sender OK
RCPT TO: <myemailaccount>@<mydomain>
250 2.1.5 Recipient OK
DATA
354 Start mail input; end with <CRLF>.<CRLF>
From: <myemailaccount>@<mydomain>
To: <myemailaccount>@<mydomain>
Subject: Verify SMTP service

This is just a test, using openssl s_client, to verify that sending email to the smtp.office365.com mail account works as expected.

.
250 2.0.0 OK <VE1PR03MB529498A4B7806E4757FCD0FAAF5C9@VE1PR03MB5294.eurprd03.prod.outlook.com> ...
QUIT
221 2.0.0 Service closing transmission channel

Result: image

Supernova3339 commented 1 year ago

Hey there! If you don't configure Commento++ to use an email service, you will not receive a confirmation email to activate your account. Hope this helps!

raguser commented 1 year ago

Hello Supernova3339, if you had read my bug report, you would know that this is exactly the issue, namely the configuration of the e-mail service for Commento++.
I want to configure Exchange Online (smtp.office365.com) as email service for Commento++. But unfortunately this does not work (see above). Others have also encountered this problem. If you know a solution for this, it would be very helpful.

Supernova3339 commented 1 year ago

Hello Supernova3339, if you had read my bug report, you would know that this is exactly the issue, namely the configuration of the e-mail service for Commento++. I want to configure Exchange Online (smtp.office365.com) as email service for Commento++. But unfortunately this does not work (see above). Others have also encountered this problem. If you know a solution for this, it would be very helpful.

Hi Stephan :wave:

I did read your bug report. Turning on starttls will solve this issue. Let me know if you need any help. EDIT: to be helpful, here's the enviroment variable you SHOULD add. USE_STARTTLS=true. Cheers, Supernova :tada: