title: Forward a received email to a php script (sendmail)
body: <p>I have created a system user <code>userA</code>.</p>
  
  <p>In <code>/home/userA/</code> I have put a file <code>.forward</code> and a php script <code>script.php</code></p>
  
  <p>In the <code>.forward</code> I have put <code>/home/userA/script.php</code></p>
  
  <p>In the <code>script.php</code> I have put </p>
  
  <pre><code>#!usr/bin/php -q
  &lt;?php
  mail('userB@myDomain.com','something','something else');
  ?&gt;
  </code></pre>
  
  <p>The email in the script is correct and the server works. (my point is not to send an email but get some confirmation that the script was executed)</p>
  
  <p>When I send a mail to my <code>userA@myDomain.com</code> the mail cannot be sent and I get a mailer-demon error:</p>
  
  <pre><code>    ----- The following addresses had permanent fatal errors -----
  /home/userA/script.php
     (reason: Can't create output)
  </code></pre>
  
  <p>what could be the problem?</p>