Re: [exim] Wildcard - Reverse DNS ACL

Etusivu
Poista viesti
Vastaa
Lähettäjä: Brian Spraker
Päiväys:  
Vastaanottaja: Heiko Schlittermann, exim-users@exim.org
Aihe: Re: [exim] Wildcard - Reverse DNS ACL
Thank you sir.

That took care of it.  Took a couple hours to get the SQL query and condition figured out but it is now going:

accept
    condition = ${lookup mysql{SELECT domain FROM exim_domain_whitelist WHERE domain='${quote_mysql:${extract{-2}{.}{$sender_host_name}}.${extract{-1}{.}{$sender_host_name}}}'}{1}}





On Monday, February 10, 2014 1:57 PM, Heiko Schlittermann <hs@???> wrote:

Brian Spraker <spraker@???> (Mo 10 Feb 2014 19:59:57 CET):
>
>> >
>> >I have a wildcard match - "*yahoo.com" in the domains whitelist and it doesn't seem to take effect.  Also just tried "yahoo.com" and *.yahoo.com".
>> >
>> >
>> >I used "exim -bh 98.139.213.141" at the command line to do some testing.  I see where exim does the SQL lookup and does the test, but none of them match (since the full reverse DNS of 98.139.213.141 is nm23-vm1.bullet.mail.bf1.yahoo.com).
>> >
>> >In the exim configuration, here is the code used:
>> >
>> >  accept
>> >    hosts = ${lookup mysql{SELECT domain FROM exim_domain_whitelist }}
>
>    ${extract{-2}{.}{$sender_host_name}.${extract{-1}{.}{$sender_host_name}}
>
>
>will give you the 2 rightmosts parts of the host name.
>
>You can construct a SQL query using this expansion. Or if you know
>MySQL, you might use the text functions of mysql to get the two right
>most parts of $sender_host_name.
>
>But, $sender_host_name might be empty if the lookup didn't succeed for
>PTR AND the forward lookup didn't match the address!
>
>    Best regards from Dresden/Germany
>    Viele Grüße aus Dresden
>    Heiko Schlittermann
>--
>SCHLITTERMANN.de ---------------------------- internet & unix support -
>Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
>gnupg encrypted messages are welcome --------------- key ID: 7CBF764A -
>gnupg fingerprint: 9288 F17D BBF9 9625 5ABC  285C 26A9 687E 7CBF 764A -
>(gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B)-
>
>--
>## List details at https://lists.exim.org/mailman/listinfo/exim-users
>## Exim details at http://www.exim.org/
>## Please use the Wiki with this list - http://wiki.exim.org/
>
>