Email Configuration (SES) on self hosted Redash EC2

Issue Summary

A summary of the issue and the browser/OS environment in which it occurs.

Technical details:

  • Redash Version: 8
  • Browser/OS: Chrome
    *Installed Redash using AMI available in AWS MarketPlace

I was trying to set up an email on self-hosted redash using SES.
after running the command (sudo docker-compose run --rm server manage send_test_mail) to test the email, I am getting the following error

Env file setup :


Starting redash_redis_1 … done
Starting redash_postgres_1 … done
Traceback (most recent call last):
File “/app/”, line 9, in
File “/usr/local/lib/python2.7/site-packages/click/”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/flask/”, line 380, in main
return AppGroup.main(self, *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/site-packages/click/”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/site-packages/click/”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/site-packages/click/”, line 534, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/flask/”, line 257, in decorator
return __ctx.invoke(f, *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/”, line 534, in invoke
return callback(*args, **kwargs)
File “/app/redash/cli/”, line 72, in send_test_mail
body=“Test message.”))
File “/usr/local/lib/python2.7/site-packages/”, line 491, in send
with self.connect() as connection:
File “/usr/local/lib/python2.7/site-packages/”, line 144, in enter = self.configure_host()
File “/usr/local/lib/python2.7/site-packages/”, line 158, in configure_host
host = smtplib.SMTP(self.mail.server, self.mail.port)
File “/usr/local/lib/python2.7/”, line 256, in init
(code, msg) = self.connect(host, port)
File “/usr/local/lib/python2.7/”, line 317, in connect
self.sock = self._get_socket(host, port, self.timeout)
File “/usr/local/lib/python2.7/”, line 292, in _get_socket
return socket.create_connection((host, port), timeout)
File “/usr/local/lib/python2.7/”, line 557, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known

From the stack trace it looks like Redash can’t connect to your mail server.

  1. Double check your user, password, address, and port.
  2. Are any firewall rules blocking access?
  3. Do the email server logs show Redash connecting?