From d0e38a8f2c960753eae556ae2de69761bb9e0831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 30 Apr 2023 17:25:53 +0200 Subject: [PATCH] Set the Maildir mode to 777 --- tests/start_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/start_test.py b/tests/start_test.py index 0c0068b..379c6df 100755 --- a/tests/start_test.py +++ b/tests/start_test.py @@ -132,6 +132,10 @@ def kill_opensmtpd(pid): subprocess.Popen([shutil.which("sudo"), shutil.which("kill"), f"{pid}"]) +def fix_perms(path): + subprocess.Popen([shutil.which("sudo"), shutil.which("chmod"), "-R", "777", path]) + + def start_tests(test_dir, maildir, smtp_port): # Sending emails to OpenSMTPD f, d, filter_cmd = get_cmd_filter_dkimout( @@ -162,6 +166,7 @@ def start_tests(test_dir, maildir, smtp_port): # Testing DKIM signatures nb_dkim_ok = 0 nb_dkim_total = 0 + fix_perms(f"{maildir.name}/Maildir") maildir_glob = f"{maildir.name}/Maildir/new/*" nb_sleep = 0 while len(glob.glob(maildir_glob)) < nb_total: