postfix with alpine-linux as docker-image
With the evolution of this repo, we will add tls / sasl / stdout-log in the end.
docker-compose.yaml
is an example for docker-compose deployment.
Steps to deploy docker-compose:
docker-compose --env-file docker_compose.env -f docker-compose.yaml up -d
k8s.yaml
is an example for k8s deployment.
Difference with the default settings:
- log to stdout
- with smtps
- smtpd_relay_restrictions with only permit_mynetworks
- smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
- postfix is expected to run in foreground.
Steps to deploy to k8s:
kubectl create namespace postfix
kubectl create secret tls postfix-tls --key [key-file] --cert [cert-file] --namespace postfix
- modify the followings in
k8s.yaml
- mynetworks
- myhostname
- mydomain
kubectl apply -f k8s.yaml