The cPanel Pipe to a Program option hands every incoming email for an address to a script, instead of leaving it only in the mailbox. If the script can't run or exits with an error, delivery fails and the sender gets back Mail delivery failed with code 554 5.0.0. The quick fix is to remove the pipe from your Forwarders or filters, and if all you wanted was an automatic reply, to use the cPanel Autoresponder.
What Pipe to a Program does
Email piping lets a program process emails the moment they arrive. For example, a helpdesk automatically opens a ticket from every email sent to support@example.gr. The mail server starts the script and passes it the whole message, headers included, through STDIN.
In cPanel the option appears in four places:
- cPanel > Email > Forwarders, under the forwarder's Advanced Options.
- cPanel > Email > Email Filters, as a filter action for one mailbox.
- cPanel > Email > Global Email Filters, as a filter action for the whole account.
- cPanel > Email > Default Address, under Advanced Options for email sent to addresses that don't exist.
How do I know the pipe is the problem?
Three signs point to it:
- People who write to you get a bounce with the subject "Mail delivery failed: returning message to sender" and code 554 5.0.0.
- The bounce text contains the phrase "pipe to" followed by a script path, or "local delivery failed".
- In cPanel > Email > Track Delivery the delivery to that address shows as failed, with a message such as "Child process of cagefs_virtual_address_pipe transport returned 127". How to read the fields is explained in the Track Delivery guide.
The error affects every message to that address, not just some. If the address also receives notifications from your site, such as new WooCommerce orders, those bounce too.
The number at the end of the message shows where execution stopped:
| What it says | What it means |
|---|---|
| returned 127 | The server couldn't find or start the script or its interpreter |
| returned 1 or any number other than 0 | The script started but exited with an error |
| A bounce containing text from the script | The script printed something, even a blank line |
Why doesn't the script run?
On CloudLinux hosting every account runs in its own isolated environment, CageFS. The pipe script runs inside it, with your account's permissions, and sees only the files and programs that exist in that environment. That is why the error message says "cagefs_virtual_address_pipe".
The usual causes, according to the cPanel documentation:
- Wrong path. The path is relative to the account's home directory, with no interpreter in front. For a file in the
scriptsfolder of your home directory you enterscripts/pipe.php, not a path that starts with the PHP binary. - Missing or wrong shebang. The first line of the script must point to the interpreter that runs it. If the file has the right extension, cPanel offers to add the shebang for you.
- The file isn't executable. The documentation asks for
0700permissions. You change them in the File Manager with Permissions. - The file was saved on Windows. Windows line endings break the shebang and the server can't find the interpreter. Save the file with Unix (LF) line endings.
- The script prints something. Any output, even a blank line or a PHP warning, goes back to the sender as a bounce.
- The script needs files it can't find. Libraries, settings or paths that exist on the developer's computer don't necessarily exist inside the account's isolated environment.
The script's code is the responsibility of the developer who wrote it, just like the site's code. See what hosting support covers.
How to remove the pipe in cPanel
If you don't need the script, or you want the bounces to stop first, remove it from every place:
- Open cPanel > Email > Forwarders. Find the address whose destination is a script and click Delete. A forwarder can't be edited, you delete it and create it again if needed. Details in the cPanel Forwarders guide.
- Open cPanel > Email > Email Filters, pick the address and delete or change any filter with the Pipe to a Program action. See the Email Filters guide.
- Do the same check in cPanel > Email > Global Email Filters. More in Global Email Filters.
- In cPanel > Email > Default Address check whether email to non-existent addresses goes to a script. If it does, choose another option and click Change. The options are explained in cPanel Default Address.
- Send a test email to the address from an outside account, such as Gmail, and check in Track Delivery that it was delivered without errors.
Out-of-hours auto reply without a script
If the pipe was set up to send an out-of-hours auto reply, the built-in cPanel Autoresponder does the same job without code. You set it up in cPanel > Email > Autoresponders, one per address. Messages still arrive normally in the mailbox.
The cPanel autoresponder has a start and end date (Start, Stop), not a recurring weekly schedule. The simplest solution is a permanent message that says when you reply, for example "We received your message. We reply Monday to Friday, 09:00 to 17:00". With Interval you set how many hours pass before the same sender gets another reply. All settings are in the cPanel Autoresponders guide.
If you really need the reply to switch on only outside business hours, a developer can turn the autoresponder on and off through the cPanel API, with an API token and a cron job. On Konet shared plans a cron job runs at most every 10 minutes.
What if the bounces continue after I remove it?
In rare cases a pipe entry stays active in the mail server configuration even though it no longer shows in cPanel. In that case open a ticket from the Client Area and include the address, the time of a recent message that bounced and the bounce text or the Track Delivery details. Support checks the address configuration on the mail server.
Frequently Asked Questions
What does 554 5.0.0 mean in Mail delivery failed?
It's a generic permanent failure code. It doesn't tell you the cause on its own. The cause is written further down in the bounce text, here "pipe to" or "local delivery failed".
Are emails lost while the error is there?
Delivery to the script fails and the sender gets a bounce email. If the same address is also a regular mailbox, the copy in the mailbox may have been delivered normally. Check in Track Delivery what happened to each delivery.
Why did I stop receiving my eshop's order notifications?
If WooCommerce notifications go to an address with a failing pipe, they bounce like any other email. Remove the pipe or set a different recipient address in the eshop settings.
Can I keep the pipe and fix the script?
Yes, if your developer fixes it. Check the path, the shebang, the 0700 permissions and that the script prints nothing, then send a test message.
I don't see the Pipe to a Program option, why?
According to the cPanel documentation, the option only appears when the hosting provider has enabled it. If you need it for a specific application, open a ticket and describe how you will use it.