Results 1 to 5 of 5

Thread: Forwarding to a mail pipe

  1. #1
    gfdos.sys is offline Senior Member
    Join Date
    Sep 2005
    Location
    Buffalo, NY
    Posts
    65
    Rep Power
    9

    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 01:02 PM.

  2. #2
    gfdos.sys is offline Senior Member
    Join Date
    Sep 2005
    Location
    Buffalo, NY
    Posts
    65
    Rep Power
    9

    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

  3. #3
    doughold is offline Starter Member
    Join Date
    Dec 2008
    Posts
    1
    Rep Power
    6

    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.

  4. #4
    gfdos.sys is offline Senior Member
    Join Date
    Sep 2005
    Location
    Buffalo, NY
    Posts
    65
    Rep Power
    9

    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?

  5. #5
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    This maybe of help to you Wiki :: Postfix to work with piped scripts

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problems with port 25
    By yogiman in forum Installation
    Replies: 57
    Last Post: 06-13-2011, 01:55 PM
  2. Replies: 7
    Last Post: 02-03-2011, 07:01 AM
  3. [SOLVED] Upgraded to 5.0 OSS - Sendmail Problem
    By Chewie71 in forum Installation
    Replies: 11
    Last Post: 12-28-2007, 07:07 PM
  4. Issues...
    By timothyalangorman in forum Administrators
    Replies: 3
    Last Post: 11-19-2007, 10:43 AM
  5. fresh install down may be due to tomcat
    By gon in forum Installation
    Replies: 10
    Last Post: 07-25-2007, 08:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •