Re: [exim] Populate a local recipient array from MySQL

Pàgina inicial
Delete this message
Reply to this message
Autor: Rick Duval
Data:  
A: exim-users, Rick Duval
Assumpte: Re: [exim] Populate a local recipient array from MySQL
If I populate "local_domains" with full addresses like
"joe@???" instead of just domains like "example.com" will the
statement

require message = relay not permitted
          domains = +local_domains


compare the whole email address or only the domain portion?

I'd assume (and perhaps wrongly) that the "domain=" part is expecting
only domains?

On Wed, Nov 19, 2008 at 12:39 AM, Phil Pennock <exim-users@???> wrote:
> On 2008-11-18 at 21:46 -0500, Rick Duval wrote:
>> The thing is that this is a pass thru spam filter so no users actually
>> exist. I just want to check incoming mail against the MySql Database.
>>
>> Currently acceptance of emails is accomplished through populating the
>> "local_domains" list from the MySQL db with the statement
>>
>> "domainlist local_domains = ${lookup mysql {SELECT DISTINCT domain
>> FROM domains WHERE Enabled = 1 and domain='${quote_mysql:$domain}'}} "
>>
>> But I'm not aware of a way to do the same thing with an entire email address.
>
> Where you currently have "domains = +local_domains" on some number of
> Routers, you should be able to instead have:
>
>  condition = ${lookup mysql {SELECT DISTINCT user,domain FROM whatever \
>                WHERE Enabled = 1 and domain='...' and user='...'}\
>                {true}{false}}

>
> Note that ${lookup...} takes optional extra parameters so that instead
> of the $value from the actual lookup, you can use different results for
> the match-found and no-match-found cases.
>
> Alternatively, you can use a localpartlist with a name of your choice
> and add a local_parts restriction to the Router(s).
>
> -Phil
>
> --
> This message has been scanned for
> viruses and dangerous content by
> Accurate Anti-Spam Technologies
> and is believed to be clean.
>
>