summaryrefslogtreecommitdiffstats
path: root/roles/common/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/common/templates')
-rw-r--r--roles/common/templates/etc/iptables/services.j25
-rw-r--r--roles/common/templates/etc/postfix/tls_policy.j22
2 files changed, 5 insertions, 2 deletions
diff --git a/roles/common/templates/etc/iptables/services.j2 b/roles/common/templates/etc/iptables/services.j2
index 7709066..c628d50 100644
--- a/roles/common/templates/etc/iptables/services.j2
+++ b/roles/common/templates/etc/iptables/services.j2
@@ -28,30 +28,33 @@ out tcp {{ postfix_instance.IMAP.port }}
{% endif %}
{% if 'lists' not in group_names %}
out tcp {{ postfix_instance.lists.port }}
{% endif %}
{% endif %}
{% if 'out' in group_names %}
{% if groups.all | difference([inventory_hostname]) %}
in tcp {{ postfix_instance.out.port }}
{% endif %}
out tcp 25 # SMTP
{% else %}
out tcp {{ postfix_instance.out.port }}
{% endif %}
{% if 'IMAP' in group_names %}
in tcp 993 # IMAPS
in tcp 4190 # ManageSieve
{% endif %}
{% if 'MDA' in group_names and 'MX' not in group_names %}
in tcp {{ postfix_instance.IMAP.port }}
{% endif %}
+{% if 'lists' in group_names and 'MX' not in group_names %}
+in tcp {{ postfix_instance.lists.port }}
+{% endif %}
{% if 'MSA' in group_names %}
in tcp 587 # SMTP-AUTH
{% endif %}
-{% if 'webmail' in group_names %}
+{% if 'webmail' in group_names or 'lists' in group_names %}
in tcp 80,443 # HTTP/HTTPS
{% if 'IMAP' not in group_names %}
out tcp 993 # IMAP
out tcp 4190
{% endif %}
{% endif %}
diff --git a/roles/common/templates/etc/postfix/tls_policy.j2 b/roles/common/templates/etc/postfix/tls_policy.j2
index d53b0a0..5ff7d26 100644
--- a/roles/common/templates/etc/postfix/tls_policy.j2
+++ b/roles/common/templates/etc/postfix/tls_policy.j2
@@ -1,25 +1,25 @@
# {{ ansible_managed }}
# /!\ WARNING: smtp_tls_fingerprint_digest MUST be sha256!
{% if 'out' not in group_names %}
[outgoing.fripost.org]:{{ postfix_instance.out.port }} fingerprint ciphers=high protocols=TLSv1.2
{% for h in groups.out | sort %}
match={{ lookup('pipe', 'openssl x509 -in certs/postfix/'+h+'.pem -noout -fingerprint -sha256 | cut -d= -f2') }}
{% endfor %}
{% endif %}
{% if 'MX' in group_names %}
{% if 'IMAP' not in group_names %}
[mda.fripost.org]:{{ postfix_instance.IMAP.port }} fingerprint ciphers=high protocols=TLSv1.2
{% for h in groups.IMAP | sort %}
match={{ lookup('pipe', 'openssl x509 -in certs/postfix/'+h+'.pem -noout -fingerprint -sha256 | cut -d= -f2') }}
{% endfor %}
{% endif %}
{% if 'lists' not in group_names %}
-[antilop.fripost.org]:{{ postfix_instance.lists.port }} fingerprint ciphers=high
+[lists.fripost.org]:{{ postfix_instance.lists.port }} fingerprint ciphers=high protocols=TLSv1.2
{% for h in groups.lists | sort %}
match={{ lookup('pipe', 'openssl x509 -in certs/postfix/'+h+'.pem -noout -fingerprint -sha256 | cut -d= -f2') }}
{% endfor %}
{% endif %}
{% endif %}