Logging environment variables

This commit is contained in:
Jigme Datse Yli-Rasku 2024-05-30 00:25:10 -07:00
parent 52560c3621
commit 9d874c545a
2 changed files with 8 additions and 1 deletions

View File

@ -37,4 +37,5 @@ This is our current version trying to communicate between courier and mailman3.
* Oh man... Variable not properly defined (or more derferenced.)
* 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.
* The parsing of the environment variables is failing, but let's try this.
* That's not doing it... Might need to create users?

View File

@ -50,6 +50,12 @@ try:
# for qmail command docs and supplied environment variables.
# We need to replace "1" with an empty string, as qmail only supports EXT,
# EXT2, EXT3, EXT4.
logger.info('User: %s', os.environ['USER'])
logger.info('EXT: %s', os.environ['EXT'])
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'])
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(