From 67caf0c8cfc91bd6c15970e511313aad0ce0f7f3 Mon Sep 17 00:00:00 2001 From: ofthesun9 Date: Mon, 4 May 2020 15:41:53 +0000 Subject: [PATCH] Check /queue permissions before postfix start postfix and posdrop id might have changed after base image change --- core/postfix/start.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/postfix/start.py b/core/postfix/start.py index c32099bf..e8766175 100755 --- a/core/postfix/start.py +++ b/core/postfix/start.py @@ -64,4 +64,8 @@ if "RELAYUSER" in os.environ: # Run Podop and Postfix multiprocessing.Process(target=start_podop).start() os.system("/usr/libexec/postfix/post-install meta_directory=/etc/postfix create-missing") +# Before starting postfix, we need to check permissions on /queue +# in the event that postfix,postdrop id have changed +os.system("chown postfix -R /queue/{active,bounce,corrupt,defer,deferred,flush,hold,incoming,maildrop,pid,private,public,saved,trace}") +os.system("chown postdrop -R /queue/{maildrop,public}") os.system("postfix start-fg")