Skip to content
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

[feature] Support SMTPS (smtp with implicit tls) rather than just STARTTLS #3372

Open
vivlim opened this issue Sep 29, 2024 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@vivlim
Copy link

vivlim commented Sep 29, 2024

Describe the bug with a clear and concise description of what the bug is.

If SMTP is configured using a SSL port, emails will not be sent, and any attempts to use the /api/v1/admin/email/test endpoint will hang.

With my nginx reverse proxy config, the request will time out after 60 seconds and return a 504.
gotosocial's logs (at least at the default level) don't contain any hints when this happens.

To reproduce, with either smtp2go or mailgun, set the smtp server and port to one of these combinations:
mail.smtp2go.com:(465|8465|443)
smtp.mailgun.org:465
(other providers likely work for repro also)

I don't really understand how 'SSL' and 'TLS' are used in the context of smtp, but the docs mention that the server needs to present valid ssl certificates, and smtp2go & mailgun describe those ports as "SSL" so it's really easy to end up with an invalid configuration and not know why.

Also... I don't know if this only reproduces on nixos, I don't have a non-nixos server handy to test this on.

What's your GoToSocial Version?

0.16.0 and 0.17.0-rc1

GoToSocial Arch

x86_64, built on nixos

What happened?

No response

What you expected to happen?

No response

How to reproduce it?

No response

Anything else we need to know?

No response

@vivlim vivlim added the bug Something isn't working label Sep 29, 2024
@tsmethurst
Copy link
Contributor

With mailgun, does it work if you set the port to 567? The smtp package we use is rather out of date and only supports STARTTLS, annoyingly, so we need to change that, see #3240 and discussion for more info (I'm not sure why it was closed, but we'll pick it up again soon(tm)).

@vivlim
Copy link
Author

vivlim commented Sep 30, 2024

Yeah, 567 works fine.

IMO I think a decent enough no-code stopgap would be to mention the limitation in the docs.

@tsmethurst
Copy link
Contributor

Good idea, I'll change the docs.

@tsmethurst
Copy link
Contributor

Ah sorry I meant 587, not 567, not sure what was going through my head there :')

@tsmethurst tsmethurst changed the title [bug] SMTP doesn't work if a SSL port is configured, test request hangs [feature] Support SMTPS (smtp with implicit tls) rather than just STARTTLS Oct 5, 2024
@tsmethurst tsmethurst added enhancement New feature or request and removed bug Something isn't working labels Oct 5, 2024
@tsmethurst
Copy link
Contributor

I renamed this and changed it to a feature request for smtps, hope that's OK :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants