The beginning of my Local_check_rcpt looks something like:
SLocal_check_rcpt R$* $: $>3 $1 R$* $: $1 $| $>3 $&f
The input workspace for Local_check_rcpt contains only the recipient. This two rules rewrites the workspace to look something like "recipient $| sender". The remaining rules (not quoted above) than work on this pair, and based on some map lookups the ruleset returns either OK or an error. Very simple.
Thanks.
I probably might have missed them if they exist but are there any for the helo string and client ip/rdns?