Re: [Exim] combined conditional statements

Pàgina inicial
Delete this message
Reply to this message
Autor: Rick Cooper
Data:  
A: exim-users
Assumpte: Re: [Exim] combined conditional statements
I use something similar to check and see if there is a valid sender domain
and MX record because I would rather deny at rcpt rather than bounce on
delivery

deny message = Bad E-Mail Address $local_part@$domain!\n \
               Cannot Find Mail Domain: $domain, or MailHost Record For: \
               $domain in DNS search.\n Check The Email Address and Try
Again
    domains = !+local_domains
    set acl_c4 = ${lookup dnsdb{a=$domain}{$value}{NO-A-RECORD-FOUND}}
    set acl_c5 = ${lookup dnsdb{mx=$domain}{$value}{NO-MX-RECORD-FOUND}}
    condition = ${if and {\
                    {eq {$acl_c4}{NO-A-RECORD-FOUND}}\
                    {eq {$acl_c5}{NO-MX-RECORD-FOUND}}\
                    }\
                    {yes}{no}}

 but I would think


    condition = ${if or {\
                    {eq {${lookup dnsdb{a=$domain}{$value}{NONE}}}{NONE}}\
                    {eq {${lookup dnsdb{mx=$domain}{$value}{NONE}}}{NONE}}\
                    }\
                    {yes}{no}}

will work, but I would still make that ${if and{\  if you are looking for a
way to check for undeliverables

Rick Cooper
-------Original Message-------

> From: Robert Buecker
> Date: Tuesday, July 22, 2003 9:07:18 PM
> To: exim-users@???
> Subject: [Exim] combined conditional statements
>
> Can anyone who understands Exim help me with the following condition I
> am trying to set up:
>
> condition = ${if or { ${lookup dnsdb
> {mx=$sender_address_domain}{1}{0}} } { ${lookup dnsdb {a=
> $sender_address_domain}{1}{0}} } }
>
>
> What I am not looking for is verify = sender. I have tried murderous
> amounts of variations on the above condition, and have used exim -bh
> extensively during my glorious failures. I can get one or the other to
> work, but not both (being mx or a).
>
> Thanks,
> Robert
>