From 7c8a5a377bf2962baa6efac9a82c549b5cf8725d Mon Sep 17 00:00:00 2001 From: s3lph Date: Wed, 12 Jan 2022 03:54:27 +0100 Subject: [PATCH] client.py: Add confirmation prompt before connecting to autoconfigured hosts --- client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client.py b/client.py index 0d3770f..d416b6f 100755 --- a/client.py +++ b/client.py @@ -603,6 +603,10 @@ def main(): if outgoing_server is None: raise RuntimeError('No working SMTP server found through autoconfiguration. Please specify manually.') print(f'Autoconfigured outgoing server: {outgoing_server}') + confirm = input('Please confirm: [Y/n] ') + if confirm.lower() not in ['', 'y', 'yes']: + print('Aborted') + exit(1) with incoming_server: now = datetime.utcnow() done = False