My mail spool directory is maildir, and is situated at /var/spool/mail/ I have recently discovered that if the directive in /etc/postfix/main.cf is set at: mail_spool_directory = /var/spool/mail/ in the text of the main.cf file where the example is actually to be found, the directive is ignored and delivery is not possible. Viceversa, if the directive is left as the last line of the file, everything works correctly. Reproducible: Always Steps to Reproduce: 1. install postfix 2.4.5 2. create maildir directory tree in /var/spool/mail with correct permissions 3. uncomment the line #mail_spool_directory in the text of main.cf, setting the value to /var/spool/mail/ for maildir style delivery 4. delete any mail_spool_directory directive at the end of the same file 5. start postfix Actual Results: Postfix doesn't perform maildir style delivery to the desired directory. Error message in log: "cannot update mailbox /var/spool/mail/foo for user foo. Cannot open file: Is a directory". Expected Results: Deliver mail to the desired maildir directories The problem is fixed my adding the directive: mail_spool_directory = /var/spool/mail/ as the very last line of file main.cf This behaviour might not be specific to 2.4.5 version. It might even be expected behaviour, as some script does add mail_spool_directory to the end of main.cf once one emerges; in this case the bug is that the file main.cf should not have the #mail_spool_directory example line in the middle, as this leads to confusion.
(In reply to comment #0) > > The problem is fixed my adding the directive: > mail_spool_directory = /var/spool/mail/ > as the very last line of file main.cf > That sounds totally unexpected. Nothing in the Postfix documentation mentions a different behaviour if the line in the last one of main.cf. If this is still actual, Please paste your main.cf file, and the result of "postconf", in your non-working configuration (i.e. with mail_spool_directory not at the very last line of main.cf). But i think i'm rather sure it's not a postfix bug nor a gentoo ebuild bug. [falco:/etc/postfix.dist]# tail main.cf # sample_directory = /etc/postfix # readme_directory: The location of the Postfix README files. # mail_spool_directory = /var/spool/mail/foobar #foobar readme_directory = /usr/share/doc/postfix-2.5.1/readme [falco:/etc/postfix.dist]# postconf -c /etc/postfix.dist mail_spool_directory mail_spool_directory = /var/spool/mail/foobar