note 26004 added to function.exit
| From: | webcat at NOcyber-catsSPAM dot com | Date: | Tue, 15 Oct 2002 02:14:53 +0000 |
| Subject: | note 26004 added to function.exit | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38083@lists.php.net to get a copy of this message | ||
To add to the last comment, I was also piping to a php script via an email alias file and was using
exit(); to send an exit code to qmail (rather than sendmail as in the last comment).
In my case, I was using the php script to filter for spam before it was delivered to my Mailbox
file, so I wanted the emails that failed the filtering to die, and the others to be delivered to my
Mailbox file.
I found if you are using qmail, you can use exit(99); to silently kill the message and stop qmail
from bouncing the message. (exit(99); basically tells qmail-local that the delivery was successful
and it is to ignore any further delivery instructions.) On the other hand, to have it deliver the
email to you, you should use exit(0); which tells qmail-local it was a successful delivery and will
cause qmail to go to the next command in the .qmail file and execute it ... in my case, the next
command was simply to deliver the message to my Mailbox file.
--
http://www.php.net/manual/en/function.exit.php
http://master.php.net/manage/user-notes.php?action=edit+26004
http://master.php.net/manage/user-notes.php?action=delete+26004
http://master.php.net/manage/user-notes.php?action=reject+26004