From bad81f79a739705228920f0dd51c9a24e8ae606b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 30 Apr 2023 17:15:23 +0200 Subject: [PATCH] Set the maildir rights to 0777 --- tests/start_test.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/start_test.py b/tests/start_test.py index 30ce2ec..0c0068b 100755 --- a/tests/start_test.py +++ b/tests/start_test.py @@ -181,10 +181,27 @@ def start_tests(test_dir, maildir, smtp_port): print(f"{nb_failed} {msg} failed the DKIM signature test") +def get_maildir(): + maildir = tempfile.TemporaryDirectory(prefix="Maildir_") + flags = ( + stat.S_IRUSR + | stat.S_IWUSR + | stat.S_IXUSR + | stat.S_IRGRP + | stat.S_IWGRP + | stat.S_IXGRP + | stat.S_IROTH + | stat.S_IWOTH + | stat.S_IXOTH + ) + os.chmod(maildir.name, flags) + return maildir + + def main(): test_dir = pathlib.Path(__file__).parent.resolve() os.chdir(test_dir.parent) - maildir = tempfile.TemporaryDirectory(prefix="Maildir_") + maildir = get_maildir() start_tests(test_dir, maildir, DEFAULT_PORT)