A container with an email server

We need the SMTP server for our mailer service. We use the juanluisbaptiste/postfix image with the Postfix mail server. The server also has to be restarted if it fails and we set the restart policy to always. Look at the following code:

smtp:
image: juanluisbaptiste/postfix
restart: always
environment:
- SMTP_SERVER=smtp.example.com
- [email protected]
- SMTP_PASSWORD=password
- SERVER_HOSTNAME=smtp.example.com
ports:
- "2525:25"

We also configure the server using the environment variables and set the server name, username, password, and a hostname. To test the mail server, we forward port 25 of the mail server to a local 2525 port.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.218.157