parent
9d874c545a
commit
d26983f25a
|
@ -38,4 +38,5 @@ This is our current version trying to communicate between courier and mailman3.
|
|||
* OK, it's failing further along, so maybe this works?
|
||||
* 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?
|
||||
* That's not doing it... Might need to create users?
|
||||
* OK, let's see if what I need is in the headers...
|
|
@ -26,6 +26,7 @@ try:
|
|||
import os
|
||||
import sys
|
||||
import smtplib
|
||||
from email.parser import HeaderParser
|
||||
|
||||
logger.info('Starting Logging (inside try)')
|
||||
|
||||
|
@ -44,7 +45,10 @@ 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 = HeaderParser(),parsestr(header)
|
||||
pprint(dict(headers))
|
||||
|
||||
# See <https://qmail.notqmail.org/qmail-manual-html/man8/qmail-command.html>
|
||||
# for qmail command docs and supplied environment variables.
|
||||
|
@ -55,7 +59,7 @@ try:
|
|||
logger.info('EXT4: %s', os.environ['EXT2'])
|
||||
logger.info('EXT3: %s', os.environ['EXT3'])
|
||||
logger.info('EXT2: %s', os.environ['EXT4'])
|
||||
logger.info('DEFAULT: %s', os.enviorn['DEFAULT'])
|
||||
logger.info('DEFAULT: %s', os.environ['DEFAULT'])
|
||||
arg_ext_tmp = sys.argv[2] if len(sys.argv) > 2 else "1"
|
||||
arg_ext = arg_ext_tmp if arg_ext_tmp != "1" else ""
|
||||
lmtp.sendmail(
|
||||
|
|
Loading…
Reference in New Issue