From c3f96425d9e0c6af37e414515317b5f082e8cdce Mon Sep 17 00:00:00 2001 From: Jigme Datse Yli-Rasku Date: Thu, 30 May 2024 01:17:01 -0700 Subject: [PATCH] Fix formatting? This might help, I hope so... --- docs/courier-to-mailman3.md | 5 ++++- source/courier-to-mailman3.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/courier-to-mailman3.md b/docs/courier-to-mailman3.md index 6fa08fb..76e11df 100644 --- a/docs/courier-to-mailman3.md +++ b/docs/courier-to-mailman3.md @@ -41,4 +41,7 @@ This is our current version trying to communicate between courier and mailman3. * That's not doing it... Might need to create users? * 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 +* It's not finding it. +* Oh man `To` vs `'To'` +* Progress... But getting, "line too long" this seems like I need the + replace that I had before. \ No newline at end of file diff --git a/source/courier-to-mailman3.py b/source/courier-to-mailman3.py index 1bbb3c7..d7e61ae 100644 --- a/source/courier-to-mailman3.py +++ b/source/courier-to-mailman3.py @@ -46,7 +46,7 @@ try: # "Line too long (see RFC5321 4.5.3.1.6)" # https://gitlab.com/mailman/mailman/-/issues/1133 content = sys.stdin.buffer.read() - #content = content.replace(b'\r\n', b'\n').replace(b'\r', b'\n').replace(b'\n', b'\r\n') + content = content.replace(b'\r\n', b'\n').replace(b'\r', b'\n').replace(b'\n', b'\r\n') header = content.strip() headers = dict(HeaderParser().parsestr(header.decode('utf-8'))) header_to = headers['To']