FIxes #200
Added a second virtual_alias_map so that emails to existing users won't be caught from an catchall alias
This commit is contained in:
parent
a4c70f7a92
commit
bbc2c25d29
|
@ -77,7 +77,8 @@ tools/editconf.py /etc/postfix/main.cf \
|
|||
tools/editconf.py /etc/postfix/main.cf \
|
||||
virtual_mailbox_domains=sqlite:/etc/postfix/virtual-mailbox-domains.cf \
|
||||
virtual_mailbox_maps=sqlite:/etc/postfix/virtual-mailbox-maps.cf \
|
||||
virtual_alias_maps=sqlite:/etc/postfix/virtual-alias-maps.cf \
|
||||
virtual_alias_maps=sqlite:/etc/postfix/virtual-alias-maps.cf, \
|
||||
sqlite:/etc/postfix/virtual-self-alias-maps.cf \
|
||||
local_recipient_maps=\$virtual_mailbox_maps
|
||||
|
||||
# SQL statement to check if we handle mail for a domain, either for users or aliases.
|
||||
|
@ -98,6 +99,12 @@ dbpath=$db_path
|
|||
query = SELECT destination FROM aliases WHERE source='%s'
|
||||
EOF
|
||||
|
||||
# SQL statement to implicitly define an alias for each user so that existing users won't be caught by catchall aliases.
|
||||
cat > /etc/postfix/virtual-self-alias-maps.cf << EOF;
|
||||
dbpath=$db_path
|
||||
query = SELECT email FROM users WHERE email='%s'
|
||||
EOF
|
||||
|
||||
# Restart Services
|
||||
##################
|
||||
|
||||
|
|
Loading…
Reference in New Issue