3 # Written by Thomas Schneider <qsuscs@qsuscs.de>
4 # This script is placed in public domain. If this is not applicable, consider
5 # it licensed under the CC-0:
6 # <https://creativecommons.org/publicdomain/zero/1.0/>
13 lmtp = smtplib.LMTP("localhost", int(sys.argv[1]))
18 os.environ['EXT' + sys.argv[2]] + "@" + os.environ['HOST'],
19 sys.stdin.buffer.read()
21 except smtplib.SMTPResponseException as e:
22 if 400 <= e.smtp_code < 500:
24 # otherwise, it's either a 5xx aka permanent error or something else
25 # is already b0rked, thus raise -> exit(100) -> have qmail return a