PDA

View Full Version : Email Piping does not work.


bhau
12-25-2007, 02:47 AM
Hello

I have been trying to make email piping work. I have
installed osticked in a folder named results.
bhau is the subdomain added on the main domain user (dogmatio)

however this is what i get

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |/home/dogmatio/public_html/bhau/results/api/pipe.php
generated by results@bhau.in

I have also tried

pipe to http://bhau.in/results/api/pipe.php

and it does not work!

Please advice

tinos
12-29-2007, 06:21 PM
I also had problems with piping, and I wrote my own script to pipe correctly. The pipingscript (automail.pl) didn't work properly, or I couldn't get it to work.

My script, activated by a cronjob, fetches all email by pop3 and then PUT's all messages to the api/pipe.php script and deletes the messages on the mailserver. Works properly, so I think it's a worthly contribution to this wonderull product!

peter
12-29-2007, 06:58 PM
Possible problem include;

1) Missing quotes
"|/home/dogmatio/public_html/bhau/results/api/pipe.php"
2) Permission issues
Make pipe.php world executable.

automail.php/pl are meant for remote piping. It is important to note the difference between local and remote piping. See the wiki for details http://osticket.com/wiki/Email_Settings#Email_Piping

Tinos, your script is great but I think it is better to keep pop info and logic within the system. You could have simply cronned "/path/to/api/cron.php" to accomplish the same task without the need to discentralize the pop login info.

tinos
12-29-2007, 09:26 PM
Thanx, but I tried the api/cron.php to work with a cronjob for a day, and I didn't get it to work. I got a lot of errors witch I couldn't resolve.

Could the safe-mode, PHP4/5 problems or rights-related problems be the problem. I mean, on some servers there is something going on with the cron.php or pipe.php that maybe needs a custom solution.

Sorry for my English...

red
12-29-2007, 10:44 PM
Possible problem include;

1) Missing quotes
"|/home/dogmatio/public_html/bhau/results/api/pipe.php"
2) Permission issues
Make pipe.php world executable. [



I tried the above advice and it is still not working
When i enter the info and save it takes away the quotes, is this the issue maybe?

peter
12-29-2007, 10:48 PM
Are you using cpanel? Any details on the system would be helpful. PM for help if need be.

red
12-30-2007, 12:24 AM
Are you using cpanel? Any details on the system would be helpful. PM for help if need be.

sorry, yes im on a linux server using cpanel
thanks

tinos
12-30-2007, 05:36 AM
I'm using Apache server with Plesk Reloaded. It's a dedicated server...

Ebonhand
12-30-2007, 07:57 AM
I've tried using cPanel 11's "Pipe to", as well as switching the theme back a version to manually enter "|/home/username/www/support/api/pipe.php"

No dice.

I've got pipe.php set to 755 permissions, and I still get the following (edited) message whenever I email the forwarded address:

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |/home/username/www/support/api/pipe.php
generated by support@domain.com.au
local delivery failed

Is there a way to find out why it's failing, or has anyone solved the issue?

Regards,
Me

Ebonhand
12-30-2007, 08:48 AM
Hi again all,

After checking the mail server log using the email id from a bounce, and noticed the following (edited) entry:

2007-12-30 22:59:45 1J8wpU-0003iD-QI ** |/home/username/www/support/api/pipe.php (support@domain.com) <support@domain.com> R=virtual_aliases_nostar T=virtual_address_pipe: Child process of virtual_address_pipe transport returned 127 (could mean unable to exec or command does not exist) from command: /home/username/www/support/api/pipe.php

I did a quick Google for the key phrase "Child process of virtual_address_pipe transport returned 127", and found a number of forum posts for unrelated-but-similar ticket/email response scripts from users experiencing our exact problem/bounce message

To cut a long story short, the error means that the server is unable to directly execute pipe.php, as it doesn't have a hash-bang specifying what interpreter to use to execute the script.

Rather than modify pipe.php by inserting "#! /usr/bin/php" on the first line, I simply amended the forwarder I was using in cPanel to read as follows:

"|/usr/bin/php /home/username/www/support/api/pipe.php"

This allowed the pipe to execute cleanly, with no problems.

Note that the above isn't able to be entered directly when using the newer themes for cPanel 11 (e.g. "x3") due to validation issues. I recommend temporarily stepping back to an earlier cPanel 10 theme (e.g. "x") and entering the pipe string that way.

I hope this helps everyone else having the same problem!

Kind regards,
Ebonhand

Ebonhand
12-30-2007, 09:48 AM
Just a follow up -

If after using the above instructions (e.g. |/usr/bin/php blahblah) you get "Mail Delivery Failed" messages that include something similar to this:

X-Powered-By: PHP/4.4.5
Set-Cookie: PHPSESSID=df34547c5a8sdfgf0575e461a34513c; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html

Then you should add "-q" to the php command line. This inhibits the sending of standard HTTP headers, which are useless when called from the CLI

The pipe should instead read:

"|/usr/bin/php -q /home/username/www/support/api/pipe.php"

Now all I need to do is get attachment handling working, and I'm all set!

Kind regards,
Ebonhand

peter
12-30-2007, 09:58 AM
Ebonhand,

Thank you for the tips. What issues are you having with attachments?

red
12-30-2007, 10:17 AM
Note that the above isn't able to be entered directly when using the newer themes for cPanel 11 (e.g. "x3") due to validation issues. I recommend temporarily stepping back to an earlier cPanel 10 theme (e.g. "x") and entering the pipe string that way.


Is there a way to change back to cPanel 10 from within cPanel? or do I need to do this through my host?
Thanks so much for the effort, glad to hear its working

Ebonhand
12-30-2007, 10:28 AM
Hi Red,

It depends entirely on your host and your level of access, unfortunately.

I can change my theme at will, as it's my own dedicated server. Shared plans and other hosting types may need to speak to their host.

"Your mileage may vary"

Sorry I couldn't be of more help

Kind regards,
Ebonhand

PS. Email attachments are working for me now - just working out the exact change I made that fixed it before I post an official "do this to make it work"

peter
12-30-2007, 10:31 AM
Red,

Can you try "support/api/pipe.php" instead of "|/home/username/www/support/api/pipe.php" ?

I don't have access to cpanel at the moment.

Ebonhand
12-30-2007, 10:49 AM
Hi Peter,

cPanel 11 doesn't allow unvalidated entry of the pipe path, which makes my solution of piping to /usr/bin/php -q unworkable

Red needs to step down to a cPanel 10-style theme, or pull some trickery with relative paths e.g. entering "../../../../../../../../../usr/bin/php -q /home/username/www/support/api/pipe.php"

(This may or may not work, depending on how cPanel 11 validates the input)

Kind regards,
Ebonhand

okidoki
12-30-2007, 01:47 PM
Thanks for this fix. It's now working for me. :)

red
12-30-2007, 01:50 PM
Thanks for this fix. It's now working for me. :)

there are a couple fixes mentioned here, which one did you use?

okidoki
12-30-2007, 02:12 PM
there are a couple fixes mentioned here, which one did you use?
"|/usr/bin/php /home/username/www/support/api/pipe.php"

Ops, adding "/usr/bin/php" into the email forwarder worked for me.

okidoki
12-30-2007, 02:21 PM
Hi Peter,

cPanel 11 doesn't allow unvalidated entry of the pipe path, which makes my solution of piping to /usr/bin/php -q unworkable

Red needs to step down to a cPanel 10-style theme, or pull some trickery with relative paths e.g. entering "../../../../../../../../../usr/bin/php -q /home/username/www/support/api/pipe.php"

(This may or may not work, depending on how cPanel 11 validates the input)

Kind regards,
Ebonhand
Maybe modifying pipe.php and inserting "#! /usr/bin/php" on the first line might work for Red if there's no way around cPanel11's problem.

I never tried it but worth a try.

red
12-31-2007, 10:56 PM
looks like cPanel 11 is the issue for me, and I cant get around it with any of the suggestions here, and my host says they cant step down to cpanel 10

so to add code in how exactly should it look
the first line is:
<?php

so should it look like:
"#! /usr/bin/php" <?php

is it with or without the quotes?

then after this Im sure i still need to set up something for the forwarder right?

Ebonhand
01-01-2008, 12:45 AM
Hi Red,

Your host doesn't need to step you down to cPanel 10, only switch your account to a cPanel 10 theme e.g "x" instead of "x3" - the theme itself handles the validation of the input, and the older themes use a single text entry input, rather than three different ones for different purposes

Kind regards,
Ebonhand

red
01-05-2008, 09:02 AM
switching to cpanel 11 theme x did nothing for me

heres the bounced message im getting

Technical details of permanent failure:
PERM_FAILURE: SMTP Error (state 13): 550 5.0.0 <support@domain.org>... User unknown

what am i doing wrong? I'd really like to see this working!

Uriel
01-05-2008, 10:29 AM
i try pop3 its not working.....any idea

ggbig
01-06-2008, 08:02 AM
Hi red i had the same issue with cPanel 11 and by changing the first line of pipe.php to get the Shebang (Hashbang) outside the php so it could be parsed correctly by the server was the main thing that got the piping working for me. My end result was:

Line 1: #! /usr/bin/php
Line 2: <?php

by doing this and re entering the email forwarder the server then automatically set the chmod permissions (764 on my server) on the pipe.php file for execution for me and the piping began to work immediately! Hope this helps all who have piping trouble on cPanel 11 :)

