From f8d7bd68b238f08d3fa924b138e208a968bf8867 Mon Sep 17 00:00:00 2001 From: Jigme Datse Yli-Rasku Date: Thu, 30 May 2024 01:07:44 -0700 Subject: [PATCH] Does this work? Maybe? --- docs/courier-to-mailman3.md | 4 +++- source/courier-to-mailman3.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/courier-to-mailman3.md b/docs/courier-to-mailman3.md index 5971248..6fa08fb 100644 --- a/docs/courier-to-mailman3.md +++ b/docs/courier-to-mailman3.md @@ -39,4 +39,6 @@ This is our current version trying to communicate between courier and mailman3. * I see... * The parsing of the environment variables is failing, but let's try this. * That's not doing it... Might need to create users? -* OK, let's see if what I need is in the headers... \ No newline at end of file +* OK, let's see if what I need is in the headers... +* Using the "To" header... Let's see if that gets us anywhere. +* It's not finding it. \ No newline at end of file diff --git a/source/courier-to-mailman3.py b/source/courier-to-mailman3.py index 55d6ea2..d8357e5 100644 --- a/source/courier-to-mailman3.py +++ b/source/courier-to-mailman3.py @@ -47,7 +47,7 @@ try: content = sys.stdin.buffer.read() #content = content.replace(b'\r\n', b'\n').replace(b'\r', b'\n').replace(b'\n', b'\r\n') header = content.strip() - headers = HeaderParser().parsestr(header.decode('utf-8')) + headers = dict(HeaderParser().parsestr(header.decode('utf-8'))) header_to = headers[To] # See