Thanks Sam for the explanation. Please see below...
> In a maildrop recipe that, by itself, will do nothing, since if the > maildrop > recipe completes with a zero exit code, the message is deemed to be > succesfully delivered. > > couriermlm reports an error by exiting with a non-zero exit code. > maildrop, > after running the command specified by the backtick operators, places its > exit code into the RETURNCODE environment variable, as described in the > maildropfilter man page, then it will proceed normally. > > maildrop continues normally, irrespective of the exit code. If you are > invoking maildrop to deliver mail, you also need to have maildrop return > the > non-zero exit code, in order to generate a non-delivery report. You > probably > need to do something like this: > > EXITCODE=$RETURNCODE > exit But what still confuses me is why there's neither stdout or stderr output if couriermlm is rejecting the message. If instead of running with backticks I run with the "to", there will be an error printed in the log, but for some reason using to doesn't work because apparently the envelope sender gets messed up (even valid members get rejected with "You are not a member" message). I added echo "RETURNCODE $RETURNCODE" to the recipe and indeed, it returns code 77, but there's no output back to maildrop... so it's strange that with "to" there is output, but with backticks there isn't, even with 2>&1 Ricardo ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
