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

Redash mail setup with ses with helm on eks #151

Closed
mihiran-fc opened this issue Oct 10, 2023 · 4 comments
Closed

Redash mail setup with ses with helm on eks #151

mihiran-fc opened this issue Oct 10, 2023 · 4 comments

Comments

@mihiran-fc
Copy link

I'm trying to configure the mail server for redash with ses and the below configuration in my helm chart. I've stored my mail password and username in the abc-secret. It's getting deployed successfully but I'm unable to see any of the emails getting triggered for my alerts nor for the invitations. Is there any where I can see the logs related to this mail server in redash to find out what's the issue?
I tried checking the logs for all the pods but it's in vain. I'm able to send test mails from my ses so I think no issues with ses I presume.
Could you guys please help me if I miss any configuration or how to trouble shoot this issue.

I tried with port 587 , 2465 and still it didn't work

  redash:
    existingSecret: abc-secret
    logLevel: DEBUG
    mailServer: email-smtp.{region}.amazonaws.com
    mailPort: 465
    mailUseTls: true
    mailUseSsl: true
    mailDefaultSender: abc@abc.com
    host: https://abcd.com
@mihiran-fc
Copy link
Author

found this issue in the logs:

[PID:32][ERROR][root] Mail send error.  
    response = encode_base64(initial_response.encode('ascii'), eol='')                                                                                                                                             │
│ UnicodeEncodeError: 'ascii' codec can't encode character '\ufffd' in position 27: ordinal not in range(128)

Any idea guys how to fix this?

@mihiran-fc
Copy link
Author

I see there is this PR that got merged #3137 but not sure which image it got merged to, I tried all versions mentioned below but no luck.

10.1.0.b50633
10.0.0.b50363
8.0.0.b32245

@mihiran-fc
Copy link
Author

This is the full error


Traceback (most recent call last):                                                                                                                                                                               │
│   File "/app/redash/destinations/email.py", line 52, in notify                                                                                                                                                   │
│     mail.send(message)                                                                                                                                                                                           │
│   File "/usr/local/lib/python3.8/site-packages/flask_mail.py", line 491, in send                                                                                                                                 │
│     with self.connect() as connection:                                                                                                                                                                           │
│   File "/usr/local/lib/python3.8/site-packages/flask_mail.py", line 144, in __enter__                                                                                                                            │
│     self.host = self.configure_host()                                                                                                                                                                            │
│   File "/usr/local/lib/python3.8/site-packages/flask_mail.py", line 165, in configure_host                                                                                                                       │
│     host.login(self.mail.username, self.mail.password)                                                                                                                                                           │
│   File "/usr/local/lib/python3.8/smtplib.py", line 737, in login                                                                                                                                                 │
│     (code, resp) = self.auth(                                                                                                                                                                                    │
│   File "/usr/local/lib/python3.8/smtplib.py", line 639, in auth                                                                                                                                                  │
│     response = encode_base64(initial_response.encode('ascii'), eol='')                                                                                                                                           │
│ UnicodeEncodeError: 'ascii' codec can't encode character '\ufffd' in position 27: ordinal not in range(128) 

I see there is this PR that got merged #2605 #3137 but not sure which image it got merged to, I tried all versions mentioned below but no luck.

10.1.0.b50633
10.0.0.b50363
8.0.0.b32245
preview

@mihiran-fc
Copy link
Author

I think I found the issue, I'm passing the secret value as is without encoding it so, redash is trying to decode the un encoded secret and it's getting some random string which it is passing to the app pod. That's the reason the log it generated with some ascii codec issues.

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

1 participant