Merge 2ee15988c2
into 5abff5208e
This commit is contained in:
commit
9ac3106cb2
|
@ -129,7 +129,10 @@ RUN sed -i -r "/^#?compress/c\compress\ncopytruncate" /etc/logrotate.conf && \
|
||||||
# Get LetsEncrypt signed certificate
|
# Get LetsEncrypt signed certificate
|
||||||
RUN curl -s https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem > /etc/ssl/certs/lets-encrypt-x3-cross-signed.pem
|
RUN curl -s https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem > /etc/ssl/certs/lets-encrypt-x3-cross-signed.pem
|
||||||
|
|
||||||
|
RUN chown 5000:5000 /var/mail
|
||||||
|
|
||||||
COPY ./target/bin /usr/local/bin
|
COPY ./target/bin /usr/local/bin
|
||||||
|
|
||||||
# Start-mailserver script
|
# Start-mailserver script
|
||||||
COPY ./target/start-mailserver.sh /usr/local/bin/
|
COPY ./target/start-mailserver.sh /usr/local/bin/
|
||||||
RUN chmod +x /usr/local/bin/*
|
RUN chmod +x /usr/local/bin/*
|
||||||
|
|
|
@ -20,6 +20,7 @@ DEFAULT_VARS["POSTGREY_MAX_AGE"]="${POSTGREY_MAX_AGE:="35"}"
|
||||||
DEFAULT_VARS["POSTGREY_TEXT"]="${POSTGREY_TEXT:="Delayed by postgrey"}"
|
DEFAULT_VARS["POSTGREY_TEXT"]="${POSTGREY_TEXT:="Delayed by postgrey"}"
|
||||||
DEFAULT_VARS["ENABLE_SASLAUTHD"]="${ENABLE_SASLAUTHD:="0"}"
|
DEFAULT_VARS["ENABLE_SASLAUTHD"]="${ENABLE_SASLAUTHD:="0"}"
|
||||||
DEFAULT_VARS["SMTP_ONLY"]="${SMTP_ONLY:="0"}"
|
DEFAULT_VARS["SMTP_ONLY"]="${SMTP_ONLY:="0"}"
|
||||||
|
DEFAULT_VARS["POSTFIX_MAILBOXDOMAINS"]="${POSTFIX_MAILBOXDOMAINS:="localhost"}"
|
||||||
DEFAULT_VARS["VIRUSMAILS_DELETE_DELAY"]="${VIRUSMAILS_DELETE_DELAY:="7"}"
|
DEFAULT_VARS["VIRUSMAILS_DELETE_DELAY"]="${VIRUSMAILS_DELETE_DELAY:="7"}"
|
||||||
DEFAULT_VARS["DMS_DEBUG"]="${DMS_DEBUG:="0"}"
|
DEFAULT_VARS["DMS_DEBUG"]="${DMS_DEBUG:="0"}"
|
||||||
DEFAULT_VARS["OVERRIDE_HOSTNAME"]="${OVERRIDE_HOSTNAME}"
|
DEFAULT_VARS["OVERRIDE_HOSTNAME"]="${OVERRIDE_HOSTNAME}"
|
||||||
|
@ -110,6 +111,7 @@ function register_functions() {
|
||||||
_register_setup_function "_setup_security_stack"
|
_register_setup_function "_setup_security_stack"
|
||||||
_register_setup_function "_setup_postfix_aliases"
|
_register_setup_function "_setup_postfix_aliases"
|
||||||
_register_setup_function "_setup_postfix_vhost"
|
_register_setup_function "_setup_postfix_vhost"
|
||||||
|
_register_setup_function "_setup_postfix_mydestination"
|
||||||
|
|
||||||
if [ ! -z "$AWS_SES_HOST" -a ! -z "$AWS_SES_USERPASS" ]; then
|
if [ ! -z "$AWS_SES_HOST" -a ! -z "$AWS_SES_USERPASS" ]; then
|
||||||
_register_setup_function "_setup_postfix_relay_amazon_ses"
|
_register_setup_function "_setup_postfix_relay_amazon_ses"
|
||||||
|
@ -123,7 +125,7 @@ function register_functions() {
|
||||||
|
|
||||||
################### >> fix funcs
|
################### >> fix funcs
|
||||||
|
|
||||||
_register_fix_function "_fix_var_mail_permissions"
|
# _register_fix_function "_fix_var_mail_permissions"
|
||||||
|
|
||||||
################### << fix funcs
|
################### << fix funcs
|
||||||
|
|
||||||
|
@ -605,6 +607,16 @@ function _setup_postfix_aliases() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _setup_postfix_mydestination(){
|
||||||
|
notify 'task' "Setting up Postfix vhost"
|
||||||
|
|
||||||
|
IFS=', ' eval 'vhosts=($POSTFIX_MAILBOXDOMAINS)'
|
||||||
|
for i in "${vhosts[@]}"
|
||||||
|
do
|
||||||
|
echo $i >> /etc/postfix/vhost
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
function _setup_dkim() {
|
function _setup_dkim() {
|
||||||
notify 'task' 'Setting up DKIM'
|
notify 'task' 'Setting up DKIM'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue