Re: [exim] Feature Needed - Main_domain

Pàgina inicial
Delete this message
Reply to this message
Autor: Marc Perkel
Data:  
A: Alun
CC: exim-users
Assumpte: Re: [exim] Feature Needed - Main_domain


Alun wrote:

>Marc Perkel <marc@???> said, in message
>432E4B47.9070409@???:
>
>
>
>>New revised code at bottom.
>>
>>If the part second to the end is co com net org then it's 3 part.
>>
>>
>
>Where should news.com.com be split up?
>
>

com.com

>What would you want for www.aber.ac.uk?
>
>

aber.ac.uk

>How about www.alumni.aber.ac.uk?
>
>

aber.ac.uk

>Or something.demon.co.uk?
>
>

demon.co.uk

How many can there be? It may take a table ot DB file to pull it off but
I don't think that it would be much more than 100 entries.

>Determining a suitable subdomain is a black art. I tried it a few
>years ago for spam reporting (back when it was actually useful to
>do such). Best I could do was something like (feel free to criticise!):
>
>function maildomain(name)
>{
>    domain = ""
>    mx = ""

>
>    # Find longest "domain" part which has an MX lookup.
>    while (name <> "")
>    {
>        mx = mx lookup for name
>        if (mx <> "")
>        {
>            domain = name
>            break;
>        }
>        strip first component from name
>    }

>
>    # Find shortest "domain" part which has the same MX lookup.
>    while (name <> "")
>    {
>        mx2 = mx lookup for name
>        if (mx2 == mx)
>        {
>            domain = name
>        }
>        else
>        {
>            break;
>        }
>        strip first component from name
>    }
>    return domain
>}

>
>Cheers,
>Alun.
>
>
>
>


--
Marc Perkel - marc@???

Spam Filter: http://www.junkemailfilter.com
    My Blog: http://marc.perkel.com