postfix: fatal: chdir(/usr/libexec/postfix): No such file or directory

Hi everybody,

here is my problem when I run postfix check:

Code:
postfix: fatal: chdir(/usr/libexec/postfix): No such file or directory

From where can it come?

Thank you for the answers you can give me.

Blodia
 
Well, postfix is installed in /usr/local, by default. If you are transferring your config files from some kind of linux distro, check your paths.
 
Ups,

it seems your main.cf has a wrong parameter of daemon_directory or is missing.
(ether in file /usr/local/libexec/postfix/main.cf or /usr/local/etc/postfix/main.cf)

what is the output of
Code:
postconf -n daemon_directory
postconf -d daemon_directory

if the output from
Code:
postconf -n config_directory
postconf -d config_directory

try the following command and then try to restart postfix
Code:
postconf -e "daemon_directory=/usr/local/libexec/postfix"
 
Hi,

when i do:

Code:
postconf -n config_directory -> output -> config_directory = /usr/local/etc/postfix

postconf -d config_directory -> outpout -> config_directory = /usr/local/etc/postfix

i restart and i do a postfix check:

Code:
/usr/local/libexec/postfix/postfix-script: /usr/sbin/postconf: not found
/usr/local/libexec/postfix/postfix-script: /usr/sbin/postlog: not found

You have an idea?

Thanks a lot.
 
The parameter command_directory is missing or pointing to a wrong directory.

If you have postfix-2.5.x installed make sure the following line exist in
/usr/local/etc/postfix/main.cf
/usr/local/libexec/postfix/main.cf
Code:
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
mailq_path = /usr/local/bin/mailq
newaliases_path = /usr/local/bin/newaliases
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail

how did you install postfix? (ports, package, source)
this will help to find why you have wrong/missing parameters
 
I install postfix with ports, like this:

Code:
cd /usr/ports/mail/postfix
make install clean

And that's all.

Now when i do a 'postfix check', i recieve this message:

Code:
/usr/local/libexec/postfix/postfix-script: /usr/sbin/postconf: not found
/usr/local/libexec/postfix/postfix-script: /usr/sbin/postlog: not found

You have an idea? Thanks for the help.
 
What is the output of [cmd=]grep command_directory /usr/local/etc/postfix/main.cf[/cmd]? You should not have /usr/sbin there (and I'm assuming it should be /usr/local/sbin -- what is the output of [cmd=]which postconf[/cmd]? -> use that path).

If you copied your Postfix configuration from a Linux installation: better don't do that. Start with the port's default config files and adjust those to your situation.
 
Hi,

1. "What is the output of grep command_directory /usr/local/etc/postfix/main.cf?" -> Nothing

2. "what is the output of which postconf?" -> /usr/local/sbin/postconf

Thanks

3. "If you copied your Postfix configuration from a Linux installation: better don't do that. Start with the port's default config files and adjust those to your situation." -> I do the install with ports in a new installation FreeBSD.
 
Code:
# ls -l /usr/local/etc/postfix/main.cf*  ->

-rw-r--r--  1 root  wheel   4369 Jan 11 17:00 /usr/local/etc/postfix/main.cf
-rw-r--r--  1 root  wheel  26026 Dec 18 16:30 /usr/local/etc/postfix/main.cf.0
-rw-r--r--  1 root  wheel   4285 Dec 22 17:45 /usr/local/etc/postfix/main.cf.20091222
-rw-r--r--  1 root  wheel  23285 Dec 18 16:58 /usr/local/etc/postfix/main.cf.default
 
[cmd=]grep command_directory /usr/local/etc/postfix/main.cf.default[/cmd] ?
 
Code:
vi /usr/local/etc/postfix/main.cf
(add line) command_directory = /usr/local/sbin
(save)
(restart postfix)
(retry commands)
 
I think he misses the sign '=' in your order.

I made the command 'postfix reload' and here's what he gets out of control:

-> postfix / postfix-script: refreshing the Postfix mail system

And if I do the command 'postfix check', nothing appears in the output.

Thank you for your help.
 
Back
Top