Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-16-2008, 11:45 AM
Senior Member
 
Posts: 65
Red face Forwarding to a mail pipe

I am trying to set up a Help Desk system called osTicket.

The system wants me to set up a forwarding account in the mta.
(in Zimbra's case this is postfix) but I am trying to do it in the zimbra interface.

1. I tried to do this as a forward from the Zimbra interface
2. I also tried to do this as a Distribution list with my email as one of the members and a "mail pipe" as the other.

This is the "address" i'm supposed to set the forward to:
|/usr/bin/php -q /opt/automail.php

1. The forwarding tab (correctly) comes up with "Value did not match valid values", and wouldn't let me add the pipe.

2.When I add it to the distro list it shows on the list of names to add, but when I click save, an alert comes up (correctly) saying:
Server error encountered
Message: invalid request: must be vailid member email address: |/usr/bin/php -q /opt/automail.php
Error code: service:INVALID_REQUEST
Method: ZmCsfeCommand.invoke
Details:soap:Sender

Is there anyway I CAN set this up?

FYI: I have copied automail.php to the opt folder and given it 764 permissions to test it. So once it is set right it should run.

Here is the content of automail.php (so you can see WHAT its trying to do):
PHP Code:
<?php
/*********************************************************************
    automail.php

    PHP script used for remote email piping...same as as the perl version.

    Peter Rotich <peter@osticket.com>
    Copyright (c)  2006,2007,2008 osTicket
    http://www.osticket.com

    Released under the GNU General Public License WITHOUT ANY WARRANTY.
    See LICENSE.TXT for details.

    vim: expandtab sw=4 ts=4 sts=4:
    $Id: $
**********************************************************************/
#pre-checks
function_exists('file_get_contents') or die('upgrade php >=4.3');
set_time_limit(20);

#Configuration: Enter the url and key. That is it.
#  url=> URL to pipe.php e.g http://yourdomain.com/support/api/pipe.php
#  key=> API's pass phrase
$config=array('url'=>'http://www.domain.com/support/api/pipe.php',
                   
'key'=>'pass phrase here');

#read stdin 
$data=file_get_contents('php://stdin');
if(empty(
$data)) die('Error reading stdin. No message');

#curl post
$ch curl_init();        
curl_setopt($chCURLOPT_URL,$config['url']);        
curl_setopt($chCURLOPT_POST,1);        
curl_setopt($chCURLOPT_POSTFIELDS,$data);
curl_setopt($chCURLOPT_USERAGENT,md5($config['key']));
curl_setopt($chCURLOPT_HEADERTRUE);
curl_setopt($chCURLOPT_FOLLOWLOCATIONFALSE);
curl_setopt($chCURLOPT_RETURNTRANSFERTRUE); 
$result=curl_exec($ch);        
curl_close($ch);
$code=0;
if(
preg_match('/HTTP\/.* ([0-9]+) .*/'$result$status))
    
$code=$status[1];
//Depending on your MTA add the exit codes.
//echo $code;
?>

Last edited by gfdos.sys; 01-16-2008 at 12:02 PM..
Reply With Quote
  #2 (permalink)  
Old 01-17-2008, 08:25 AM
Senior Member
 
Posts: 65
Question help anybody?

would this work:

where bar@example.com is the mail that is comming in that needs to be forwarded to the other system:

Code:
$ zmprov ma bar@example.com zimbraMailTransport |/usr/bin/php -q /opt/automail.php
I got that from here:
Split Domain - Zimbra :: Wiki
Reply With Quote
  #3 (permalink)  
Old 01-03-2009, 02:11 PM
Starter Member
 
Posts: 1
Default Any Luck!?

Did you have any luck with getting this working? I am currently trying to do the same thing and it isn't working.
Reply With Quote
  #4 (permalink)  
Old 01-05-2009, 06:24 AM
Senior Member
 
Posts: 65
Red face Awaiting help from the Zimbra Team

no, unfortunately I havent been able to fix this.
I was actually REALLY excited when I got the email saying there was a reply to this request... hoping for help getting it to work.

Here's hoping that since there is two of us trying to get this to work, we can get a responce from the programing team!!! Please?
Reply With Quote
  #5 (permalink)  
Old 01-05-2009, 06:31 AM
Moderator
 
Posts: 7,928
Default

This maybe of help to you Wiki :: Postfix to work with piped scripts
__________________
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.