diff --git a/postfix/files/main.cf b/postfix/files/main.cf index 0776953..cc488ee 100644 --- a/postfix/files/main.cf +++ b/postfix/files/main.cf @@ -1,7 +1,7 @@ {% from "postfix/map.jinja" import postfix with context %} {% set config = salt['pillar.get']('postfix:config', {}) -%} -{% set processed_parameters = ['aliases', 'virtual'] -%} +{% set processed_parameters = ['aliases_file', 'virtual'] -%} {% macro set_parameter(parameter, default=None) -%} {% set value = config.get(parameter, default) -%} {% if value is not none -%} @@ -48,8 +48,8 @@ # information on enabling SSL in the smtp client. {{ set_parameter('myhostname', grains['fqdn']) }} -{{ set_parameter('alias_maps', 'hash:' ~ postfix.aliases) }} -{{ set_parameter('alias_database', 'hash:' ~ postfix.aliases) }} +{{ set_parameter('alias_maps', 'hash:' ~ postfix.aliases_file) }} +{{ set_parameter('alias_database', 'hash:' ~ postfix.aliases_file) }} {{ set_parameter('mydestination', [grains['fqdn'], 'localhost', 'localhost.localdomain', grains['domain']]) }} {{ set_parameter('relayhost', '') }} {{ set_parameter('mynetworks', ['127.0.0.0/8', '[::ffff:127.0.0.0]/104', '[::1]/128']) }} diff --git a/postfix/map.jinja b/postfix/map.jinja index c884024..49bf76a 100644 --- a/postfix/map.jinja +++ b/postfix/map.jinja @@ -4,27 +4,27 @@ 'policyd_spf_pkg': 'postfix-policyd-spf-python', 'postgrey_pkg': 'postgrey', 'service': 'postfix', - 'aliases': '/etc/aliases', + 'aliases_file': '/etc/aliases', }, 'Gentoo': { 'package': 'mail-mta/postfix', 'policyd_spf_pkg': 'mail-filter/pypolicyd-spf', 'postgrey_pkg': 'mail-filter/postgrey', 'service': 'postfix', - 'aliases': '/etc/mail/aliases', + 'aliases_file': '/etc/mail/aliases', }, 'RedHat': { 'package': 'postfix', 'policyd_spf_pkg': 'pypolicyd-spf', 'postgrey_pkg': 'postgrey', 'service': 'postfix', - 'aliases': '/etc/aliases', + 'aliases_file': '/etc/aliases', }, 'Arch' : { 'package': 'postfix', 'policyd_spf_pkg': 'python-postfix-policyd-spf', 'postgrey_pkg': 'postgrey', 'service': 'postfix', - 'aliases': '/etc/aliases', + 'aliases_file': '/etc/aliases', }, }, merge=salt['pillar.get']('postfix:lookup')) %}