queen
01-06-2008, 12:12 PM
Hi red i had the same issue with cPanel 11 and by changing the first line of pipe.php to get the Shebang (Hashbang) outside the php so it could be parsed correctly by the server was the main thing that got the piping working for me. My end result was:

Line 1: #! /usr/bin/php
Line 2: <?php

by doing this and re entering the email forwarder the server then automatically set the chmod permissions (764 on my server) on the pipe.php file for execution for me and the piping began to work immediately! Hope this helps all who have piping trouble on cPanel 11 :)
I tried this solution with the Line 1 and Line 2 as you suggest.

Here is the error message I got:
Subject: API Error(s)
Importance: High

Services not available!

any ideas?

queen
01-06-2008, 12:36 PM
OK.

I finally got email piping to work in cpannel 11

I wish that the osticket folks would update the wiki
to include step by step to get this to work.

Here is what I did:
I chmod the file pipe.php to 764

put the lines in the file pipe.php to look like this
#! /usr/bin/php
<?php

THEN...I go to the admin pannel preference and
check the box to enable email piping!

Doh!

I know that it was an obvious thing I needed to do, but
when you are in the state of mind that things are not working
you do not always see the obvious.

Well I'm happy that it finally works

:) Christina

red
01-06-2008, 08:06 PM
Christina
thanks for the post
can you please tell me how exactly you have your forwarded set up?

also what should Line 3 of pipe.php look like? did you make that adjustment to the newest file in the patch?

editing to add: what theme are you using in cpanel 11?

