K
K
Konstantin Alikhanov2017-06-01 14:54:46
SMTP
Konstantin Alikhanov, 2017-06-01 14:54:46

How to set up a docker container to send mail?

Good afternoon.
I have a Django application in a docker container. Nearby in the same place in the Nginx container and Postgres in the same place, all this works together through docker-compose. I want to connect one more service there - to send mail. Tried catatnight/postfix ( https://hub.docker.com/r/catatnight/postfix/ ). Initially just as image in docker-compose.yml, doesn't work.

mail:
    image: catatnight/postfix
    ports:
      - "25:25"
      - "587:587"
    environment:
      - maildomain=cc.example.org
      - [email protected]:1234Qwer
    volumes:
      - ./nginx/letsencrypt:/etc/postfix/certs

There I have letsencrypt certificates, they are *.pem. I cloned the repository, edited assets/install.sh so that the paths to the certificates were written directly, without any $(find /etc/postfix/certs -iname *.key) . Still doesn't work. Django says it can't connect. (No, I didn't forget to write mail in depends_on)
Please help me, all I need to do is just send mail. Don't accept, don't forward, nothing. Send only

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question