Skip to content
Snippets Groups Projects
Commit 6d33f02a authored by Hinrikus Wolf's avatar Hinrikus Wolf
Browse files

Merge branch 'postfix-optional-virtual' into 'master'

postfix: don't try to deploy undefined virtual aliases

See merge request !14
parents 2475e025 200f13bc
No related branches found
No related tags found
1 merge request!14postfix: don't try to deploy undefined virtual aliases
Pipeline #2846 passed
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,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
notify: notify:
- postmap virtual - postmap virtual
tags: tags:
......
...@@ -98,7 +98,9 @@ tls_ssl_options = NO_COMPRESSION ...@@ -98,7 +98,9 @@ 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 %}
virtual_alias_maps = cdb:/etc/postfix/virtual virtual_alias_maps = cdb:/etc/postfix/virtual
{% endif %}
{% if postfix_virtual_domains|count > 0 and postfix_enable_dovecot %} {% if postfix_virtual_domains|count > 0 and postfix_enable_dovecot %}
virtual_mailbox_domains = {{ postfix_virtual_domains | join(", ") }} virtual_mailbox_domains = {{ postfix_virtual_domains | join(", ") }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment