Re: [exim] match_domain from mysql lookup

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: guard
Dátum:  
Címzett: W B Hacker
CC: exim users
Tárgy: Re: [exim] match_domain from mysql lookup


On Mon, 27 Nov 2006, W B Hacker wrote:

> guard wrote:
>> Hello,
>> is any way to match_domain from mysql query?
>
> You may not need or want to use them together.
>
> Either one can probably do what you need w/o the other.
>
>> Query returns many domains like:
>> domain1.tld
>> *.tld
>> etc.
>> how can I match it?
>
> Given that you haven't shown us the code you are having trouble with, nor
> described where used, what you seek, how the MySQL DB is structured...?
>
> 'bout all that can be said is 'with a more specific SQL query'
>
>> Or should I use external script?
>
> Depending on what you are trying to accomplish and what information you have
> available, you might use an SQL DB, a DB, CDB, flat file, hostlist...
>
> An external script is probably not required even if you are seeking to do
> something unusual.


Well, I want to check if $sender_address_domain is in blacklist in DB.
I tring to:
       condition =  ${if match_domain {$sender_address_domain}{${lookup mysql{SELECT mail_blacklist
                         FROM mail_blacklist WHERE
                         username='$local_part'}}} }