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

Self-hosted instance not sending email #379

Closed
drtobbyas opened this issue Feb 25, 2023 · 11 comments
Closed

Self-hosted instance not sending email #379

drtobbyas opened this issue Feb 25, 2023 · 11 comments

Comments

@drtobbyas
Copy link

Describe the bug

Self-hosted instance on Kubernetes does not send emails.

To Reproduce

Steps to reproduce the behavior:

  1. Set up a self-hosted instance on Kubernetes as described in the documentation
  2. Add your valid SMTP details to the values.yaml file
  3. Go to your ingress domain and attempt to sign-up.
  4. The sign-up email will not be sent to the provided email address.

Expected behavior

The sign-up email should be sent to the email address provided for sign-up

Screenshots

If applicable, add screenshots to help explain your problem.

Platform you are having the issue on:

Tested on kubernetes

Additional context

The token hash appear to be logged in the MongoDB database. This gives an indication that the sign-up token was probably generated but not sent to the user.

@dangtony98
Copy link
Collaborator

Hey @drtobbyas!

Which SMTP server are you using? You can check out the docs here for how to configure mailing with your own SMTP server.

We currently have confirmed support for SendGrid, Mailgun, AWS SES, and SocketLabs — Happy to add another SMTP server option if you're using something else.

@drtobbyas
Copy link
Author

drtobbyas commented Feb 25, 2023

I tried zohomail smtp with a custom domain. It didn't work. I also tried troubleshooting with mailtrap.io, but It didn't work either.

@dangtony98
Copy link
Collaborator

I see. Would you be okay with using one of the existing supported options: SendGrid, Mailgun, AWS SES, or SocketLabs?

If not, I can have support for Zohomail done for you by tomorrow!

@drtobbyas
Copy link
Author

It would be awesome if it can support any (if possible) SMTP server. Many users use different email services including Cpanel kind of hosting.

@dangtony98
Copy link
Collaborator

@drtobbyas The issue is that some SMTP servers come with some additional needed configuration on our end (e.g. incompatible TLS version), so they don't always work out of the box; this is why we typically have to confirm SMTP compatibility for each one and provide instructions.

There's actually a whole separate issue to build out support for all/most SMTP servers here.

I'll add in support for Zohomail in the next few hours for you!

@drtobbyas
Copy link
Author

ok, good. Thanks

@dangtony98
Copy link
Collaborator

Hey @drtobbyas!

I've just pushed out a new Docker image with support for Zoho Mail — I've added docs for it here as well.

@WladyX
Copy link

WladyX commented Mar 8, 2023

I have a custom postfix server and i am unable to send emails.
I have tried both with SECURE and without, but i don't see any connection in the mail logs.
Is it possible to create users without sending email?

Later edit: I was able to send mails by disabling the postfix SSL.

@insertish
Copy link

insertish commented Mar 9, 2023

I run a https://maddy.email/ server and I just ran into this issue as well.

If I try to send mail over port 587 with SMTP_SECURE=true:

image

With other configurations of ports and SMTP_SECURE, it seems to connect fine but no email is ever actually sent, the most I see in the mail server logs is the initial authentication:

maddy_1          | submission: 220 -snip-.revolt.wtf ESMTP Service Ready
maddy_1          | -snip-
maddy_1          | submission: AUTH PLAIN -snip-
maddy_1          | submission: 235 2.0.0 Authentication succeeded
maddy_1          | submission: QUIT
maddy_1          | submission: 221 2.0.0 Bye

But beyond that, I never see it talk with the mail server again.

I'm not sure if it's intentional but pressing resend (submitting the sign up page does this too) throws 404:

image
image

Edit: I forgot to mention but this is also an issue when I try to configure it to use Gandi Mail.

Edit 2: It's the same issue as before.

image

Likewise, switching SSL off allows it to connect fine BUT no emails actually go out.

@byjokese
Copy link

On my case when using Amazon SES, with SMTP_SECURE to true and SMTP_PORT to 587, it gives an 500 Error, and Sentry reports:
image

@akhilmhdh
Copy link
Member

Closing as stale. This should be now possible with SMTP configuration in env

https://infisical.com/docs/self-hosting/configuration/envars?ref=alphasec.io#email-service

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

6 participants