Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > osTicket 1.6.x > Troubleshooting and Problems

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-25-2007, 01:47 AM
bhau bhau is offline
Junior Member
 
Join Date: Dec 2007
Posts: 2
Default Email Piping does not work.

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
Reply With Quote
  #2  
Old 12-29-2007, 05:21 PM
tinos tinos is offline
Junior Member
 
Join Date: Dec 2007
Posts: 3
Default

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!
Attached Files
File Type: txt POPfetch.pl.txt (1.1 KB, 49 views)

Last edited by tinos; 12-30-2007 at 04:33 AM.
Reply With Quote
  #3  
Old 12-29-2007, 05:58 PM
peter peter is offline
Developer
 
Join Date: Dec 2007
Location: Alexandria, LA
Posts: 702
Default Piping issues

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.
Reply With Quote
  #4  
Old 12-29-2007, 08:26 PM
tinos tinos is offline
Junior Member
 
Join Date: Dec 2007
Posts: 3
Default

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...
Reply With Quote
  #5  
Old 12-29-2007, 09:44 PM
red red is offline
Junior Member
 
Join Date: Dec 2007
Posts: 26
Default

Quote:
Originally Posted by peter View Post
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?
Reply With Quote
  #6  
Old 12-29-2007, 09:48 PM
peter peter is offline
Developer
 
Join Date: Dec 2007
Location: Alexandria, LA
Posts: 702
Default

Are you using cpanel? Any details on the system would be helpful. PM for help if need be.
Reply With Quote
  #7  
Old 12-29-2007, 11:24 PM
red red is offline
Junior Member
 
Join Date: Dec 2007
Posts: 26
Default

Quote:
Originally Posted by peter View Post
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
Reply With Quote
  #8  
Old 12-30-2007, 04:36 AM
tinos tinos is offline
Junior Member
 
Join Date: Dec 2007
Posts: 3
Default

I'm using Apache server with Plesk Reloaded. It's a dedicated server...
Reply With Quote
  #9  
Old 12-30-2007, 06:57 AM
Ebonhand Ebonhand is offline
Member
 
Join Date: Dec 2007
Location: Australia
Posts: 34
Default I'm having the same problem

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
Reply With Quote
  #10  
Old 12-30-2007, 07:48 AM
Ebonhand Ebonhand is offline
Member
 
Join Date: Dec 2007
Location: Australia
Posts: 34
Default OK, I've solved it - rejoice!

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
Reply With Quote


Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:01 AM.