Re: Safely executing your mail filter?

Fred Chagnon <[email protected]> Mon, 19 Jan 2004 15:48:57 -0500 (EST)
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.

Are you talking like syntax errors in the script, when a new rule is
fat-fingered? I test this by simply executing the script from the command
line. If all's good it should just wait on stdin.

Any more convaluted errors might be caught with a shell script like you
mentioned.

-- 
Fred Chagnon
[email protected]
http://www.minix.ca

"In theory, theory is the same as practice, but not in practice."