Why is the relaying flag on transaction level anyway?
I suspect because the only time the code cares about whether this transaction is permitted to relay is at FROM. Once you receive the FROM line, you have all of the information needed to decide whether this e-mail should be relayed. Either
a) the mail will be accepted for local delivery (and it isn't really relaying)
or
b) it will be accepted for later remote delivery (and the simple fact that you continue processing at all means that you have succeeded in the relay test).
So the question is, why do you need to know that the session is b) as opposed to a)? My understanding was that this information was important for certain qmail-queue replacements (like qmail-scanner) but that external code relies on
$ENV{RELAYCLIENT} anyways, so what does tying the relaying flag to session do for you?
John
