-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Description
Steps to reproduce the problem
Case 1) In the script:
- Follow steps on joinmastodon.org to install mastodon and prerequisites from source
- run RAILS_ENV=production bundle exec rake mastodon:setup
- attempt to configure with any SSL related authentication setting
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