Re: [exim] Detecting the domain part of a host address

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Marc Perkel
Data:  
Para: exim-users
Assunto: Re: [exim] Detecting the domain part of a host address


John Burnham wrote:
>> What I want is to extract the cam.ac.uk part of the above names. It's
>> the TLD + the first string immediately before the TLD.
>>
>>
> Which may or may not give you what you want - they could all be run by
> independent people. I guess it depends on what you want to do with the domain.
> John
>
>


OK let me rephrase the question. What I want is to start with a
$sender_host_name and get a string that ends with the TLD and is
preceded by the next string back to the period.

In this example:

mx.cam.ac.uk
virgo.cus.cam.ac.uk
ewe.damtp.cam.ac.uk


All of these would return cam.ac.uk

I don't care to argue about why I want it. I just want it. I just want
the next part before the TLD.