summaryrefslogtreecommitdiffstats
path: root/wallace
diff options
context:
space:
mode:
authorLiutauras Adomaitis <adomaitis@kolabsystems.com>2019-05-15 15:38:49 +0300
committerLiutauras Adomaitis <adomaitis@kolabsystems.com>2019-05-15 15:38:49 +0300
commit29113644952841b5ef13cef820ac8c3326189f13 (patch)
tree585186032c12e84fef391e3b49f3557747d1722b /wallace
parent8b48619c048200df24ee51feb29b555b0336e146 (diff)
downloadpykolab-29113644952841b5ef13cef820ac8c3326189f13.tar.gz
More debug logging which should be useful to track message transportation in wallace
Diffstat (limited to 'wallace')
-rw-r--r--wallace/modules.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/wallace/modules.py b/wallace/modules.py
index 966a3b9..b4645a8 100644
--- a/wallace/modules.py
+++ b/wallace/modules.py
@@ -332,13 +332,17 @@ def cb_action_ACCEPT(module, filepath):
# parse message headers
message = Parser().parse(open(filepath, 'r'), True)
+ messageid = message['message-id'] if 'message-id' in message else None
sender = [formataddr(x) for x in getaddresses(message.get_all('X-Kolab-From', []))]
recipients = [formataddr(x) for x in getaddresses(message.get_all('X-Kolab-To', []))]
- log.debug(_("recipients: %r") % (recipients))
+ log.debug(
+ _("Message-ID: %s, sender: %r, recipients: %r") % (messageid, sender, recipients), level=6
+ )
# delete X-Kolab-* headers
del message['X-Kolab-From']
del message['X-Kolab-To']
+ log.debug(_("Removed X-Kolab- headers"), level=8)
result = _sendmail(
sender,