I'm trying to configure Postfix on my server, but see the following error when trying to access the configuration module on Virtualmin:

Error while checking current Postfix configuration. Please manually fix Postfix  configuration.

postfix: fatal: chdir(/usr/libexec/postfix): No such file or directory
Manually edit the Postfix configuration file.

When I opt to manually edit the Postfix config file, it's empty.

I check the module configuration options and can't see anything out of place (although I don't know what I'm looking for).

After poking around my system, I can see there are main.cf and master.cf in the following locations:

/etc/postfix /usr/lib/postfix

Should there be two locations for those files?

The location mentioned in the error - /usr/libexec/postfix - doesn't exist. I assume it wants the /usr/lib/postfix location, so how do I tell Virtualmin or the system to look in that location instead?


To fix this problem,you must edit your postfix "main.cf" file and change:-

daemon_directory = /usr/libexec/postfix

to the following line:

daemon_directory = /usr/lib/postfix

Then restart postfix:

/etc/init.d/postfix restart

Now your problem should be solved.

| improve this answer | |
  • Thanks - I managed to reach that conclusion after I'd posted my question, but SE won't let me answer my own question. Good to see your answer validates what I did, though. Seems the two main.cf files are the original and a symbolic link. – James Sep 25 '12 at 15:40
  • In Debian postfix is installed in /usr/lib while in red hat it is installed in /usr/libexec,do you have debian? – achal tomar Sep 25 '12 at 17:33
  • Hi, yes (well, I'm running Ubuntu). Postfix seems to be configured by Virtualmin when it is installed, so I assume the issue is perhaps with how Virtualmin configures Postfix. Just 'one of those things', I assume! – James Sep 25 '12 at 21:17
  • Next time you configure postfix please see path of daemon_directory of postfix by running command:-postconf -d|grep daemon_directory. – achal tomar Sep 26 '12 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.