From 0e97f9e596427d40f05516b5cecf73a7c0a55d27 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Mon, 29 Nov 2021 21:24:18 +0100 Subject: [PATCH] mailserver eebug metadata --- bundles/mailserver/metadata.py | 1 + bundles/postfix/files/main.cf | 3 +++ bundles/postfix/items.py | 1 + 3 files changed, 5 insertions(+) diff --git a/bundles/mailserver/metadata.py b/bundles/mailserver/metadata.py index fc885f6..62ce35b 100644 --- a/bundles/mailserver/metadata.py +++ b/bundles/mailserver/metadata.py @@ -4,6 +4,7 @@ database_password = repo.vault.password_for(f'{node.name} db mailserver') defaults = { 'mailserver': { + 'debug': False, 'maildir': '/var/vmail', 'database': { 'host': '127.0.0.1', # dont use localhost diff --git a/bundles/postfix/files/main.cf b/bundles/postfix/files/main.cf index 3c0e190..3cbf086 100644 --- a/bundles/postfix/files/main.cf +++ b/bundles/postfix/files/main.cf @@ -37,6 +37,9 @@ smtpd_tls_auth_only = yes smtpd_tls_cert_file = /var/lib/dehydrated/certs/${hostname}/fullchain.pem smtpd_tls_key_file = /var/lib/dehydrated/certs/${hostname}/privkey.pem smtp_tls_security_level = may +% if debug: +smtpd_tls_loglevel = 3 +% endif smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1 smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1 diff --git a/bundles/postfix/items.py b/bundles/postfix/items.py index 9368956..3adef9f 100644 --- a/bundles/postfix/items.py +++ b/bundles/postfix/items.py @@ -17,6 +17,7 @@ files = { 'content_type': 'mako', 'context': { 'hostname': node.metadata.get('mailserver/hostname'), + 'debug': node.metadata.get('mailserver/debug') }, **file_options, },