Postfix in Amazon Linux 2 installed with dependencies
133
Default Amazon Linux 2 with postfix and ssl tls libraries Create /etc/postfix/main.cf file with your configurations Create /etc/postfix/master.cf file with your configurations Create sasl_passwd for smtp relay
postmap hash:/etc/postfix/sasl_passwd
Creating TLS certificates for TLS SSL
mkdir -p /etc/pki/tls/postfix && cd /etc/pki/tls/postfix && openssl req -new -x509 -days 1 -nodes -newkey rsa:2048 -keyout private.key \
-out public.cert -subj "/C=US/ST=Ca/L=Sunnydale"
Docker compose example
version: "3.0"
services:
smtp:
image: "devopsdarkmaster/postfix:stable-release"
network_mode: host
privileged: true
entrypoint: [ "/usr/sbin/init" ]
volumes:
- /etc/postfix/main.cf:/etc/postfix/main.cf
- /etc/postfix/master.cf:/etc/postfix/master.cf
- /etc/postfix/sasl_passwd:/etc/postfix/sasl_passwd
- /etc/postfix/sasl_passwd.db:/etc/postfix/sasl_passwd.db
- /etc/pki/tls/postfix:/etc/pki/tls/postfix
command:
- postmap hash:/etc/postfix/sasl_passwd
- chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
- chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
- postfix reload
restart: always
If need help telegram nick @darkdevops
Content type
Image
Digest
sha256:166ee2cde…
Size
266.6 MB
Last updated
about 4 years ago
docker pull devopsdarkmaster/postfix:v1.0.5-stable