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