Jump to content

Piping in Directadmin


jhaagmans

Recommended Posts

Hello,

 

I've tried adding the piping command to a Directadmin autoresponder similar to "support@domain.ext" and it just won't do it:

 

String contains an invalid email address: | php -q /*path*/support/pipe/pipe.php

 

I can't seem to find what's wrong. It just won't take something that is not an e-mail adress. Can anyone help me?

 

Kind regards,

Jaap Haagmans

Link to comment
Share on other sites

Well, that was a pickle. I've been trying and trying and finally found out I had to pipe it to the absolute PHP path (which is /usr/local/bin/php in most DA installs) by editing the /etc/virtual/*domain*/aliases file.

 

Eventually I ended up with a piping line like this:

 

support: |/usr/local/bin/php -q /home/*path*/public_html/support/pipe/pipe.php

 

But it works now. And I think you (Matt) can add it to the manual like this, if you like. But make sure to check whether the php path is correct for your install.

Link to comment
Share on other sites

No, that doesn't work, but I've done some research and found that you can manually add it in /etc/domain/aliases :)

 

The correct method for piping is placing the option in quotes. It DOES work when you have it in your quotes "|php -q pipe.php"

Link to comment
Share on other sites

  • 1 month later...
Well, that was a pickle. I've been trying and trying and finally found out I had to pipe it to the absolute PHP path (which is /usr/local/bin/php in most DA installs) by editing the /etc/virtual/*domain*/aliases file.

 

Eventually I ended up with a piping line like this:

 

support: |/usr/local/bin/php -q /home/*path*/public_html/support/pipe/pipe.php

 

But it works now. And I think you (Matt) can add it to the manual like this, if you like. But make sure to check whether the php path is correct for your install.

 

I can hereby confirm that this is correct, im using DirectAdmin on freeBSD and need to use the full path like "|/usr/local/bin/php " only PHP is not working for me either.

Link to comment
Share on other sites

  • 2 weeks later...

yeah, can confirm DA rejects non-email addresses now in the initial setup of a forwarder, but it will let you edit one once its in.

 

edit:

etc/virtual/yourdomain/aliases

 

add:

support: "| /usr/local/bin/php -q /home/admin/domains/yourdomain.com/public_html/cms/pipe/pipe.php"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated