[exim-dev] [Bug 518] New: Expanding the definition of domain…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: bug518
Date:  
À: exim-dev
Sujet: [exim-dev] [Bug 518] New: Expanding the definition of domain:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=518

           Summary: Expanding the definition of domain:
           Product: Exim
           Version: N/A
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: wishlist
          Priority: medium
         Component: ACLs
        AssignedTo: ph10@???
        ReportedBy: marc@???
         QAContact: exim-dev@???



Normally domain: returns the part of the email address after the @ in an email
address. I'd like to see this command expanded (or - a new command) that would
return the domain part of a hostname.

thus ${domain:xxx.yyy.exim.org} would return "exim.org"

Ideally if you passed an IP address it would do a reverse lookup and return the
domain part.

${domain:69.50.231.8} returns "junkemailfilter.com"

Here's how you could do it without having to use tables. You start at the end
of the host string and go backwards looking up strings for IP addresses. When
you get an IP then you have the domain part. For example:

82-46-151-246.cable.ubr04.perr.blueyonder.co.uk

You look up in this order

uk
co.uk
blueyonder.co.uk - HIT!

Of course you could skip the first lookup an have a small table of common TLD's
to speed things up.

This feature would be really useful. I'm building an automated whitelisting
system and I need the domain part of a host name. Would really appreciate it if
you could put this in.

--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email