Re: [exim-dev] SMTP PRDR; Exim 4.82

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: exim-dev
Subject: Re: [exim-dev] SMTP PRDR; Exim 4.82
On 2013-01-25 at 11:25 +1000, Ted Cooper wrote:
> On your ordering request I would argue that the current order of PRDR
> then DATA is a better order.
>
> The spam scanning result is cached meaning that if you called it with
> the same options, it would only be run once. Spam scanning can be
> provided different options such a username to source the configuration
> from when called which would then allow different settings/profiles to
> be run for different users/groups.
>
> In short, the existing ordering can run the virus/spam scanning only
> once, or it can be made to run more than once. If the order is reversed,
> the multiple run ability is lost.


No it's not. If you want to run different settings, then you do so. In
the PRDR ACL, where you were before. It just runs after DATA, not
before. It's clearer when the code is put in the repeatedly-run ACL
only if it's to be repeatedly evaluated.

The difference is one of comprehension and debugging; figuring out when
arguments differ, when they don't, teaching people that despite it
looking as though something is being done, it might not be.

If instead there is the _option_ of setting an option and explicitly
using the same value, then people can write cleaner and more
maintainable configurations and we avoid descending into the hell of
certain other MTA's configurations.

Exim's configuration should be readable, and folks should be able to get
the gist of things just by reading things over even before they know
enough to change them.

Simple things simple, complex things possible.

So: DATA is simple, PRDR can modify, and if people really want to
accumulate values across PRDR calls and take some action, per the
PRDR-then-DATA approach, then that's a rare requirement which we can
support by exporting two variables to the ACL, $prdr_index and
$prdr_total -- the counts are known, since the RCPT's have been
received.

The other way around (ie, counters with current ACL ordering) can be
done too, with $prdr_index == 1, or 0 if we count from 0, and we then
fix repeated index start bugs from people on exim-users.

-Phil