-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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 configuration incorrect in installer - with fix #23180
Comments
Could be a misconfiguration from your side, TLS and STARTTLS are not the same. Could you try this with I do agree that it would make sense to also include the option for TLS (and not just STARTTLS settings) in the setup configuration if this is not fixed by using the following settings (could you test them out for us and let me know?)
(If it doesn't work, please try " |
I can confirm I have tried both those configurations in both the setup test script and the working server file and neither send successfully. Judging by inspecting the tcpdump, they do seem to negotiate a connection but they time out while trying to send an email. In case it is helpful I have attached some of the output from openssl when connecting to and sending email through my smtp server manually. It works without any issue. |
Steps to reproduce the problem
Case 1) In the script:
Case 2) In a running mastodon instance have in the .env.production file the standard settings using port 465 / SSL:
SMTP_SERVER=mymailserver
SMTP_PORT=465
SMTP_LOGIN=myloginemail
SMTP_PASSWORD=mypassword
SMTP_AUTH_METHOD=plain
SMTP_OPENSSL_VERIFY_MODE=client_once
SMTP_ENABLE_STARTTLS=always
SMTP_FROM_ADDRESS=notifications@emailaddress
Expected behaviour
An email should be generated and successfully sent
Actual behaviour
The commands timeout and produces: "Net::ReadTimeout: "Net::ReadTimeout with #TCPSocket:(closed)" in script output and syslog
Detailed description
To resolve this problem we consulted this discourse link:
https://discourse.joinmastodon.org/t/new-mailserver-no-mails/3420
The problem appears to be in the SSL settings. SMTP_AUTH_METHOD, SMTP_OPENSSL_VERIFY_MODE and SMTP_ENABLE_STARTTLS are commented out and SMTP_TLS=true must be added.
My successful settings were:
SMTP_SERVER=mymailserver
SMTP_PORT=465
SMTP_LOGIN=myloginemail
SMTP_PASSWORD=mypassword
#SMTP_AUTH_METHOD=plain
#SMTP_OPENSSL_VERIFY_MODE=client_once
#SMTP_ENABLE_STARTTLS=always
SMTP_TLS=true
SMTP_FROM_ADDRESS=notifications@emailaddress
Related Mastodon Thread:
https://mstdn.ca/@chrisale/109725219048851990
Specifications
Debian 11
Mastodon | 4.0.2
Ruby | 3.0.4p208
PostgreSQL | 15.1
Redis | 6.0.16
OpenSSL 1.1.1
The text was updated successfully, but these errors were encountered: