> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > If I've got a maildrop recipe that runs some code inside an EXCEPTION > block, is there anyway to tell whether the code inside the block ran > properly or not? > > If I've got this > > exception { > xfilter "/path/to/external/program" > } > > can I call RESULTCODE or something similar to know if xfilter ran the > external program successfully or not?
Here's some code to test out your question: exception { `false` `echo $RETURNCODE > false.txt` } exception { `true` `echo $RETURNCODE > true.txt` } true simply returns a 0 errorcode (no error) and false returns a 1 errorcode everytime. After putting this in my .mailfilter and sending myself a test message, I found that true.txt was 0 (no error returned) and false.txt was 1 (error returned) so yes, this should work fine for you. Just make sure your using RETURNCODE, not RESULTCODE... Jay -- Jay Lee Network / Systems Administrator Information Technology Dept. Philadelphia Biblical University -- ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users