From 188356237a51dc0e5e5d4640014839d1dbb79c25 Mon Sep 17 00:00:00 2001 From: Thomas VIAL Date: Tue, 31 Mar 2015 17:28:13 +0200 Subject: [PATCH] Now postfix configuration is generic. --- README.md | 13 +++++++------ start-mailserver.sh | 5 +++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1f9d001d..b138936e 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,19 @@ # docker-mailserver -A fullstack but simple mail server (smtp, imap, antispam, antivirus...) +A fullstack but simple mail server (smtp, imap, antispam, antivirus...) Includes: -- postfix +- postfix with smtp auth - courier-imap +- amavis - spamassasin - 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 @@ -32,8 +35,6 @@ Only config files, no *sql database required. - "143:143" - "587:587" - "993:993" - volumes: - - ./configs/postfix:/etc/postfix environment: docker_mail_domain: "my-domain.com" # format is user@domain.tld|clear_password diff --git a/start-mailserver.sh b/start-mailserver.sh index edeaeeb8..4a1754b3 100644 --- a/start-mailserver.sh +++ b/start-mailserver.sh @@ -25,9 +25,10 @@ done < /tmp/docker_mail_users rm /tmp/docker_mail_users 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/virtual +[ -f /etc/postfix/virtual ] && postmap /etc/postfix/virtual echo "Fixing permissions" chown -R 5000:5000 /var/mail