From 3b45d333cf0dc9f3f8eeae51794fa78e6f46a79b Mon Sep 17 00:00:00 2001 From: Val Date: Tue, 6 Jan 2015 10:03:15 +0000 Subject: [PATCH] Copy SSL snakeoil to the right place --- Dockerfile | 12 +----------- config/postfix.main.cf | 2 +- process_settings | 10 ++++------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 055e360..e004cbb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,6 @@ RUN locale-gen en_GB en_GB.UTF-8 && dpkg-reconfigure locales RUN apt-get update -RUN apt-get -y -q autoclean -RUN apt-get -y -q autoremove -RUN apt-get clean - # Prerequisites # install self-signed ssl certs RUN apt-get install -y --force-yes ssl-cert @@ -47,13 +43,7 @@ ADD ./config/dovecot.imap /etc/dovecot/conf.d/20-imap.conf # add verbose logging #ADD ./config/dovecot.logging /etc/dovecot/conf.d/10-logging.conf -# smtp port for incoming mail -EXPOSE 25 -# imap port -EXPOSE 143 -# smtp port for outgoing -EXPOSE 587 - +EXPOSE 25 143 587 # todo: enable port 587 for outgoing mail, separate ports 25 and 587 # http://www.synology-wiki.de/index.php/Zusaetzliche_Ports_fuer_Postfix diff --git a/config/postfix.main.cf b/config/postfix.main.cf index 149a969..ace7970 100644 --- a/config/postfix.main.cf +++ b/config/postfix.main.cf @@ -31,7 +31,7 @@ smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache myhostname = localhost alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases -mydestination = /etc/mailname, 67b0a2fd2749, localhost.localdomain, localhost +mydestination = /etc/mailname, localhost.localdomain, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 diff --git a/process_settings b/process_settings index f3d6d31..bc855d1 100644 --- a/process_settings +++ b/process_settings @@ -1,17 +1,15 @@ # Check if we have SSL certificates in config, otherwise copy it there # First the key file -if [ -f /mail_settings/ssl-cert-snakeoil.key ] -then +if [ -f /mail_settings/ssl-cert-snakeoil.key ]; then cp /mail_settings/ssl-cert-snakeoil.key /etc/ssl/private/ssl-cert-snakeoil.key else cp /etc/ssl/private/ssl-cert-snakeoil.key /mail_settings/ssl-cert-snakeoil.key fi # Then the pem file -if [ -f /mail_settings/ssl-cert-snakeoil.pem ] -then - cp /mail_settings/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.pem +if [ -f /mail_settings/ssl-cert-snakeoil.pem ]; then + cp /mail_settings/ssl-cert-snakeoil.pem /etc/ssl/certs/ssl-cert-snakeoil.pem else - cp /etc/ssl/private/ssl-cert-snakeoil.pem /mail_settings/ssl-cert-snakeoil.pem + cp /etc/ssl/certs/ssl-cert-snakeoil.pem /mail_settings/ssl-cert-snakeoil.pem fi # Copy OpenDKIM config