email configuration when using postfix on docker host #6822
-
I am setting up redash on a Debian 12 server, manually running the equivalent of the setup.sh file. The redash UI itself is working fine, but I now need to get outbound email working. We have postfix running on the docker host, so I want redash to talk to that. So, the default settings, which include:
Google-fu has lead me to try (in docker-compose.yml):
and in the redash env file:
and this gives a different error:
Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Ah, I think, instead of deleting this question, I'll leave the answer here, since I found it almost straight away. My host's postfix config needed some changes too. Firstly, I needed:
instead of the default (on Debian 12 at least) of:
I also needed to add:
to the mynetworks line, since the SMTP connections from docker containers will be coming from that CIDR. With these changes, sending a test mail from the server container worked. I then had to add the same 'extra_hosts' config to the 'scheduler', 'scheduled_worker' and 'adhoc_worker' container config, so that sending invitation and password reset emails worked too. I'm not sure whether all three needed it, but, well, why not, for covering any eventualities. 😄 |
Beta Was this translation helpful? Give feedback.
-
Cool, that sounds a like useful way to do it. One thought that pops to mind is that the So it might be good to add some firewall rules (or security group settings in AWS) to make sure nothing external to the host can reach it. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply, @justinclift . Indeed, I forgot to mention, this is on AWS, and the security groups we have in force do not allow inbound port 25 to the host server. |
Beta Was this translation helpful? Give feedback.
-
As a general thought, another way of getting email working is to use an external provider and send the mail through them. I've personally been using SMTP2Go, and they've been super reliable. 😄 These are the
As a special note, don't bother using SendGrid (sendgrid.com). First place I tried, but they're blocked by a lot of places for being a source of spam, so they're completely unreliable. |
Beta Was this translation helpful? Give feedback.
Ah, I think, instead of deleting this question, I'll leave the answer here, since I found it almost straight away.
My host's postfix config needed some changes too. Firstly, I needed:
instead of the default (on Debian 12 at least) of:
I also needed to add:
to the mynetworks line, since the SMTP connections from docker containers will be coming from that CIDR.
With these changes, sending a test mail from the server container worked. I then had to add the same 'extra_hosts' config to the 'scheduler', 'scheduled_worker' and 'adhoc_worker' container config, so that sending invitation and password reset emails worked too. I…