zhong ming wu: > Hello > > When moving postfix to docker, I run into the issue that when the > containers go away postfix queued mail will get lost unless I made an > effort to persist on the host. > > A naive attempt to simply map an empty folder on the host as > `/var/spool/postifx` on the container does not work, because postfix > expects some empty folders there.
The top-level queue directory must be owned by root, mode 755, and must exist before Postfix can run. The subdirectories are created with the command 'postfix check' or 'postfix start'. These also set correct ownership and permissions. # mkdir /var/spool/postfix # postfix check # ls /var/spool/postfix active defer hold pid saved bounce deferred incoming private trace corrupt flush maildrop public > Will that be ok if all subfolders are owned by say root inside the > container? No. See above for postfix commands and access permissions. Wietse