Skip to content

Commit 1da8034

Browse files
authored
Merge pull request #80 from bawuenet/proxy_map_support
Fix table type for proxy tables
2 parents 8f11260 + 9281c79 commit 1da8034

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

postfix/files/main.cf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ policy-spf_time_limit = {{ policyd_spf.get('time_limit', '3600s') }}
120120

121121
{%- for mapping, data in salt['pillar.get']('postfix:mapping', {}).items() %}
122122
{%- set file_path = salt['pillar.get']('postfix:config:' ~ mapping) %}
123-
{%- if ':' in file_path %}
123+
{%- if file_path.startswith('proxy:') %}
124+
{#- Discard the proxy:-prefix #}
125+
{%- set _, file_type, file_path = file_path.split(':') %}
126+
{%- elif ':' in file_path %}
124127
{%- set file_type, file_path = file_path.split(':') %}
125128
{%- else %}
126129
{%- set file_type = default_database_type %}

postfix/init.sls

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ postfix_alias_absent_{{ user }}:
7676
{% for mapping, data in salt['pillar.get']('postfix:mapping', {}).items() %}
7777
{%- set need_postmap = False %}
7878
{%- set file_path = salt['pillar.get']('postfix:config:' ~ mapping) %}
79-
{%- if ':' in file_path %}
79+
{%- if file_path.startswith('proxy:') %}
80+
{#- Discard the proxy:-prefix #}
81+
{%- set _, file_type, file_path = file_path.split(':') %}
82+
{%- elif ':' in file_path %}
8083
{%- set file_type, file_path = file_path.split(':') %}
8184
{%- else %}
8285
{%- set file_type = default_database_type %}

0 commit comments

Comments
 (0)