[Mimedefang] Re: how to undo Verisigns mess
Jeremy Mates
jmates at sial.org
Tue Sep 16 11:17:00 EDT 2003
* John Rowan Littell <littejo at earlham.edu>
> Suggestions for improvement are welcome. I've tested this on a test
> box with success; I have not put it into production on my main
> domain yet.
Excellent...
> $tld = $domain = $address;
> $tld =~ s/.*(\.\w+)$/$1/;
> $domain =~ s/.*[\@\.](\w+\.\w+)$/$1/;
# why munge with s///, when you can extract?
# also, hostnames may contain hypens...
($domain, $tld) = $address =~ /( [\w-]+ (\.\w+) )$/x;
More information about the MIMEDefang
mailing list