[plug] cron.daily problem

Leon Brooks leon at brooks.fdns.net
Mon Jul 22 22:58:54 WST 2002


On Mon, 22 Jul 2002 20:55, Robert Andrews wrote:
> Hi all I have a problem that I need some help with
> Cron Daemon sends me a email with the following
>
> /etc/cron.daily/postfix: /postfix: No such file or directory
> exec: /postfix: cannot execute: No such file or directory

> #!/bin/sh
> exec `/bin/sed -n '/command_directory/s/^.*= //p'
> /etc/postfix/main.cf`/postfix check

in the file /etc/postfix/main.cf, look for a line starting with 
`command_directory' and make sure it points to postfix's bits and pieces, 
like postqueue and postkick. Try `which postkick' and see what it says; if 
(as on my Mandrake box) it says `/usr/sbin/postkick' then the line should 
read:

    command_directory = /usr/sbin

PostFix utilities can be taken out of the path, this directive tells the main 
postfix process where to find them, and the cron chunk expects it to be set 
(but should check and default if not). It would also break if the main.cf 
line lacked a space after the `=' - which is perfectly legal PostFix 
configuration useage.

It's careless programming, because it would work fine with the space left in, 
and not everyone would follow the `=' with a space either (some with nothing, 
others with maybe a tab or maybe backslash and continue on the next line). 
WHat it's _trying_ to do is avoid trojan attacks by running postfix with an 
explicit leading path.

Cheers; Leon



More information about the plug mailing list