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

Top Page
Delete this message
Reply to this message
Author: John Burnham
Date:  
To: exim-users
Subject: Re: [exim] Detecting the domain part of a host address
> 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


No, it wouldn't. The TLD is uk. The string that ends with the TLD and is
preceded by the next string back to the period is 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.
>

You, sir, are becoming awfully rude for someone requesting help.
John