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

unable to send mails using STARTTLS #133

Open
Loosetooth opened this issue Oct 21, 2022 · 6 comments
Open

unable to send mails using STARTTLS #133

Loosetooth opened this issue Oct 21, 2022 · 6 comments

Comments

@Loosetooth
Copy link
Contributor

Currently, it is impossible to send mails using STARTTLS, I get the following error in the logs:

2022/10/21 11:40:20 [ERROR] smtp_email_notification.go:48 smtpEmailNotification(): cannot send email notification email: 530 Must issue a STARTTLS command first.

The fix is relatively straightforward, in smtp_send.go the following line needs to be added when using STARTTLS:

server.Encryption = mail.EncryptionSTARTTLS

I will try to make a pull request to add the fix.

@tealaforgia
Copy link

I have a similar problem (Docker). With the original Commento there is no problem with the same configuration. I use Zoho mail.
My configuration:

COMMENTO_SMTP_HOST=smtp.zoho.eu
COMMENTO_SMTP_PORT=587
COMMENTO_SMTP_USERNAME=[myzohousername]
COMMENTO_SMTP_PASSWORD=[REDACTED]
[email protected]

The error, when i try to reset password, is:

2022/10/25 13:24:55 [ERROR] smtp_reset_hex.go:19 smtpResetHex(): cannot send reset email: 530 Must issue a STARTTLS command first.

@souramoo
Copy link
Owner

Have just merged this fix! @tealaforgia please try the latest docker image, with USE_STARTTLS=true

@tealaforgia
Copy link

tealaforgia commented Oct 25, 2022

Thanks, now the bug seems to be fixed.Email are sended correctly with my configuration.

@Brawl345
Copy link

@tealaforgia Sorry to bother you but how did you get it working with Zoho? I have used the exact same configuration as yours (but with .com) but I'm getting:

[ERROR] smtp_reset_hex.go:19 smtpResetHex(): cannot send reset email: 553 Relaying disallowed as @

This is my config:

COMMENTO_SMTP_HOST=smtp.zoho.com
COMMENTO_SMTP_PORT=587
[email protected]
COMMENTO_SMTP_PASSWORD=mypassword
[email protected]

I also have "[email protected]" configured in Zoho as alias. Note that I'm using the latest release not the latest commit, but at least I should get the STARTTLS error first, no? I've also tried the same FROM address as the login name. I have two factor auth enabled but created an app password - the same config works with Vaultwarden so no idea what the problem is. Maybe I overlooked something? 🤔

@Brawl345
Copy link

Ok I had to use the latest commit then everything worked plus the above issue was fixed. Of course USE_STARTTLS must be true.

@ugurkocde
Copy link

SMTP only worked for me after adding this variable:

USE_STARTTLS = true

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

No branches or pull requests

5 participants