ggbig
01-06-2008, 11:57 PM
HI red here is my first three lines:
#!/usr/bin/php -q
<?php
/************************************************** ******

and here is my piping entry in cPanel Email Forwarders theme x3:

| /home/your_username_goes_here/public_html/help/api/pipe.php

let me know if this helps :)

red
01-07-2008, 11:06 AM
thanks ggbig
i followed your example but it still doesnt work,
this time when i entered the forwarded as you had it it said this program needs to be executable and click here to fix. I had already changed permissions to 764 but i tried it anyway, nothing.

queen
01-07-2008, 01:59 PM
my first three lines look like this:

#! /usr/bin/php
<?php


which is slightly different than the other post, as I have a blank
line. But that does not really matter.

I don't have the -q thing on my /usr/bin line

I do have my pipe.php set to 764

try it with
#! /usr/bin/php

and see if that works

queen
01-07-2008, 03:39 PM
I just called my hosting company and they said that
the first line of code should not have any spaces

(this is with cpannel 11)

#!/usr/bin/php
<?php

ggbig
01-07-2008, 10:39 PM
good to see we can all help each other get these settled, i applaude you all for the efforts :)

queen
01-08-2008, 01:49 PM
Yes, that's the nice thing about forums!

So far all is good with my OS ticket installation. I just don't like that IE is buggy and that my customers have to use firefox.

cheers,
Christina
"The Shopping Cart Queen"
http://www.ShoppingCartQueen.com

peter
01-08-2008, 01:54 PM
So far all is good with my OS ticket installation. I just don't like that IE is buggy and that my customers have to use firefox.


As far as I know we do nott have IE issues on client's interface. At least not that I know of...

red
01-14-2008, 03:45 PM
After having the developer check out the forwarder, and still not being able to use the email piping feature I wrote my host and got this reply:

The MX record currently points to another host - mx1.webexone.com. Any email sent to support@suchandsuchdomain.com would go to this server and not the host. As emails are not even getting through - I suspect the problem lies with this server.

is this some setting that gets configured with install of osticket??

Im confused as I created this email brand new for osticket, how do i fix this

dogli
01-15-2008, 10:05 AM
I have successfully implemented OSTicket on my production server. You can see it here: www.dealdigs.com/support. After comparing eticket, trellis and osTicket, I finally choose osTicket for its easy to set up and nice UI.

Being said that, the only thing remaining for me to to make pipe work. I have the same situation as Red does - my email server is hosted by Google Application. So, it means when I sent an email to support [at] dealdigs.com, it goes to Google email server. So, I have to set up remote pipe. I know there are two scripts there for remote pipe, but where should we put it? if somebody have made remote pipe work, please kindly write something here.

Again, thanks for the excellent product.

gfdos.sys
01-15-2008, 11:37 AM
This is another vote for instructions on how to use automail.php for REMOTE piping!

1. Where do we put it?
2. How do we schedule it to run to recieve new incoming mails on a remote server without pop3?

Gabe

peter
01-15-2008, 12:43 PM
Red,
The issue is with your MX records. Consult your host for help. osTicket doesn't change any mail settings.

dogli,
If you are using google apps then you can not use piping (remote or local). Your only option is POP3.

gfdos.sys,
I will put some instructions on the wiki when I get time. Remote piping is setup just like local piping. The script simply redirects the piped email via HTTP to osTicket pipe handler.

*Upload it to your mail server (remote host)...directory of your choice.
*Make sure it is executable
*White list the IP address of the remote host ( admin panel api settings )
*Set the pass phrase ( admin panel api settings )
*open the script and enter osTicket's url ( pipe interface) and API pass phase.
*Setup email forwarding ( see wiki and search the forum). It is same as setting up local piping.

tldagent
01-15-2008, 09:16 PM
I will put some instructions on the wiki when I get time. Remote piping is setup just like local piping. The script simply redirects the piped email via HTTP to osTicket pipe handler.

*Upload it to your mail server (remote host)...directory of your choice.
*Make sure it is executable
*White list the IP address of the remote host ( admin panel api settings )
*Set the pass phrase ( admin panel api settings )
*open the script and enter osTicket's url ( pipe interface) and API pass phase.
*Setup email forwarding ( see wiki and search the forum). It is same as setting up local piping.

Please consider opening the Wiki so users can actually use it like a wiki is intended to be used. There are a lot of people looking for answers and it would be helpful to you and us both if we could collaborate the documentation within the Wiki. I know how not having enough time is.

If it's already open to registered members, my apologies but I can't seem to login to it.

Please consider.

Now, for my piping issues.

I've read each post in this thread and I'm using Cpanel 11. I've adjusted the 1st line of pipe.php.

Question 1
The thing is, my email piping is working but my customers are getting both a ticket created as well as a mail deliver fail. I'm perplexed.

Question 2
Secondly, when an email is sent from aol out of the UK, (for testing reasons), to my support@domain.com, the pipe isn't working at all. Getting the "API Errors" for alerts@domain.com. The content of the email simply states: Create Failed Name required I've started a thread about this problem here (http://www.osticket.com/forums/showthread.php?goto=newpost&t=178).

Thank you!

red
01-16-2008, 10:05 AM
Thanks to every one with their help I did contact my host, seems my co-workers kinda forgot to tell me they had our emails directed off the server, so I set OS ticket up on a sub-domain and followed the wiki instructions and im good to go

scientica
03-07-2008, 03:18 AM
I have been following this thread and did almost everything, now I get a email - Mail Delivery Failed with following text in error message:

"PHP Notice: Undefined index: SCRIPT_NAME in /home/user/public_html/support/main.inc.php on line 21
PHP Warning: session_start(): open(/var/lib/php/session/sess_5d2a49fbfae8801acdb76fcc6c71b34f, O_RDWR) failed: Permission denied (13) in /home/user/public_html/support/main.inc.php on line 49
PHP Warning: session_start(): Cannot send session cookie - headers already sent in /home/user/public_html/support/main.inc.php on line 49
PHP Warning: session_start(): Cannot send session cache limiter - headers already sent in /home/user/public_html/support/main.inc.php on line 49"

What could be the error?

scientica
03-07-2008, 03:37 AM
I tried both the options in cPanel 11

"|/home/user/public_html/support/api/pipe.php"

as well as

"|/usr/bin/php /home/user/public_html/support/api/pipe.php"

but both ways it gives error.

aria_cop
03-13-2008, 08:33 AM
hi,
I Enabled Pipe.
but when I send email to support email it give me a delivery report & ticket responce too.

cap808
04-03-2008, 02:50 PM
Now, for my piping issues.

I've read each post in this thread and I'm using Cpanel 11. I've adjusted the 1st line of pipe.php.

Question 1
The thing is, my email piping is working but my customers are getting both a ticket created as well as a mail deliver fail. I'm perplexed.

Question 2
Secondly, when an email is sent from aol out of the UK, (for testing reasons), to my support@domain.com, the pipe isn't working at all. Getting the "API Errors" for alerts@domain.com. The content of the email simply states: Create Failed Name required I've started a thread about this problem here (http://www.osticket.com/forums/showthread.php?goto=newpost&t=178).

Thank you!

In regards to Question #1

I too was getting a Mail delivery fail. I did several things:

Forwarding string= "| /home/user/public_html/support/api/pipe.php"

1. Added the following to the top of my pipe.php:
#!/usr/bin/php -q
2. Added the following to the bottom of my pipe.php:
return NULL;
?>
3. Added the following to the bottom of my api.inc.php:
return NULL;
?>

I don't think you really need to have the return NULL; in your pipe.php but it doesn't hurt anything to have it there.

macevedo
04-29-2008, 03:38 PM
Good afternoon, my problem is that every time you create a new ticket application does not generate or not send mail with information about the ticket to the person who performed for the latter to pursue the same. I have already configured options panel administrator and can not find the solution ...

ayudenme please ...:confused:

djtremors
04-30-2008, 06:07 AM
@scientica: the problem is obvious

1. permission denied.
A. you are trying to write a session while but why, it's a script there, SHOULD BE no session. Are you calling it from a webpage????

2. PHP Notice: Undefined index: SCRIPT_NAME in /home/user/public_html/support/main.inc.php
A. Same as 1, SCRIPT_NAME is usually used for websites and not command line.

so my question is, what happens when you call the api script from shell?

ie php api/pipe.php

it should just sit there and wait for input....

I got mine working via .procmail and works a treat.

Klopper
05-17-2008, 12:43 PM
I've tried to set the pipe in DirectAdmin (with Exim). Here I filled in:
"| /path/to/my/support/api/pipe.php"
as well as
"| /usr/bin/php -q /path/to/my/support/api/pipe.php"

Both don't seem to work at all... :confused:
When I send a mail to test it, I received the following:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to | /usr/bin/php -q /path/to/my/support/api/pipe.php
generated by support@domain.com
local delivery failed

Even though the mail-server is active at the same server as the web-server...

I also tried the thing with the #!/usr/bin/php -q and all the other things named in this topic... :(

plameniv
07-12-2008, 07:53 AM
I've tried to set the pipe in DirectAdmin (with Exim). Here I filled in:
"| /path/to/my/support/api/pipe.php"
as well as
"| /usr/bin/php -q /path/to/my/support/api/pipe.php"

Both don't seem to work at all... :confused:
When I send a mail to test it, I received the following:



Even though the mail-server is active at the same server as the web-server...

I also tried the thing with the #!/usr/bin/php -q and all the other things named in this topic... :(

Hi there,
I've got the same problem but when I check maillog then I saw smrsh ....
It is means sendmail must execute the same file in folder /etc/smrsh and if you copy the php from /usr/bin/php to folder /etc/smrsh will start work execute php!
In my Linux pipe start work after that copy above but you must have shell access to do that :rolleyes:

james1700
07-17-2008, 08:10 AM
Can any one help with this. I have installed osticket on my ubuntu server with qmail. When i email the my support@ address my mail logs look fine, no errors are returned and i rescieve a success message.

@40000000487f35290c9fae8c status: local 1/10 remote 0/20
@40000000487f35290dcfd5d4 delivery 21273: success: did_1+0+0/
@40000000487f35290dd10a6c status: local 0/10 remote 0/20
@40000000487f35290dd1d974 end msg 5522753


however the ticket system is not creating any tickets.

In my .qmail-support file i have

#mailbox
/home/t/i/ticketing/public_html/home/api/pipe.php

have "|/home/t/i/ticketing/public_html/home/api/pipe.php" in quotes does not work on qmail. I can see what is happening.

Any HELP

cheers

james1700
07-17-2008, 10:14 AM
Changing a few files i now get the following message:

@40000000487f5362312e9574 delivery 21585: deferral: /bin/sh:_/home/t/i/ticketing/public_html/home/api/pipe.php:_/usr/bin/php5:_bad_interpreter:_No_such_file_or_directory/

/usr/bin/php5 is in the rite location and is there.

Not sure why this error is coming up

regards

rolson
08-04-2008, 12:55 AM
As you can see from below I'm piping to, which is automatically generated by Cpanel 11 when I enter "public_html/domainfile/helpdesk/api/pipe.php" into the pipe to "field" on a shared unix host. I have the latest version OSTicket and my pipe.php file as at the top

#!/usr/bin/php -q
<?php
/*************************************************

The wikki says to insert "|/usr/bin/php -q /path/to/api/pipe.php" for CPanel 11" but that does not make sense to me seeing it is in the top of pipe.php and CPanel 11 on a shared host puts the "home" info in for you which Knocks the path off.

Based on what I have read on this topic I should be working. I have the pipe.php permissions set 764 and I have the piping enabled on the admin panel.

But I get this error:

The following text was generated during the delivery attempt:

------ pipe to |/home/username/public_html/domainfile/helpdesk/api/pipe.php
generated by sales@domainname.com ------

Error in argument 1, char 3: option not found
Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>]
php <file> [args...]
-a Run interactively
-b <address:port>|<port> Bind Path for external FASTCGI Server mode
-C Do not chdir to the script's directory
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>. Implies `-q'
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-q Quiet-mode. Suppress HTTP Header output.
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.
-T <count> Measure execution time of script repeated <count> times.


Any ideas would be great. Thanks for any help!

PS this is what my hosting company says about piping:

When piping to a program, you should enter a path relative to your home directory. If the script requires an interpreter such as perl or php, you should omit the "/usr/bin/perl, or /usr/bin/php portion." Make sure that your script is executable and has the appropriate Hashbang at the top of the script. If you do not know how to add the Hashbang, just make sure to name your script file with the correct extension and you will be prompted to have the Hashbang added automatically.

crucial
08-06-2008, 06:36 PM
I also had problems with piping, and I wrote my own script to pipe correctly. The pipingscript (automail.pl) didn't work properly, or I couldn't get it to work.

My script, activated by a cronjob, fetches all email by pop3 and then PUT's all messages to the api/pipe.php script and deletes the messages on the mailserver. Works properly, so I think it's a worthly contribution to this wonderull product!

Does anyone have this script? I can't get piping to work on my install and IMAP is complaining about a lot of things when trying to install on my production server. I'm willing to send some $$ to anyone who can either help with postfix piping or find a script like this. Please send pm or email, thanks all.

smittie31
10-08-2008, 10:00 PM
OK.

I finally got email piping to work in cpannel 11

I wish that the osticket folks would update the wiki
to include step by step to get this to work.

Here is what I did:
I chmod the file pipe.php to 764

put the lines in the file pipe.php to look like this
#! /usr/bin/php
<?php

THEN...I go to the admin pannel preference and
check the box to enable email piping!

Doh!

I know that it was an obvious thing I needed to do, but
when you are in the state of mind that things are not working
you do not always see the obvious.

Well I'm happy that it finally works

:) Christina

I did the same thing as you and my piping still does not work. Tell me is there a space between #/! / or is it #!/

colden
11-18-2008, 07:21 PM
I'm baffled. The piping tool in cpanel under email forwarding is begun with a / (forward slash) but no " (quote mark) is shown. So should I put a quote in the space where my input begins even though both /home and / are already a static cpanel entry? I don't know, so I tried three versions, and I added versions with quote marks at the end, and all failed:

|/home/username/usr/bin/php -q /home/username/public_html/support/api/pipe.php\" did not work.

pipe to |/home/username/usr/bin/php -q /home/username/public_html/support/api/pipe.php

and
|/home/username/public_html/support/api/pipe.php

All got "Another local delivery failed" in the bounceback.

Anyone with a good handle on this?

colden
11-18-2008, 08:31 PM
I forgot to add that I used the exact recommendation included in the Wiki as well, including both quotes.

colden
11-19-2008, 07:24 AM
Finally got it working All I need to do was change the chmod on the pipe file to 755 and not as directed. Maybe this will help someone else.

colden
11-19-2008, 10:46 PM
No not yet. It's, well, sort of working. The email is delivered to osTicket as designed. But another email is dispatched to the sender at the same time saying it bounced.

Here is the error:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pipe to |/home/user/public_html/support/api/pipe.php
generated by support@user.com

The following text was generated during the delivery attempt:

------ pipe to |/home/user/public_html/support/api/pipe.php
generated by support@user.com ------

PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in /home/user/public_html/support/main.inc.php on line 48
PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent in /home/user/public_html/support/main.inc.php on line 48

Anyone? Please?

alien
07-22-2009, 08:30 AM
I have the same problem as rolson. Pls help.
later edit.
this is something beyond me. If i edit pipe.php with notepad everything works perfect. BUT if a edit pipe.php with Dreamweaver even if i only enter a space or a comment i get that stupid error:
Error in argument 1, char 3: option not found
Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>]
i just don't get it....

eagle00789
08-07-2009, 06:18 PM
i have the following in my mailproc.tab file (xmail)external<tab>0<tab>5<tab>/share/HDA_DATA/Qweb/osticket/api/pipe.php<tab>@@FILE(<tab> should be replaced with real tabs....)
and the first few lines of pipe.php are:
#!/share/HDA_DATA/optware/opt/bin/php -q
<?php
/************************************************** *******************
pipe.php

Converts piped emails to ticket. Both local and remote!
but piping my email doesn't work. i dont get any errors, but the ticket isn't created....

walnut
09-22-2009, 02:07 AM
Two things which you may have overlooked from the osTicket installation guides:
(I did...)

« Extra setup is required at mail server level »
This means: You need configuration access to the mail server, which you don't if it's separate from your web server.

« Local piping refers to the case where osTicket is installed on a server also handling your emails. »
« Most shared hosting users fall into this category. »

Well, there are quite a few shared host for which the mail server is separate !
Ex. HostRocket.
In that case, it's not possible to implement email piping.
(unless you have special rights on the mail server — which you don't)

Your only alternative is the cron method.

I could have saved hours... Hmppff.

dren
10-04-2009, 02:54 PM
here a line from my /etc/aliases

fu, "|/usr/local/bin/php -q /home/foo/www/fu.net/osticket/api/pipe.php"

i tried using root user too

ever since i migrate to new server i can only get piping to work if i chmod 777 pipe.php, i think? please help, i'm getting the following error


----- The following addresses had permanent fatal errors -----
"|/usr/local/bin/php -q /home/nullshells/www/nullshells.net/osticket/api/pipe.php"
(reason: 255)
(expanded from: <contact@fu.net>)

----- Transcript of session follows -----
PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in /home/fu/data/www/fu.net/osticket/main.inc.php on line 46
PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent in /home/fu/data/www/fu.net/osticket/main.inc.php on line 46
PHP Fatal error: Call to undefined function utf8_encode() in /home/fu/data/www/fu.net/osticket/api/pipe.php on line 78
554 5.3.0 unknown mailer error 255


here are permissions on the old server, still not 764
-rw-r--r-x 1 dren www 4616 Mar 14 2008 pipe.php

i know i can just chmod 777, but i'd like to get this working normal according to instructions with chmod 764 thanks

dren
10-04-2009, 03:23 PM
k, i dunno,now chmod 777 isn't even working :(

dren
10-04-2009, 04:15 PM
OK, used this dakman solution to fix header start errors

http://osticket.com/forums/project.php?issueid=59

but still

----- Transcript of session follows -----
PHP Fatal error: Call to undefined function utf8_encode() in /home/fu/data/www/fu.net/osticket/api/pipe.php on line 78
554 5.3.0 unknown mailer error 255

dren
10-04-2009, 04:40 PM
ok, this was a php-xml issue
i installed php-xml and now i'm getting this error

----- Transcript of session follows -----
PHP Warning: require(ostconfig.php) [<a href='function.require'>function.require</a>]: failed to open stream: Permission denied in /home/fu/data/www/fu.net/osticket/main.inc.php on line 66
PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'ostconfig.php' (include_path='.:/usr/local/share/pear') in /home/fu/data/www/fu.net/osticket/main.inc.php on line 66
554 5.3.0 unknown mailer error 255

so back to permissions again it seems, i have pipe.php chmod 764 so that works now,but this is

-rw-r----- 1 fu www 1197 Oct 4 14:28 ostconfig.php

is there a trick to this?
is there someway i can keep it from being world readable and still let it work?
these are same the permissions it has on my old server where it works OK

dren
10-04-2009, 05:06 PM
Ok, i added mailnull to the www group, this was the same on the other server I forgot to do this... this fixes it!

This is good enough for me.