View Single Post
  #3  
Old 12th December 2011, 15:11
dgmufasa dgmufasa is offline
Member
 
Join Date: Oct 2011
Posts: 86
Thanks: 5
Thanked 1 Time in 1 Post
Default One last question ..

Quote:
Originally Posted by falko View Post
http://www.postfix.org/FILTER_README.html

You can use a simple shell script and call your PHP script from it as follows:

Code:
/usr/bin/php /path/to/your/script
(This assumes the PHP is located in /usr/bin/php - please adjsut this if necessary.)
Below is the ISPConfig API call to create a filter for the mailbox. I need to use this in the program being written.

Quote:
try {
if($session_id = $client->login($username,$password)) {
echo 'Logged successfull. Session ID:'.$session_id.'<br />';
}

//* Set the function parameters.
$client_id = 1;
$params = array(
'server_id' => 1,
'type' => 'header',
'pattern' => 'hmmnoe@test.int',
'data' => 'data',
'action' => 'DISCARD',
'active' => 'y'
);

$filter_id = $client->mail_filter_add($session_id, $client_id, $params);
How can I fix this so that it calls the PHP script that you mention?
Reply With Quote