mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
parent
fe8287f60a
commit
912cb5676b
|
@ -463,7 +463,7 @@ function _setup_dovecot_local_user() {
|
|||
|
||||
# Creating users
|
||||
# 'pass' is encrypted
|
||||
while IFS=$'|' read login pass
|
||||
grep "^[a-z]" /tmp/docker-mailserver/postfix-accounts.cf | while IFS=$'|' read login pass
|
||||
do
|
||||
# Setting variables for better readability
|
||||
user=$(echo ${login} | cut -d @ -f1)
|
||||
|
@ -488,7 +488,7 @@ function _setup_dovecot_local_user() {
|
|||
# Copy user provided sieve file, if present
|
||||
test -e /tmp/docker-mailserver/${login}.dovecot.sieve && cp /tmp/docker-mailserver/${login}.dovecot.sieve /var/mail/${domain}/${user}/.dovecot.sieve
|
||||
echo ${domain} >> /tmp/vhost.tmp
|
||||
done < /tmp/docker-mailserver/postfix-accounts.cf
|
||||
done
|
||||
else
|
||||
notify 'warn' "'config/docker-mailserver/postfix-accounts.cf' is not provided. No mail account created."
|
||||
fi
|
||||
|
@ -805,7 +805,10 @@ function _setup_postfix_override_configuration() {
|
|||
|
||||
if [ -f /tmp/docker-mailserver/postfix-main.cf ]; then
|
||||
while read line; do
|
||||
# line should start with a letter (avoid comments and new lines)
|
||||
if [[ "$line" =~ ^[a-z] ]]; then
|
||||
postconf -e "$line"
|
||||
fi
|
||||
done < /tmp/docker-mailserver/postfix-main.cf
|
||||
notify 'inf' "Loaded 'config/postfix-main.cf'"
|
||||
else
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
recipient_delimiter = ~
|
||||
max_idle = 600s
|
||||
# this is a comment
|
||||
readme_directory = /tmp
|
||||
|
||||
|
|
|
@ -346,6 +346,11 @@ load 'test_helper/bats-assert/load'
|
|||
assert_output 7
|
||||
}
|
||||
|
||||
@test "checking accounts: comments are not parsed" {
|
||||
run docker exec mail /bin/bash -c "ls /var/mail | grep 'comment'"
|
||||
assert_failure
|
||||
}
|
||||
|
||||
#
|
||||
# postfix
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue