mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-05 02:27:15 +02:00
Trying to separate virtuals from accounts
This commit is contained in:
parent
63caae1e25
commit
23362190a8
3 changed files with 11 additions and 2 deletions
|
@ -6,7 +6,8 @@ echo "Regenerating postfix 'vmailbox' and 'virtual' for given users"
|
|||
# rm /etc/postfix/vmailbox
|
||||
# rm /etc/postfix/vmailbox.db
|
||||
echo "# WARNING: this file is auto-generated. Do not modify locally" > /etc/postfix/vmailbox
|
||||
while IFS=$'|' read -r login pass aliases
|
||||
# Creating users
|
||||
while IFS=$'|' read -r login pass
|
||||
do
|
||||
|
||||
# Setting variables for better readability
|
||||
|
@ -33,6 +34,13 @@ do
|
|||
|
||||
done < /tmp/postfix/accounts.cf
|
||||
makeuserdb
|
||||
#creating virtuals
|
||||
while IFS=$'|' read -r from to
|
||||
do
|
||||
echo "from : '$from' aliases: '$to'"
|
||||
# Let's go!
|
||||
echo "$from\t$to" >> /etc/postfix/virtual
|
||||
done < /tmp/postfix/redirects.cf
|
||||
|
||||
echo "Postfix configurations"
|
||||
postmap /etc/postfix/vmailbox
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue