Can't Get Email Piping working in DA 1.33.6

topdog

Verified User
Joined
Jun 22, 2009
Messages
135
Hi,
I am using DA 1.33.6. I'm attempting to get email piping to work as I am using a third-party support system called OsTicket.
I cannot seem to get the email forwarder [email protected] "|/home/public_html/test/api/pipe.php" to work in DA 1.33.6.
The only things I see on my DA when I go to user level, forwarders, create new email forwarder, is forwarder name and destination e-mail address.
When I put the string [email protected] "|/home/public_html/test/api/pipe.php" in the forwarder name box it doesn't except it.
I'm also using CentOS 5.2, Apache 2.2.11, and PHP 5.2.10.
 
Last edited:
Try The following for your forwarder value. Change the UserName and YourDomain to reflect yours.

"|/usr/local/bin/php -q /home/UserName/domains/YourDomain/public_html/test/api/pipe.php"
 
[email protected][/email] "|/home/public_html/test/api/pipe.php" in the forwarder name box it doesn't except it.

I have seen this problem too. DA will not accept a pipe and and email address in the forwarder. Its a pain. However if you are the administrator and have root access to can add it to the alias file manually and it will work.
 
Thanks for everyone's help who replied.
For the last respondent, Floid, what do I put in the aliases file? I have full access meaning root, to my server so I can put whatever needs to be added to whatever file.
 
Ok .. sorry about posting that reply lol. I've located where the aliases file is, I think. :p
it should be in /etc/virtual/domains/domainname.com. Is this correct?
I thought I red somewhere where e-mail piping was already permited in DA? How odd.
Actually --yes I did, it's in the thread
http://www.directadmin.com/forum/showthread.php?t=1092
Very weired how it doesn't work though. Anyone who develops DirectAdmin on here that can tell me and possibly others why email piping doesn't work in DA 1.33.6?
Thanks ...
 
Piping works fine.

But you tried to add an email address as well as a pipe. Piping by itself works just fine.
 
Piping works fine.

But you tried to add an email address as well as a pipe. Piping by itself works just fine.
It does? odd.
So then what this means is that I can't use the forwarding feature to add a pipe then.
Or was I doing the piping the wrong way in DA?
Can you give me some type of step-by-step in what to put in the forwarding section? Or would you suggest I just add whatever pipe I plan to use to the virtual/domain.com/aliases file instead of using the email forwarders in DA?
 
Last edited:
OMG

So then what this means is that I can't use the forwarding feature to add a pipe then.

YES YOU CAN. But that is not what you had in your example. You example is:

When I put the string [email protected] "|/home/public_html/test/api/pipe.php" in the forwarder name box it doesn't except it.

This is NOT a pipe. This is a pipe AND an email address.

This WILL work in DA:

Code:
"|/home/public_html/test/api/pipe.php"

This will not work in DA:
Code:
[email protected] "|/home/public_html/test/api/pipe.php"

Also if you want to have multiple entries in the forwarder you have to separate them with a comma. So to even be close to correct in what you were trying to do you would have to have a comma separating the email address from the pipe.

DA does not support piping AND email addresses in the same form field. It does support piping OR email addresses, but not both in the same field.

So do you want just a pipe or a pipe AND an email address?
 
OMG



YES YOU CAN. But that is not what you had in your example. You example is:



This is NOT a pipe. This is a pipe AND an email address.

This WILL work in DA:

Code:
"|/home/public_html/test/api/pipe.php"

This will not work in DA:
Code:
[email protected] "|/home/public_html/test/api/pipe.php"

Also if you want to have multiple entries in the forwarder you have to separate them with a comma. So to even be close to correct in what you were trying to do you would have to have a comma separating the email address from the pipe.

DA does not support piping AND email addresses in the same form field. It does support piping OR email addresses, but not both in the same field.

So do you want just a pipe or a pipe AND an email address?
Both. In otherwords pipe the support address to pipe.php.
Take a look at http://osticket.com/wiki/Email_Settings
Email Piping, Local Piping if you're still confused.
 
Both. In otherwords pipe the support address to pipe.php.
Take a look at http://osticket.com/wiki/Email_Settings
Email Piping, Local Piping if you're still confused.

I am not the one that is confused. I know how to forward email to a pipe and I know how to forward email to a pipe AND another email address. I am not the one that is confused.

1. You can use DA to forward email to a pipe.
2. You can use DA to forward email to another email address.
3. You cannot use DA to forward email to another email address AND a pipe at the same time.
4. To forward email to another email address AND a pipe you have to edit the alias file manually.

I cannot be any more clear than that. I have said the above previously. Maybe somebody else can help.
 
Last edited:
I am not the one that is confused. I know how to forward email to a pipe and I know forward email to a pipe AND another email address. I am not the one that is confused.

1. You can use DA to forward email to a pipe.
2. You can use DA to forward email to another email address.
3. You cannot use DA to forward email to another email address AND a pipe at the same time.
4. To forward email to another email address AND a pipe you have to edit the alias file manually.

I cannot be any more clear than that. I have said the above previously. Maybe somebody else can help.
perhaps someone else can. I understand the part about the having to add the aliases manually. CPanel seems much better at piping then DA is.
No matter though I got it to work the manual way by adding the aliases manually.
If I didn't have any way of editing files
directly then I wouldn't be able to get it to work.
Lucky for me I have full access, but for those who may not then good luck with that task.
 
Hi,

I still can't get email pipe to work.

I'm trying to use trellis desk as ticket service. The pipe.php is in the sources directory of the program. I made this pipe.php executable with 644.

So I would think the forwarding to a pipe would be:

Code:
"| /home/user/domains/domain.nl/public_html/helpdesk/sources/pipe.php"

The first line of this pipe.php reads
Code:
#!/usr/local/bin/php -q

However, I get the following message :
Code:
  pipe to |/home/user/domains/domain.nl/public_html/helpdesk/sources/pipe.php
    generated by [email protected]
    local delivery failed

I also tried

Code:
"| /usr/local/bin/php -q /home/user/domains/domain.nl/public_html/helpdesk/sources/pipe.php"

But that gave the same error.

Then I saved a email I've sent as text and piped it through pipe.php
Code:
cat test.eml | ./pipe.php

And that worked perfectly. When I rename pipe.php in the forward pipe command to pipe2.php to test, I get the same error message.

Can anyone tell me what else I can try to get this working?
 
First, take out the space after the |.

"|/path/to/program .."

and not:

"| /path/to/program .."

Also, if you're using a php shebang line at the top (#!/usr/local/bin/php) the php file *must* be chmod 700 or 755, etc.. 644 is not executable.
If you're running /usr/local/bin/php directory, not using the shebang line, then 644 is enough, as the php binary would read in the php file, instead of the other way around.

John
 
Thanks for the info but I still get the same error message

What I did:

chmodded pipe.php to 755, removed the space.
Tried it with and without the shebang line and in combination with /usr/local/bin/php -q and without, but still can't get it to work.

Now I'm trying to get the exim logs, maybe there is more usefull information. Are there any other suggestions I can try?
 
ОМG. Damn "new features"...
Now I can't add forwarding to ":fail:" or ":blackhole:", while it's worked flawlessly before...
 
Back
Top