Fix stuff

This commit is contained in:
Julian Ospald 2015-08-27 02:19:49 +02:00
parent 4c241564f0
commit 6f2aab778e
6 changed files with 9 additions and 23 deletions

View File

@ -46,6 +46,7 @@ RUN openssl req -new -x509 -nodes -out /etc/ssl/certs/postfix.pem -keyout /etc/s
ADD ./config/postfix.main.cf /etc/postfix/main.cf
ADD ./config/postfix.master.cf.append /etc/postfix/master-additional.cf
RUN cat /etc/postfix/master-additional.cf >> /etc/postfix/master.cf
RUN newaliases -oA/etc/mail/aliases
# Dovecot configuration
COPY ./config/dovecot.mail /etc/dovecot/conf.d/10-mail.conf

View File

@ -1,20 +1,5 @@
#!/bin/bash
# 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
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/certs/ssl-cert-snakeoil.pem
else
cp /etc/ssl/certs/ssl-cert-snakeoil.pem /mail_settings/ssl-cert-snakeoil.pem
fi
# Update hostname if given
if [ -f /mail_settings/myhostname ]; then

View File

@ -1,5 +1,5 @@
ssl = yes
disable_plaintext_auth = yes
disable_plaintext_auth = no
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem

View File

@ -29,9 +29,9 @@ smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# information on enabling SSL in the smtp client.
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = /etc/mailname, localhost.localdomain, localhost
#alias_maps = hash:/etc/mail/aliases
#alias_database = hash:/etc/mail/aliases
mydestination = localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::1]/128
mailbox_size_limit = 0
@ -58,8 +58,8 @@ smtpd_relay_restrictions = permit_auth_destination, permit_mynetworks, reject
smtpd_recipient_restrictions = permit
# Delivery to dovecot
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#alias_maps = hash:/etc/mail/aliases
#alias_database = hash:/etc/mail/aliases
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_mailbox_domains = /etc/postfix/virtual-mailbox-domains
virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox-maps

View File

@ -1,5 +1,5 @@
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}
# we need to be permissive with the helo restrictions since the client can only
# authenticate after HELO has been sent

View File

@ -6,7 +6,7 @@ process_name=master
directory=/etc/postfix
command=/usr/sbin/postfix -c /etc/postfix start
startsecs=0
autorestart=true
autorestart=false
[program:dovecot]
command=/usr/sbin/dovecot -c /etc/dovecot/dovecot.conf -F