From a7101be284c86d6b0f80e36c0d1c561dd127a120 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 31 Jul 2024 01:11:29 +0200 Subject: [PATCH] introduce imap_rawlog option for debugging --- CHANGELOG.md | 5 +++++ chatmaild/src/chatmaild/config.py | 1 + chatmaild/src/chatmaild/ini/chatmail.ini.f | 11 ++++++++++ cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 | 21 +++++++++++++++++++ 4 files changed, 38 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 591b0d53..b3af0bec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## untagged +- add optional "imap_rawlog" config option. If true, + .in/.out files are created in user home dirs + containing the imap protocol messages. + ([#389](https://github.com/deltachat/chatmail/pull/389)) + ## 1.4.0 2024-07-28 - Add `disable_ipv6` config option to chatmail.ini. diff --git a/chatmaild/src/chatmaild/config.py b/chatmaild/src/chatmaild/config.py index fcdc61ad..f8109520 100644 --- a/chatmaild/src/chatmaild/config.py +++ b/chatmaild/src/chatmaild/config.py @@ -31,6 +31,7 @@ class Config: self.filtermail_smtp_port = int(params["filtermail_smtp_port"]) self.postfix_reinject_port = int(params["postfix_reinject_port"]) self.disable_ipv6 = params.get("disable_ipv6", "false").lower() == "true" + self.imap_rawlog = params.get("imap_rawlog", "false").lower() == "true" self.iroh_relay = params.get("iroh_relay") self.privacy_postal = params.get("privacy_postal") self.privacy_mail = params.get("privacy_mail") diff --git a/chatmaild/src/chatmaild/ini/chatmail.ini.f b/chatmaild/src/chatmaild/ini/chatmail.ini.f index b76cb478..03d844bc 100644 --- a/chatmaild/src/chatmaild/ini/chatmail.ini.f +++ b/chatmaild/src/chatmaild/ini/chatmail.ini.f @@ -54,6 +54,17 @@ postfix_reinject_port = 10025 # if set to "True" IPv6 is disabled disable_ipv6 = False +# +# Debugging options +# + +# set to True if you want to track imap protocol execution +# in per-maildir ".in/.out" files. +# Note that you need to manually cleanup these files +# so use this option with caution on production servers. +imap_rawlog = false + + # # Privacy Policy # diff --git a/cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 b/cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 index be7c23fb..c3ec5c2a 100644 --- a/cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 +++ b/cmdeploy/src/cmdeploy/dovecot/dovecot.conf.j2 @@ -203,3 +203,24 @@ ssl_key =