[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Find SMTP server(s): nslookup?



At 06.34 -0500 1999.03.31, Milivoj Ivkovic wrote:
>Now that I have the hostname, I can go on to the real purpose of this: try to
  find an SMTP server nearby.
>
>Of course, I'll check Net::Config and try to connect to localhost on port 25.
  But what else can I do?
>
>Does Net::DNS work on Macs? (It doesn't on Win95).

I would tell you to try checking CPAN Testers, but perl.org is down.  :/

Normally, though, the first thing that you should check when wondering if a
module works on a platform is CPAN Testers.

    http://www.perl.org/cpan-testers/

If a module requires building or porting for MacPerl, the next thing you
should check is MMP (MacPerl Module Porters):

    http://pudge.net/mmp/


ANYWAY ... I just tested it and it passed all tests on my Mac.  I'll submit
a report to CPAN Testers later if one is not already there.


>Would some Macs have environment variables like $ENV{MAILHOST} set?

Doubtful.  Just use Net::Config; it will usually work, and contain the
user's preference.  In MacPerl, it is magical by default.

Net::Config comes with MacPerl and is set to get the user's preference from
Internet Config (MacPerl comes with IC) ... so if the user has IC set up
(which most users do these days), then this will have the proper value by
default.

Some users who don't like IC or want a different value will hardcode
another value in there, but either way, it will work.


>And of course, I would like to find the MX records for the local domain.
>WinNT
  and Linux are easy: `nslookup ....`. What about Macs? Would it have
  implemented `nslookup` as with `hostname`?

Well, since Net::DNS seems to work, I guess you could use Net::DNS for MX
records, right?  I've not looked much at it.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org