Date: Mon, 1 Jun 1998 23:20:34 +0200 (CEST) From: Leif Neland <root@internet.dk> To: Studded <Studded@san.rr.com> Cc: leifn@internet.dk, questions@FreeBSD.ORG Subject: Re: perl, MX lookup Message-ID: <Pine.BSF.3.96.980601231752.283A-100000@darla.swimsuit.internet.dk> In-Reply-To: <35719989.A1F48A75@san.rr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 31 May 1998, Studded wrote:
> Leif Neland wrote:
> >
> > In a perlscript, I can use gethostbyname to check if a given host exists.
> >
> > But how can I check if there exists a MX-record for a given host?
> > I probably could system("host -t MX $host"), but I'd rather have a
> > "native" perl solution.
> >
> > (I want to check in a script if an email-adress contains a valid hostpart)
>
> Keep in mind that the abscence of an MX record doesn't make a hostname
> an invalid delivery address. The default (which is quite servicable in
> most cases) is to attempt delivery to the A address.
Yep. But my attempt with gethostbyname required the host-part of the
email-adress to have an IP-adress. It worked with the adresses I tested,
but then my boss tested with his own domain, which only had an MX, so my
test failed. Bummer...
leifn@internet.dk
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980601231752.283A-100000>
