1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-01-26 03:52:50 +02:00

Check /queue permissions before postfix start

postfix and posdrop id might have changed after base image change
This commit is contained in:
ofthesun9 2020-05-04 15:41:53 +00:00
parent 5648669c61
commit 67caf0c8cf

View File

@ -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")