Can I configure email piping through ISPConfig3

Discussion in 'General' started by atjensen11, Jan 17, 2010.

  1. atjensen11

    atjensen11 New Member

    I have been testing osTicket as a Support Ticket system. It allows for automated support ticket creation when users send emails to a specified email address.

    I already have the mailbox created in ISPConfig3. Some examples are supplied in the osTicket WIKI.

    Is there a way to do the piping through the ISPConfig web GUI or do I need to get into Postfix file?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can pipe the message to osTicket by adding a pipe in the custom rules field of the mailbox. The rules have to be in maildrop syntax. I guess something like:

    to "|/path/to/api/pipe.php"

    should work.
  3. pebkac

    pebkac Member

    did this work for you, I too am trying this.

    I get this when I test it, and not sure why. I made sure pipe.php is chmod 777 and still errors out????
    Last edited: Jan 27, 2010
  4. pebkac

    pebkac Member

    I also made sure the dir leading to pipe.php are permission 777, and still nothing,

    The mail system
    <[email protected]>: Command died with status 126: "/usr/bin/maildrop".
       Command output: ERR: authdaemon: s_connect() failed: Permission denied sh:
       /var/www/ Permission denied
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.3.0
    Diagnostic-Code: x-unix; ERR: authdaemon: s_connect() failed: Permission denied
       sh: /var/www/ Permission denied
    drwxrwxrwx 10 web1 client1       4096 2010-01-26 20:32 helpdesk
    drwxrwxrwx 2 web1 client1 4096 2010-01-26 21:34 api
    [email protected]:/var/www/ ls -l
    total 28
    -rwxrwxrwx 1 web1 client1 3023 2010-01-26 20:23
    -rwxrwxrwx 1 web1 client1  716 2010-01-26 20:23 cron.php
    -rwxrwxrwx 1 web1 client1   34 2010-01-26 20:23 index.php
    -rwxrwxrwx 1 web1 client1 4971 2010-01-26 21:34 pipe.php
  5. edge

    edge Active Member Moderator

    What exactly did you add in the "custom rules field of the mailbox"?
  6. pebkac

    pebkac Member

    to "|/var/www/"
  7. edge

    edge Active Member Moderator

    Thank you for the info.
    For me it's working great.

    I've chmoded my pipe.php to 755.
    It's owned by (in my case) web81

    As test I added a small "email me when script is hit" option, and after sending the email to the "custom ruled mailbox", I got a reply from my "email me when script is hit" .
    Last edited: Jan 27, 2010
  8. pebkac

    pebkac Member

    You're lucky I guess. What server it is it running on. I cannot figure this out for the life of me.
  9. edge

    edge Active Member Moderator

    Debian Lenny with ISPconfig3

    Not sure if it makes any difference, but my "pipe.php" script starts with:

    rest of code....
  10. pebkac

    pebkac Member

    Same here.

    UPDATE: Mine actually looks like this:
    #!/usr/bin/php -q

    I iwll try it without the -q and see what happens.
    Last edited: Jan 28, 2010
  11. pebkac

    pebkac Member

    still does fails without the -q
  12. edge

    edge Active Member Moderator

    I'm using cients ID's in the path, and not the domain.
    Maybe this witll make it work for you?

    to "|/var/clients/client1/web81/web/helpdesk/api/pipe.php"
  13. pebkac

    pebkac Member

    Good try, appreciate it. However, it still fails. This is driving me batty..I'm searching all over for a solution....
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    And your pipe.php is really a shell script and not not just a php file? Post the first line of the pipe.php script.
  15. pebkac

    pebkac Member

    #!/usr/bin/php -q
  16. pebkac

    pebkac Member

    Got it working by running this

    chmod o+x /var/www/clients/client1/web1/web

    Not sure why that was needed but it works now.
  17. bluebirdnet

    bluebirdnet New Member

    with WHMCS i put the following in Custom Rules;

    to "| php -q /var/www/whmcs/pipe/pipe.php"
    dont forget the to before quotes!

    And chmod 755 pipe.php or else you get a permission denied.
  18. bluebirdnet

    bluebirdnet New Member

    LOL i was setting a new server and had a "Permission denied" with Maildrop and search the Internet and came back to this post.

    So as PebKac mentioned above, if your trying to pipe WHMCS you need to;

    chmod o+x the "/web" directory.

    then chmod 755 pipe.php

    and setup the pip in Custom Rules as such;

    to "| php -q /var/www/clients/client1/web1/web/pipe/pipe.php"

    hope this helps someone! i helped myself anyhow.

  19. Hi Till
    In my case i use Multi Server Setup with my email server on a different host other that my web server hosting my osticket software. I did not copy the pipe.php as use in this discussion as i am sure it is for local piping. In my case i think it is remote email piping ... i have google and look around but no luck of , and finally i come across this post, I hope someone would help solve this issue for me as it is several days now with no luck.
  20. Till
    any response to my previous post regarding remote piping

Share This Page