Auteur: Daniel Aquino Date: À: exim-users, Daniel Aquino Sujet: Re: [exim] Recipient Checking
> On 2007-12-12 at 03:14 -0500, Daniel Aquino wrote: > I'm looking for a simple way to do recipient checking against my own
> external daemon. > On Dec 12, 2007 3:48 AM, Phil Pennock <exim-users@???> wrote:
> You almost had it.
>
> You can use an "accept" Router with "verify_only" on it, with
> ${readsocket}. Untested:
>
> verify_against_my_funky_daemon:
> driver = accept
> verify_only
> domains = +local_domains
> condition = ${readsocket{/path/to/socket}{$local_part@$domain}}
>
> The socket response should be 'yes' or some other Exim true value.
>
> No transport required because it's only used for verification.
>
> The documentation on the ${readsocket} expansion item explains the
> tuning you can do; eg, changing response timeout.
>
I'm using the following router to do some initial testing.
checkuser:
driver = accept
condition = ${readsocket{/usr/local/mail/sock/recipient}{$local_part@$domain\n}}
transport = local_delivery
cannot_route_message = Unknown user
My daemon is responding with true/false and ascii char 26 which is eof
as the docs for ${readsocket} explain.
I also tried with \n
Yet when it appears to accept the recipient even when I send false!
Simple testing with the following appears to work correctly: