Change From addr regarding context

This commit is contained in:
nemunaire 2021-09-19 15:47:08 +02:00
parent 19e1111e6c
commit efa4cb6824

View File

@ -65,10 +65,10 @@ def respondmail(to, subject, ref, checks, initial_to=None):
if maxitem[0] < lvl: if maxitem[0] < lvl:
maxitem = item maxitem = item
if final_decision == "ACCEPT" or final_decision == "SKIP": if final_decision == "ACCEPT" or final_decision == "SKIP":
return respondmail(to, subject, ref, [(lvl, tests, final_decision)]) return respondmail(to, subject, ref, [(lvl, tests, final_decision)], initial_to)
# Display the most upper error # Display the most upper error
if not ALTERNATE_RESOLUTIONS: if not ALTERNATE_RESOLUTIONS:
return respondmail(to, subject, ref, [maxitem]) return respondmail(to, subject, ref, [maxitem], initial_to)
msg = EmailMessage() msg = EmailMessage()
msg["X-loop"] = "peret" msg["X-loop"] = "peret"
@ -116,6 +116,7 @@ running for nemunaire@nemunai.re""")
with smtplib.SMTP("localhost") as smtp: with smtplib.SMTP("localhost") as smtp:
smtp.starttls() smtp.starttls()
if not SEND_TO_REALUSER or REVIEW_BEFORE_SEND: if not SEND_TO_REALUSER or REVIEW_BEFORE_SEND:
print("peret-report@nemunai.re" if initial_to is None else initial_to + "-report@nemunai.re")
print(msg.as_string()) print(msg.as_string())
if REVIEW_BEFORE_SEND: if REVIEW_BEFORE_SEND:
import time import time
@ -262,4 +263,4 @@ if __name__ == '__main__':
BETA = args.beta BETA = args.beta
cnt, frm, subject, ref, to = readmail(sys.stdin.buffer) cnt, frm, subject, ref, to = readmail(sys.stdin.buffer)
respondmail(frm, subject, ref, [c for c in check_mail(cnt, submissions_dir=args.submissions, check_content=not args.sign, check_submission_hash=args.expected_submission_hash, skip_public_key=args.skip_public_key)], to) respondmail(frm, subject, ref, [c for c in check_mail(cnt, submissions_dir=args.submissions, check_content=not args.sign, check_submission_hash=args.expected_submission_hash, skip_public_key=args.skip_public_key)], initial_to=to)