Merge pull request #25 from BT-dschleich/master

make aliases work
This commit is contained in:
puneet kandhari 2015-08-27 09:35:50 -05:00
commit 5e7d54b1f6
2 changed files with 7 additions and 7 deletions

View file

@ -1,7 +1,7 @@
{% from "postfix/map.jinja" import postfix with context %} {% from "postfix/map.jinja" import postfix with context %}
{% set config = salt['pillar.get']('postfix:config', {}) -%} {% set config = salt['pillar.get']('postfix:config', {}) -%}
{% set processed_parameters = ['aliases', 'virtual'] -%} {% set processed_parameters = ['aliases_file', 'virtual'] -%}
{% macro set_parameter(parameter, default=None) -%} {% macro set_parameter(parameter, default=None) -%}
{% set value = config.get(parameter, default) -%} {% set value = config.get(parameter, default) -%}
{% if value is not none -%} {% if value is not none -%}
@ -48,8 +48,8 @@
# information on enabling SSL in the smtp client. # information on enabling SSL in the smtp client.
{{ set_parameter('myhostname', grains['fqdn']) }} {{ set_parameter('myhostname', grains['fqdn']) }}
{{ set_parameter('alias_maps', 'hash:' ~ postfix.aliases) }} {{ set_parameter('alias_maps', 'hash:' ~ postfix.aliases_file) }}
{{ set_parameter('alias_database', 'hash:' ~ postfix.aliases) }} {{ set_parameter('alias_database', 'hash:' ~ postfix.aliases_file) }}
{{ set_parameter('mydestination', [grains['fqdn'], 'localhost', 'localhost.localdomain', grains['domain']]) }} {{ set_parameter('mydestination', [grains['fqdn'], 'localhost', 'localhost.localdomain', grains['domain']]) }}
{{ set_parameter('relayhost', '') }} {{ set_parameter('relayhost', '') }}
{{ set_parameter('mynetworks', ['127.0.0.0/8', '[::ffff:127.0.0.0]/104', '[::1]/128']) }} {{ set_parameter('mynetworks', ['127.0.0.0/8', '[::ffff:127.0.0.0]/104', '[::1]/128']) }}

View file

@ -4,27 +4,27 @@
'policyd_spf_pkg': 'postfix-policyd-spf-python', 'policyd_spf_pkg': 'postfix-policyd-spf-python',
'postgrey_pkg': 'postgrey', 'postgrey_pkg': 'postgrey',
'service': 'postfix', 'service': 'postfix',
'aliases': '/etc/aliases', 'aliases_file': '/etc/aliases',
}, },
'Gentoo': { 'Gentoo': {
'package': 'mail-mta/postfix', 'package': 'mail-mta/postfix',
'policyd_spf_pkg': 'mail-filter/pypolicyd-spf', 'policyd_spf_pkg': 'mail-filter/pypolicyd-spf',
'postgrey_pkg': 'mail-filter/postgrey', 'postgrey_pkg': 'mail-filter/postgrey',
'service': 'postfix', 'service': 'postfix',
'aliases': '/etc/mail/aliases', 'aliases_file': '/etc/mail/aliases',
}, },
'RedHat': { 'RedHat': {
'package': 'postfix', 'package': 'postfix',
'policyd_spf_pkg': 'pypolicyd-spf', 'policyd_spf_pkg': 'pypolicyd-spf',
'postgrey_pkg': 'postgrey', 'postgrey_pkg': 'postgrey',
'service': 'postfix', 'service': 'postfix',
'aliases': '/etc/aliases', 'aliases_file': '/etc/aliases',
}, },
'Arch' : { 'Arch' : {
'package': 'postfix', 'package': 'postfix',
'policyd_spf_pkg': 'python-postfix-policyd-spf', 'policyd_spf_pkg': 'python-postfix-policyd-spf',
'postgrey_pkg': 'postgrey', 'postgrey_pkg': 'postgrey',
'service': 'postfix', 'service': 'postfix',
'aliases': '/etc/aliases', 'aliases_file': '/etc/aliases',
}, },
}, merge=salt['pillar.get']('postfix:lookup')) %} }, merge=salt['pillar.get']('postfix:lookup')) %}