Skip to content

Commit

Permalink
Explain multiple entries in virtual_alias_maps via pillar.example
Browse files Browse the repository at this point in the history
  • Loading branch information
alxwr committed Apr 24, 2019
1 parent 41603d6 commit cdc4c5e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,24 @@ postfix:
- someuser_1@example.com
- someuser_2@example.com
- singlealiasexample: someuser_3@example.com


###
#
# Multiple virtual_alias_maps entries:
#
# You are free to define alternative mapping names
# and use them as 'variables' in your Postfix config:
# (Credit for the idea and the example goes to @roskens.)

postfix:
config:
virtual_alias_maps: $virtual_alias_1_maps $virtual_alias_2_maps
virtual_alias_1_maps: hash:/etc/postfix/virtual
virtual_alias_2_maps: pcre:/etc/postfix/virtual.pcre
mapping:
virtual_alias_1_maps:
root:
- me
virtual_alias_2_maps:
- '/(\S+)_(devel|preprod|prod)@sub.example.com$/': '$(1)@$(2).sub.example.com'

0 comments on commit cdc4c5e

Please sign in to comment.