mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Added SSL for courier-imap using courier-imap-ssl.
Fixed /etc/postfix/vhost issue.
This commit is contained in:
parent
188356237a
commit
ccca157920
|
@ -4,7 +4,7 @@ MAINTAINER Thomas VIAL
|
||||||
# Packages
|
# Packages
|
||||||
RUN apt-get update -q
|
RUN apt-get update -q
|
||||||
RUN apt-get -y upgrade
|
RUN apt-get -y upgrade
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install postfix sasl2-bin courier-imap courier-authdaemon supervisor libfam0 fam amavisd-new spamassassin clamav-daemon libnet-dns-perl libmail-spf-perl pyzor razor arj bzip2 cabextract cpio file gzip nomarch pax unzip zip zoo rsyslog
|
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install postfix sasl2-bin courier-imap courier-imap-ssl courier-authdaemon supervisor libfam0 fam amavisd-new spamassassin clamav-daemon libnet-dns-perl libmail-spf-perl pyzor razor arj bzip2 cabextract cpio file gzip nomarch pax unzip zip zoo rsyslog
|
||||||
RUN apt-get autoclean
|
RUN apt-get autoclean
|
||||||
|
|
||||||
# Configures Saslauthd
|
# Configures Saslauthd
|
||||||
|
|
|
@ -5,7 +5,7 @@ A fullstack but simple mail server (smtp, imap, antispam, antivirus...)
|
||||||
Includes:
|
Includes:
|
||||||
|
|
||||||
- postfix with smtp auth
|
- postfix with smtp auth
|
||||||
- courier-imap
|
- courier-imap with ssl support
|
||||||
- amavis
|
- amavis
|
||||||
- spamassasin
|
- spamassasin
|
||||||
- clamav
|
- clamav
|
||||||
|
@ -14,6 +14,8 @@ Additional informations:
|
||||||
|
|
||||||
- only config files, no *sql database required
|
- only config files, no *sql database required
|
||||||
- mails are stored in `/var/mail/${domain}/${username}`
|
- mails are stored in `/var/mail/${domain}/${username}`
|
||||||
|
- email login are full email address (`username1@my-domain.com`)
|
||||||
|
- ssl is strongly recommended
|
||||||
|
|
||||||
## installation
|
## installation
|
||||||
|
|
||||||
|
|
|
@ -20,15 +20,17 @@ do
|
||||||
echo "${pass}" | saslpasswd2 -p -c -u ${domain} ${login}
|
echo "${pass}" | saslpasswd2 -p -c -u ${domain} ${login}
|
||||||
mkdir -p /var/mail/${domain}
|
mkdir -p /var/mail/${domain}
|
||||||
maildirmake /var/mail/${domain}/${user}
|
maildirmake /var/mail/${domain}/${user}
|
||||||
|
echo ${domain} >> /tmp/vhost.tmp
|
||||||
|
|
||||||
done < /tmp/docker_mail_users
|
done < /tmp/docker_mail_users
|
||||||
rm /tmp/docker_mail_users
|
rm /tmp/docker_mail_users
|
||||||
makeuserdb
|
makeuserdb
|
||||||
|
|
||||||
echo "Postfix 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
|
||||||
[ -f /etc/postfix/virtual ] && postmap /etc/postfix/virtual
|
touch /etc/postfix/virtual && postmap /etc/postfix/virtual
|
||||||
|
sed -i -r 's/DOCKER_MAIL_DOMAIN/'"$docker_mail_domain"'/g' /etc/postfix/main.cf
|
||||||
|
cat /tmp/vhost.tmp | sort | uniq >> /etc/postfix/vhost && rm /tmp/vhost.tmp
|
||||||
|
|
||||||
echo "Fixing permissions"
|
echo "Fixing permissions"
|
||||||
chown -R 5000:5000 /var/mail
|
chown -R 5000:5000 /var/mail
|
||||||
|
@ -43,6 +45,7 @@ echo "Starting daemons"
|
||||||
/etc/init.d/saslauthd start
|
/etc/init.d/saslauthd start
|
||||||
/etc/init.d/courier-authdaemon start
|
/etc/init.d/courier-authdaemon start
|
||||||
/etc/init.d/courier-imap start
|
/etc/init.d/courier-imap start
|
||||||
|
/etc/init.d/courier-imap-ssl start
|
||||||
/etc/init.d/spamassassin start
|
/etc/init.d/spamassassin start
|
||||||
/etc/init.d/clamav-daemon start
|
/etc/init.d/clamav-daemon start
|
||||||
/etc/init.d/amavis start
|
/etc/init.d/amavis start
|
||||||
|
|
Loading…
Reference in a new issue