Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

postfix: fatal: chdir(/Library/Server/Mail/Data/spool): No such file or directory

I just upgraded to ML from Lion and my postfix stopped working with the following error:


postfix: fatal: chdir(/Library/Server/Mail/Data/spool): No such file or directory


Has anyone seen this error? This was working fine until the upgrade.

MacBook Pro, OS X Mountain Lion, 2.66 GHz Intel Core i7 8GB 1067 MHz

Posted on Jul 25, 2012 12:59 PM

Reply
Question marked as Best reply

Posted on Jul 25, 2012 1:04 PM

Well, I thought what the heck so just created the directory as root:


# mkdir -p /Library/Server/Mail/Data/spool


Then tried to start up:


# /usr/sbin/postfix start

postfix/postfix-script: warning: group or other writable: /Library/Server/Mail/Data/mta

postfix/postfix-script: starting the Postfix mail system


So, I am assuming it is ok...

8 replies
Question marked as Best reply

Jul 25, 2012 1:04 PM in response to gnuphie

Well, I thought what the heck so just created the directory as root:


# mkdir -p /Library/Server/Mail/Data/spool


Then tried to start up:


# /usr/sbin/postfix start

postfix/postfix-script: warning: group or other writable: /Library/Server/Mail/Data/mta

postfix/postfix-script: starting the Postfix mail system


So, I am assuming it is ok...

Jul 26, 2012 12:08 PM in response to eberkers

It may be a permissions issue at that point. Running the following command:


ls -l /Library/Server/Mail/Data/spool


gives me:


drwx------ 2 _postfix wheel 68 Jul 25 14:01 active

drwx------ 2 _postfix wheel 68 Jul 25 14:01 bounce

drwx------ 2 _postfix wheel 68 Jul 25 14:01 corrupt

drwx------ 2 _postfix wheel 68 Jul 25 14:01 defer

drwx------ 2 _postfix wheel 68 Jul 25 14:01 deferred

drwx------ 2 _postfix wheel 68 Jul 25 14:01 flush

drwx------ 2 _postfix wheel 68 Jul 25 14:01 hold

drwx------ 2 _postfix wheel 68 Jul 25 14:01 incoming

drwx-wx--- 2 _postfix _postdrop 68 Jul 25 14:01 maildrop

drwxr-xr-x 3 root wheel 102 Jul 25 14:01 pid

drwx------ 26 _postfix wheel 884 Jul 26 07:30 private

drwx--x--- 7 _postfix _postdrop 238 Jul 26 07:30 public

drwx------ 2 _postfix wheel 68 Jul 25 14:01 saved

drwx------ 2 _postfix wheel 68 Jul 25 14:01 trace


and:


ls -l /Library/Server/Mail/Data


gives me:


drwxrwx--- 3 _postfix wheel 102 Jul 25 14:01 mta

drwxr-xr-x 16 root wheel 544 Jul 25 14:01 spool


So, you may want to check ownership, in particular "_postfix", on the directory and files (other than those marked with "root" as owner). Also, notice my warning message "warning: group or other writable: /Library/Server/Mail/Data/mta", which I am not sure is too significant other than a potential security pothole. I guess I could fix the permission on that also :/


Message was edited by: gnuphie

Jul 26, 2012 12:12 PM in response to gnuphie

Thank you for your time and answer, it looks identical here.


I tried a "sudo postfix set-permissions", but to no effect.


What I fixed though was permissions related to Dovecot. The auth-userdb socket had root permissions while the deamon runs as _dovecot. This at least allows me to read mail again, not only the sending needs to be fixed


Strange that the config worked under Lion ...



/Erwin

Jul 26, 2012 12:22 PM in response to eberkers

Now, the sending worked too. Probably needed to just retry. This means the only change I did after upgrade from Lion to Mountain Lion was the dovecot config.


The other error in the log was

lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied


the long list of postfix: fatal: chdir(/Library/Server/Mail/Data/spool): No such file or directory was just a smoke screen.

Aug 6, 2012 2:12 PM in response to filippo1982

After upgrading to Mountain Lion, my /etc/postfix directory had a few ~orig files. I saved the Lion main.cf as main.cf.orig. Comparing that to the new main.cf~orig, it looks like Apple changed the queue and data directories:


$ diff main.cf.orig main.cf~orig 31c31 < queue_directory = /Library/Server/Mail/Data/spool --- > queue_directory = /private/var/spool/postfix 48c48 < data_directory = /Library/Server/Mail/Data/mta --- > data_directory = /var/lib/postfix 667c667 < imap_submit_cred_file = /etc/postfix/submit.cred --- > imap_submit_cred_file = 676a677,679 > # (APPLE) Reject messages having any MIME body part (attachment, etc.) > # larger than this number of bytes. 0, the default, means no limit. > # mime_max_body_size = 0


The diff of main.cf.default with the ~orig version is identical.


After the upgrade I also have aliases~orig, master.cf~orig, and postfix-files~orig.


I didn't customize main.cf, so I overwrote it with main.cf~orig and was able to start postfix without errors.

Sep 11, 2012 12:00 PM in response to filippo1982

Well, this works for me.


I think its a bug in ML, afer upgrade postfix stop working.

filippo1982 wrote:


I tried this commands:


sudo mkdir -p /Library/Server/Mail/Data/spool
sudo
/usr/sbin/postfix set-permissions
sudo
/usr/sbin/postfix reload

sudo reboot


After that you can try:


echo "test" | mail -s "text object email" address@domain.com

It works fine!

Mountain Lion bug? I think so, maybe the next version will be fixed! 🙂


postfix: fatal: chdir(/Library/Server/Mail/Data/spool): No such file or directory

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.