Safely executing your mail filter?
Robert Nicholson <[email protected]> Mon, 19 Jan 2004 02:25:52 -0600
| Newsgroups | gmane.comp.lang.perl.modules.mail-audit |
|---|---|
| Message-ID | <[email protected]> |
So all incoming mail that comes to my domain gets put via qmail into a perl script and custom filtering is performed. Occasionally an error makes it's way into the perlscript and it fails to run. When this happens I lose email. I would like to ensure that this doesn't happen. Is there any way to safely execute a perlscript or should I be looking to wrap it via a shellscript that checks the exit status to decide whether it can trust the script or resort to another approach. Currently my $HOME/.qmail script looks like this bash$ cat .qmail | /home/robert/perlscripts/filter.pl I would like to change that so that it uses a shell script which is never changed that wraps my perl script and based on it's exit status will manage to catch all incoming mail that should have been filtered into my INBOX. How, can I do that? Specifically with qmail ... what happens to email that does _not_ make it's way to my mail audit's "accept" calls. Is there any way for this email to go into the general inbox?