-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 authentication does not occur #11528
Comments
GitMate.io thinks possibly related issues are #11219 (SMTP ), #5240 (“Authentication Required” prompt after upgrade to 12.0.0 does not work), #3279 (user_external should log error message if authentication over imap does not work), #11085 (Relation does not exist), and #3158 (authentication prompt seems not to work). |
Not so easy as it works for me @MorrisJobke just fine... Could you try with another e-mail host? |
Same result on two different Postfix systems. SMTP authentication is not attempted. I used debug_peer in Postfix to review the SMTP sessions to confirm that no auth is being attempted. No 'AUTH PLAIN' command is sent by the client. The chatter is as follows:
Per authenticated SMTP, the MAIL FROM: command should not occur at this time -- the AUTH PLAIN command should be sent, followed by the MAIL and RCPT commands. Can you give me more information about your environment @rullzer ? Do you need any more information from me? |
Could you share server/lib/private/Mail/Mailer.php Lines 253 to 257 in c2ef47e
Credentials for smtp are not passed when |
Thanks @danielkesselberg -- I checked config.php to assert the SMTP credentials were correct in there. FWIW unauthenticated SMTP works OK but authenticated is necessary in my environment. Also FYI the LDAP credentials were not redacted in this config dump, so I did that.
|
When I understand http://www.huschi.net/archiv/esmtp-dialog-smtp-auth.html and https://www.fehcom.de/qmail/smtpauth.html##FRAMEWORK correctly your mailserver has to announce auth to client. Could you try with ssl or tls? It's common that mailserver don't allow unprotected auth on port 25. |
OK this might be the right direction, thanks! |
I guess this could work 👍 |
Can you please give me any hints about how to trust a CA? I tried like this but it's not trusting LetsEncrypt yet: The SMTP client is not trusting the LetsEncrypt CA (from tshark): |
I usually import these to the global certificate store. Then it should be available to all processes. |
Me too, I put the LetsEncrypt CA (PKCS#7) file in the /etc/ssl/certs directory (although it was already there), I confirmed the chain using 'openssl s_client' from the NextCloud LXD container too. Does this SMTP client library have it's own trust store (like with Java and the JKS)? |
I got it! This was related to Ubuntu not trusting LetsEncrypt by default. Thanks for your help @danielkesselberg |
Steps to reproduce
Please note this is very easy to reproduce and probably the reason so many SMTP issues are floating around.
Expected behaviour
SMTP authentication attempt occurs
Actual behaviour
No SMTP authentication attempt occurs
Server configuration
Operating system:
Ubuntu 18.04
Web server:
Apache
Database:
MariaDB
PHP version:
7.2
Nextcloud version:
nextcloud-14.0.1
Postfix Log excerpt:
Oct 2 00:10:35 mail postfix/smtpd[14736]: NOQUEUE: reject: RCPT from nextcloud.example.com[10.146.234.197]: 554 5.7.1 foo.barf@example.com: Recipient address rejected: SMTP AUTH is required for users under this sender domain; from=nextcloud-outgoing@example.com to=foo.bar@example.com proto=ESMTP helo=<nextcloud.example.com>
The text was updated successfully, but these errors were encountered: