I recently ran into issues with Postfix not being able to create files in the mail queue because of a permissions problem. Postfix was installed via pkg so it’s a bit perplexing that the permissions were not set as part of the install process. This was inside a jail, but I don’t see how that should make a difference. Here’s the error I was seeing in /var/log/maillog:
Oct 2 15:36:25 monitor postfix/postdrop[20795]: warning: mail_queue_enter: create file maildrop/615300.20795: Permission denied Oct 2 15:36:29 monitor postfix/postdrop[20823]: warning: mail_queue_enter: create file maildrop/695303.20823: Permission denied
Here’s how I fixed it:
/usr/sbin/service postfix stop /usr/bin/killall -9 postdrop /usr/bin/chgrp -R maildrop /var/spool/postfix/public /usr/bin/chgrp -R maildrop /var/spool/postfix/maildrop/ /usr/local/sbin/postfix set-permissions /usr/local/sbin/postfix check /usr/sbin/service postfix start