saltstack-formulas / postfix-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
25 stars 130 forks source link

virtual_alias_maps parameter is ignored. #89

Closed roskens closed 5 years ago

roskens commented 5 years ago

I am trying to configure the virtual_alias_maps parameter against two maps in my pillar data. In #83, it was suggested something like this might be possible in the future:

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

But that isn't supported yet, so I was trying to do this instead:

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' 

The two files /etc/postfix/virtual and /etc/postfix/virtual.pcre get created, however, no parameter entry is added for virtual_alias_maps!

alxwr commented 5 years ago

@roskens I proposed a solution for this issue in #90.

roskens commented 5 years ago

That would work.