Improvements to smtpdummy

This commit is contained in:
Geoffrey Frogeye 2021-12-02 10:53:32 +01:00
parent d065fa6207
commit 9c82a364ed

View file

@ -88,7 +88,7 @@ XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X"""
body = f"\n\n{args.body}"
text = f"""Date: {now_email}
From: {getattr(args, 'from')}
From: {args.me} <{getattr(args, 'from')}>
Subject: {args.subject}
To: {args.to}
Message-ID: {mid}
@ -108,7 +108,9 @@ Input arguments:
."""
# Transmission setup
cmd = ["ssh", args.origin]
cmd = []
if args.origin != "localhost":
cmd += ["ssh", args.origin]
if args.security == "plain":
cmd += ["socat", "-", f"tcp:{args.destination}:{args.port}"]
elif args.security == "ssl":