Discourse Docker Installation and Postfix on Host error


(Albert Bruc) #1

Hi,

I’ve Discourse installed and my own postfix server installed and working on my host
I’ve authorized the ip docker address (as part of my network into the main.cf of postfix)
and always no mails (and no errors in logs)

Any ideas ?

I don’t want to use Mandrill or others externals MTA


Email error. Unable to send out email
(Jens Maier) #2

Programs running inside a Docker container (including Discourse) can not communicate with the host system through the lo interface and its associated addresses (127.0.0.1, ::1). As a consequence, you cannot use localhost as the mailserver address in Discourse’s configuration; instead, you must use your mailserver’s public IP address and setup authentication, or figure out how to use Docker’s internal virtual network.


(Albert Bruc) #3

Hi elberet,

I know that, my app.yml call my postfix server by its public address
The only thing I’ve add is the ip address of my Docker instance into mynetworks of the main.cf of postfix


(Jens Maier) #4

Ah, sorry, I didn’t notice the comment regarding the docker container’s IP address.

Did you check Discourse’s logs in the docker container?


(Albert Bruc) #5

Yes,

they are empty…


(Jens Maier) #6

Hm, my knee-jerk response would be suspect that you didn’t check the right log file(s). But I’m not sufficiently familiar with the docker container layout myself, soo… no idea. Sorry.

Anyway, at this point it may be easier to create your admin account without email and debug from there. See e.g. /logs once logged in as an admin.