formula-postfix/postfix/files/virtual_alias_maps.cf

18 lines
491 B
CFEngine3
Raw Normal View History

2015-06-20 19:18:55 -04:00
{% set config = salt['pillar.get']('postfix:vmail', {}) -%}
{% macro set_parameter(parameter, default=None) -%}
{% set value = config.get(parameter, default) -%}
{% if value is not none -%}
{{ parameter }} = {{ value }}
{% endif -%}
{% endmacro -%}
{# Accept arbitrary parameters -#}
{% for parameter in config -%}
{{ set_parameter(parameter) }}
{% endfor -%}
{{ set_parameter('table', 'alias') }}
{{ set_parameter('select_field', 'goto') }}
{{ set_parameter('where_field', 'address') }}