Some questions about piping emails to a php script
<p>All,</p>

<p>I'm trying to set up a system whereby emails sent to a certain address get piped to a PHP script for processing.</p>

<p>Thanks to StackOverflow, I've found this on-point article:</p>

<p><a href="http://www.evolt.org/incoming_mail_and_php" rel="nofollow">http://www.evolt.org/incoming_mail_and_php</a></p>

<p>However, I've got a few simple/stupid questions about it:</p>

<p>First, in that article, you edit the /etc/aliases file and add an entry that looks like this:</p>

<pre><code>script: &amp;quot;|/usr/bin/processingScript.php&amp;quot;
</code></pre>

<p>Does that mean that the email address you'd use is "script@[mydomain].com"?</p>

<p>Or, if I wanted the email address that I'd use to send emails for processing to be "processthis@mydomain.com", then the entry in the alias file would be:</p>

<pre><code>processthis: &amp;quot;|/usr/bin/processingScript.php&amp;quot;
</code></pre>

<p>As an aside - should the entry actually have quotes around the script name, or is this just a typo in the article?</p>

<p>Next question... should there actually be a mail account on my server with this address? In other words, should I create a "script@mydomain.com" account? (This is a really dumb question, but I don't understand how aliases work).</p>

<p>Next question... I've read that when you edit the aliases file, you should run "newaliases" or "sendmail -bi" to tell sendmail to rebuild it's aliases database.</p>

<p>However, on my server (a MediaTemple DV server), there's no "newaliases" program, and "-bi" does not appear to be a valid parameter for sendmail. When I try it, I get this:</p>

<pre><code>sendmail: usage: sendmail [ -t ] [ -fsender ] [ -Fname ] [ -bp ] [ -bs ] [ arg ... ]
</code></pre>

<p>(I realize that this might be a MediaTemple question, but maybe someone here has some insight...)</p>

<p>Many thanks in advance!</p>

<p>Cheers,
Matt Stuehler</p>
