Merge pull request #131 from auguster/master
Removed IFS + Added vmailbox config - Fixes #121
This commit is contained in:
commit
6b3360dd7c
|
@ -44,7 +44,7 @@ fi
|
||||||
if [ -f /tmp/postfix/virtual ]; then
|
if [ -f /tmp/postfix/virtual ]; then
|
||||||
# Copying virtual file
|
# Copying virtual file
|
||||||
cp /tmp/postfix/virtual /etc/postfix/virtual
|
cp /tmp/postfix/virtual /etc/postfix/virtual
|
||||||
while IFS=$' ' read from to
|
while read from to
|
||||||
do
|
do
|
||||||
# Setting variables for better readability
|
# Setting variables for better readability
|
||||||
domain=$(echo ${from} | cut -d @ -f2)
|
domain=$(echo ${from} | cut -d @ -f2)
|
||||||
|
@ -58,6 +58,9 @@ if [ -f /tmp/vhost.tmp ]; then
|
||||||
cat /tmp/vhost.tmp | sort | uniq > /etc/postfix/vhost && rm /tmp/vhost.tmp
|
cat /tmp/vhost.tmp | sort | uniq > /etc/postfix/vhost && rm /tmp/vhost.tmp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# manual mailbox configuration (reference http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox)
|
||||||
|
cat /tmp/postfix/vmailbox >> /etc/postfix/vmailbox
|
||||||
|
|
||||||
echo "Postfix configurations"
|
echo "Postfix configurations"
|
||||||
touch /etc/postfix/vmailbox && postmap /etc/postfix/vmailbox
|
touch /etc/postfix/vmailbox && postmap /etc/postfix/vmailbox
|
||||||
touch /etc/postfix/virtual && postmap /etc/postfix/virtual
|
touch /etc/postfix/virtual && postmap /etc/postfix/virtual
|
||||||
|
|
Loading…
Reference in New Issue