I am piping my php email to a php script it works fine and executes except it sends back a bounce email, do I have to return something or echo something or set some headers to stop this?
-
can you give us details on how youre "piping"? i take this to mean youre using php for a sh script or youre calling `exec()` in some fashion but i could be wrong. Anyhow itd be good to see the relevant portions of the code as it will most likely have bearing. – prodigitalson Jan 29 '10 at 17:14
-
DirectAdmin forward for certain emails to this PHP script that is executable. I am reading stdin – Tony Jan 29 '10 at 17:22
2 Answers
DirectAdmin is a control panel, it sounds like the MDA (mail delivery agent) is determining that the message has failed.
Without knowing what the MDA is and how it is configured then its virtually impossible to advise how to fix this, however a coupkle of things to note:
1) the MDA may simply not be able to pipe output to a program - have you checked with your service provider?
2) you may have misconfigured the MDA forward - try replacing it with a simple 'cat >somefile'
3) the MDA may be looking for a valid return value from the pipe - by default, shell scripts shuold return a zero exit status if successful - a non-zero value if they fail
HTH
C.

- 47,736
- 6
- 59
- 94
-
I have tried with return TRUE; return FALSE; exit(0); and die(0); at the end. – Tony Jan 29 '10 at 17:24
I fixed it, tested it in SSH and it was outputting a new line somewhere so I just put the entire script inside an output buffer. <3

- 1
- 1