I got a call earlier today that some scripts are not sending mail to the users on my intranet. After doing some automated tests (yeah, I got that far last time I was writing a web-app!), I realized there was no problems with my code. Next was the mail server. I run postfix, over Mandriva, so I wasn’t expecting problems. However, I had a few!
mailq showed about 30 messages held.
postqueue -f didn’t clear any of the messages.
tail -f /var/log/mail/errors showed plenty of
fatal: unknown service: smtp/tcp
Visiting the postfix FAQ was next:
Your Postfix /etc/postfix/master.cf file specifies that the Postfix SMTP client runs inside a chroot environment. However, the files necessary for that mode of operation are not installed below /var/spool/postfix.
True enough, the /var/spool/postfix/etc was gone all together!
This is an internal server, and I’m still looking for the culprit. But for the fix:
it will print out a few lines saying it’s disabling chroot. Again:
And the needed files for setting the chroot environment for postfix are in place.
Mandriva is still one of my favorite distros, no matter what you say.