Skip to content
Snippets Groups Projects
Commit 1fb7cd00 authored by Lars Beckers's avatar Lars Beckers
Browse files

postfix: don't differentiate between undefined and empty alias lists

parent 6dbc9220
No related branches found
No related tags found
1 merge request!16Minimal Viable FSMPI Deployment
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
template: template:
src: virtual.j2 src: virtual.j2
dest: /etc/postfix/virtual dest: /etc/postfix/virtual
when: virtual_aliases is defined or postfix_virtual_domains|count > 0 when: virtual_aliases|default([])|count > 0 or postfix_virtual_domains|count > 0
notify: notify:
- postmap virtual - postmap virtual
tags: tags:
......
{% for alias in system_aliases %} {% for alias in system_aliases|default([]) %}
{% if alias.src is string %} {% if alias.src is string %}
{{ alias.src }}: {{ alias.dest if alias.dest is string else alias.dest|join(', ') }} {{ alias.src }}: {{ alias.dest if alias.dest is string else alias.dest|join(', ') }}
{% else %} {% else %}
......
...@@ -98,7 +98,7 @@ tls_ssl_options = NO_COMPRESSION ...@@ -98,7 +98,7 @@ tls_ssl_options = NO_COMPRESSION
alias_maps = cdb:/etc/aliases alias_maps = cdb:/etc/aliases
alias_database = cdb:/etc/aliases alias_database = cdb:/etc/aliases
{% if virtual_aliases is defined or postfix_virtual_domains|count > 0 %} {% if virtual_aliases|default([])|count > 0 or postfix_virtual_domains|count > 0 %}
virtual_alias_maps = cdb:/etc/postfix/virtual virtual_alias_maps = cdb:/etc/postfix/virtual
{% endif %} {% endif %}
......
...@@ -4,7 +4,7 @@ hostmaster@{{ domain }} {{ adminaddr }} ...@@ -4,7 +4,7 @@ hostmaster@{{ domain }} {{ adminaddr }}
abuse@{{ domain }} {{ adminaddr }} abuse@{{ domain }} {{ adminaddr }}
{% endfor %} {% endfor %}
{% for alias in virtual_aliases %} {% for alias in virtual_aliases|default([]) %}
{% if alias.src is string %} {% if alias.src is string %}
{{ alias.src }} {{ alias.dest if alias.dest is string else alias.dest|join(', ') }} {{ alias.src }} {{ alias.dest if alias.dest is string else alias.dest|join(', ') }}
{% else %} {% else %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment