Now postfix configuration is generic.

This commit is contained in:
Thomas VIAL 2015-03-31 17:28:13 +02:00
parent ef34462e34
commit 188356237a
2 changed files with 10 additions and 8 deletions

View file

@ -4,13 +4,16 @@ A fullstack but simple mail server (smtp, imap, antispam, antivirus...)
Includes: Includes:
- postfix - postfix with smtp auth
- courier-imap - courier-imap
- amavis
- spamassasin - spamassasin
- clamav - clamav
- amavis
Only config files, no *sql database required. Additional informations:
- only config files, no *sql database required
- mails are stored in `/var/mail/${domain}/${username}`
## installation ## installation
@ -32,8 +35,6 @@ Only config files, no *sql database required.
- "143:143" - "143:143"
- "587:587" - "587:587"
- "993:993" - "993:993"
volumes:
- ./configs/postfix:/etc/postfix
environment: environment:
docker_mail_domain: "my-domain.com" docker_mail_domain: "my-domain.com"
# format is user@domain.tld|clear_password # format is user@domain.tld|clear_password

View file

@ -25,9 +25,10 @@ done < /tmp/docker_mail_users
rm /tmp/docker_mail_users rm /tmp/docker_mail_users
makeuserdb makeuserdb
echo "Postmap configurations" echo "Postfix configurations"
sed -i -r 's/DOCKER_MAIL_DOMAIN/$docker_mail_domain/g' /etc/postfix/main.cf
postmap /etc/postfix/vmailbox postmap /etc/postfix/vmailbox
postmap /etc/postfix/virtual [ -f /etc/postfix/virtual ] && postmap /etc/postfix/virtual
echo "Fixing permissions" echo "Fixing permissions"
chown -R 5000:5000 /var/mail chown -R 5000:5000 /var/mail