View Single Post
  #4  
Old 17th January 2012, 14:27
tio289 tio289 is offline
Member
 
Join Date: Mar 2009
Posts: 70
Thanks: 2
Thanked 14 Times in 9 Posts
Default

yes. I try to make sh script like /usr/local/ispconfig/server.sh, but w/o success.

Code:
s2:/etc/postfix# ls -la
total 120
drwxr-xr-x  2 root root  4096 Jan 16 08:43 .
drwxr-xr-x 93 root root  4096 Jan 16 08:44 ..
-rw-r--r--  1 root root   319 Jan 15 19:00 dynamicmaps.cf
-rw-r--r--  1 root root   804 Jan 15 13:15 main.cf
-rwxr-x---  1 root root   970 Jan 16 08:45 map_relay.php
-rwxr-x---  1 root root   236 Jan 16 08:44 map_relay.sh
-rw-r--r--  1 root root  5302 Jan 15 11:31 master.cf
-rw-r--r--  1 root root     0 Jan  9 14:48 mime_header_checks
-rw-r--r--  1 root root     0 Jan  9 14:48 nested_header_checks
-rw-r--r--  1 root root 18992 May  4  2011 postfix-files
-rwxr-xr-x  1 root root  8729 May  4  2011 postfix-script
-rwxr-xr-x  1 root root 24256 May  4  2011 post-install
-rw-r--r--  1 root root   708 Jan 16 16:02 relay_domains
-rw-r--r--  1 root root 12288 Jan 17 14:00 relay_domains.db
-rw-r--r--  1 root root  1573 Jan 16 16:02 relay_recipients
-rw-r--r--  1 root root 12288 Jan 17 14:00 relay_recipients.db
Code:
s2:/etc/postfix# cat map_relay.sh

#!/bin/sh

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin

. /etc/profile

/usr/bin/php -q /etc/postfix/map_relay.php
postmap hash:/etc/postfix/relay_domains
postmap hash:/etc/postfix/relay_recipients
I fixed problem by adding absolute path to maps in PHP script


To Moderators: Can I edit first post please?
__________________
Independent Senior Webdeveloper

Last edited by tio289; 18th January 2012 at 16:55.
Reply With Quote