mirror of
https://github.com/bokysan/docker-postfix.git
synced 2024-09-20 14:56:10 +08:00
266bfb1ba0
Hopefully this exampels will help people get up to speed and deploy the solution faster. They show how the image can be used in different scenarios, e.g.: - as a MTA for Dovecot with `docker-compose` - as an outgoing queue towards AWS SES or Google Mail through `helm` - as an outgoing queue towards Sendgrid through `helm`
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
replicaCount: 1
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 128Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
|
|
# priorityClassName: mail
|
|
extraVolumes:
|
|
- name: config
|
|
configMap:
|
|
name: postfix-mail
|
|
extraVolumeMounts:
|
|
- mountPath: /docker-init.db/startup.sh
|
|
subPath: startup.sh
|
|
name: config
|
|
|
|
persistence:
|
|
enabled: true
|
|
storageClass: "standard"
|
|
|
|
secret:
|
|
SENDGRID_SMTP_SERVER: smtp.sendgrid.net
|
|
SENDGRID_API_KEY: "XXXXYYYYZZZZ"
|
|
|
|
config:
|
|
general:
|
|
TZ: "Europe/London"
|
|
RELAYHOST: "smtp.sendgrid.net:587"
|
|
ALLOWED_SENDER_DOMAINS: "example.com example.org example.net"
|
|
LOG_FORMAT: "json"
|
|
|
|
startup.sh: |
|
|
#!/bin/sh
|
|
set -e
|
|
|
|
SASL_PASSWD=/etc/postfix/sasl_passwd
|
|
|
|
: > $SASL_PASSWD
|
|
cat > $SASL_PASSWD <<EOF
|
|
[${SENDGRID_SMTP_SERVER}]:587 apikey:${SENDGRID_API_KEY}
|
|
EOF
|
|
|
|
postmap /etc/postfix/sasl_passwd
|
|
|
|
postfix:
|
|
smtp_sasl_auth_enable: "yes"
|
|
smtp_sasl_password_maps: "lmdb:/etc/postfix/sasl_passwd"
|
|
smtp_sasl_security_options: "noanonymous"
|
|
smtp_tls_security_level: "encrypt"
|
|
smtp_tls_note_starttls_offer: "yes"
|