How to pipe email to script

Discussion in 'Tips/Tricks/Mods' started by ichpen, Jan 13, 2012.

  1. ichpen

    ichpen New Member

    Hi,

    Been pulling my hair out on this one. I'm trying to integrate osticket with a wordpress site. Osticket has the ability to receive tickets via a pipe. There's some nice instructions on how to integrate this with cpanel.

    Anyway, tried using ispconfig 3, in custom rules I had set up:

    to "|/var/www/.../.../pipe.php"

    result:
    Command output: /usr/bin/maildrop: Unable to open mailbox. )

    Have tried without quotes, with php -f etc but no joy.

    Looks like maildrop is thinking this is a mailbox and not piping.

    Any tips on getting this to work?
     
  2. till

    till Super Moderator

    I guess what maildrop tries to say you is that your php script can not be accessed by the user "vmail", under which the mailsystem is running.
     
  3. ichpen

    ichpen New Member

    Postfix mail, everything was setup as per the isp guide
     
  4. till

    till Super Moderator

    The perfect setup guide installs a secure enviroemnt, so that no other users then the web user can access a website. If I assume that your php script is inside a website directory, then the vmail user can not access it.

    What you can try is that you add the vmail user to the group of the website where the php script is located.
     
  5. ichpen

    ichpen New Member

    Good suggestion, added user vmail to the client group but same error:


    Jan 13 12:32:57 server1 postfix/pipe[488]: 83DA215A1F72: to=<support@mydomain.co>, relay=maildrop, delay=0.13, delays=0.06/0/0/0.06, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/bin/maildrop: Unable to open mailbox. )

    Confused.

    UPDATE: one step closer but still an error in there.


    Jan 13 12:40:55 server1 postfix/smtp[720]: 04C5015A1F72: to=<support@mydomain.co>, relay=127.0.0.1[127.0.0.1]:10024, delay=4.8, delays=0.25/0.01/0/4.6, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as B3BB415A1F8B)
    Jan 13 12:40:55 server1 postfix/qmgr[10275]: 04C5015A1F72: removed
    Jan 13 12:40:55 server1 postfix/sendmail[730]: fatal: vmail(5000): No recipient addresses found in message header
    Jan 13 12:40:55 server1 postfix/pipe[707]: B3BB415A1F8B: to=<support@mydomain.co>, relay=maildrop, delay=0.1, delays=0.04/0/0/0.06, dsn=2.0.0, status=sent (delivered via maildrop service)


    The actual rule is:
    to "|/var/www/clients/client4/web4/web/wp-content/plugins/zingiri-tickets/osticket/upload/api/pipe.php"

    I had omitted the pipe character earlier.
     
    Last edited: Jan 13, 2012

Share This Page