Ricardo Kleemann writes:

So this actually works in maildrop:

POST = `/usr/bin/couriermlm msg /path/to/list/directory`

I'm guessing this action must be maintaining the envelope return address.
But the problem I'm having now is that no error msg is getting output to
$POST when a non-member posts. The desired effect still works (the message is not posted) but I'm not able to output an error text and EXITCODE in this
case.

Try capturing both stdout and stderr:

POST = `/usr/bin/couriermlm msg /path/to/list/directory 2>&1`

Oddly enough, it still doesn't work. I have in maildrop,

echo "$POST"

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



Attachment: pgpFqZwyQ9Erw.pgp
Description: PGP signature

-------------------------------------------------------------------------
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

Reply via email to