Re: [exim] Recipient verify only for non-authenticated users

Top Page
Delete this message
Reply to this message
Author: Colin
Date:  
To: exim-users
Subject: Re: [exim] Recipient verify only for non-authenticated users

On 27/10/2011 11:52, W B Hacker wrote:
> This won't break anything:
>
> =====
>
> # XSR Static route test
> #
> #deny
> warn
>
> logwrite = entering XSR test
> condition  =  ${if eq {1}{${lookup{$domain}lsearch \
>         {/etc/staticroutes}{1}{0}}}}
> !condition = verify recipient/callout=30s,defer_ok,use_sender
> log_message = XSR found $domain in static route file

>
> =====
>

Unfortunately it does break things. As with the other attempt apparently
verify recipient cannot be used as a condition and thus all messages
fail with a temporary local problem error.

I've had some time to check things out and the working solution is as
follows:

deny
        condition  =  ${if eq {1}{${lookup{$domain}lsearch \
                        {/etc/staticroutes}{1}{0}}}}
        !verify = recipient/callout=30s,defer_ok,use_sender
        log_message = $local_part@$domain : Recipient verify failed in 
staticroute file


I wanted to use the message ID instead of local_part@domain but couldn't
find a working variable for it. I saw some docs saying $message_id and
others saying $message_exim_id but neither worked.

I'll leave you good folks to the rest of your discussions that seem to
have come about!

Thanks for the help, I'll try not to have anything else that needs
setting up properly; I've had far too many things give me grief lately!

Best Regards,
Colin.