Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 200882 - mail-mta/postfix-2.4.5 ignores maildir configuration directive mail_spool_directory = /var/spool/mail/ unless final line of main.cf
Summary: mail-mta/postfix-2.4.5 ignores maildir configuration directive mail_spool_dir...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-30 22:21 UTC by Michele Alzetta
Modified: 2008-03-21 17:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Alzetta 2007-11-30 22:21:20 UTC
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.
Comment 1 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2008-03-21 17:11:11 UTC
(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