Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6906415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:18:25+00:00 2026-05-27T08:18:25+00:00

I using WHM/Cpanel Im using the pipe technique to forward the income emails to

  • 0

I using WHM/Cpanel

Im using the pipe technique to forward the income emails to php script and everthing fine.
but while working if any error happend while piping the following msg for example will returned to the email sender

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/someuser/public_htmk/pipe.php
  generated by support@somecompany.net
  local delivery failed

Please note that I make the pipe from Cpanel for the email support@somecompany.net|/home/someuser/public_htmk/pipe.php

the php script below does not have error 🙂 but I define the path of the file to make an error because it should be public_html not public_htmk but I make this error to show you the error message which returned to the email sender.

So is there anyway to control of this returned message or disable it . for example change it or not to send the physical address of the php file that we are running to pipe the email atleast?

BTW I’m using

WHM/Cpanel
Dovecot
PHP

and this is a sample of the pipe script (this script does not have any error)

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

// read from stdin
$emg_stdf = fopen("php://stdin", "r");
$email = "";
while (!feof($emg_stdf))
{
    $emg_orgemailmsg .= fread($emg_stdf, 1024);
}
fclose($emg_stdf);

mail('me@example.org','From my email pipe!','"' . $emg_orgemailmsg . '"');

I’m looking to customize or disable the return msg which returned to the email sender when some error happened when piping email to a script.

any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:18:26+00:00Added an answer on May 27, 2026 at 8:18 am

    If you do not insist on putting troublesome code in the pipe definition, you can use the shell script wrapper around your php script, something like

    #!/bin/bash
    /home/someuser/public_htmk/pipe.php >&/home/someuser/pipe.errors.log || true
    

    and use it in your pipe definition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have using mysql 5.1 with cpanel /whm centOS. I had to use trigger
I'm confused about something in the SSL renewal process using WHM/cPanel for an existing
Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when
I recently installed Rails on a cpanel machine using this guide: http://www.cpanel.net/blog/cpanel-whm-admins/2011/07/installing-mod-rails-and-rails-309-on-a-cpanel-machine.html When I
My Environment: I'm using: OpenSuse 11.4 kernel 2.6.x.x; Apache 2.2; PHP 5.3; MySQL 5.5
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
A Drupal site a friend has on my server (WHM/CPanel) show his menu navigation
Using Xcode4.2.1, with a basic PhoneGap template based app. (I say template, but I
I own a server running whm / cpanel, and I have recently been experimenting
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.