On Wed, Sep 02, 2015 at 05:16:13PM +0200, Markus Benning wrote:
> when running multiple checks in a policy daemon each check
> needs to be running on a different port in the policy daemon
> for the policy daemon to be able differentiate between the
> checks when processing the request.
>
> What about adding a "virtual servers" feature to the policy check
> similar to the Host: header in HTTP?
Instead of focusing how you got there (consolidating multiple
instances of the service onto a single port), it makes more sense
to focus on the resulting semantics. Namely, you want to send the
policy service a "query type" or a "context" string so that it can
perform a suitable "lookup".
> The attached patch adds a smtpd_policy_service_vhost option which
> is sent to the policy daemon.
Therefore, don't call this "vhost". something like "query" or
"context" or similar would be better.
> In main.cf:
>
> smtpd_client_restrictions =
> check_policy_service { inet:localhost:12345, timeout=10s,
> default_action=DUNNO, vhost=reputation }
> check_policy_service { inet:localhost:12345, timeout=10s,
> default_action=DUNNO, vhost=accounting }
Otherwise, this interface looks sensible.
--
Viktor.