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

MacPerl-Digest V1 #30




MacPerl-Digest        Wednesday, March 31 1999        Volume 01 : Number 030



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

----------------------------------------------------------------------

Date: Wed, 31 Mar 1999 22:31:54 +0200
From: Milivoj Ivkovic <mi@alma.ch>
Subject: Re: [MacPerl] Find SMTP Re: [MacPerl] Find SMTP server(s): nslookup?

>> Wouldn't it be nice to have a little file on CPAN or somewhere with the 
>$^O values and operating systems?
>
>  http://pudge.net/macperl/perlport.html

I wasn't aware of this file, and just bookmarked it. It doesn't have a full list of $^O values, but seems to have most, and the file can easily be searched on "$^O" to look it up.

Thank you.

M.


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

------------------------------

Date: Wed, 31 Mar 1999 16:06:34 -0500
From: "Quentin Smith" <macmania@bit-net.com>
Subject: Re: [MacPerl] Find SMTP server(s): nslookup?

>From: Milivoj Ivkovic <mi@alma.ch>
>To: macperl@macperl.org
>Subject: [MacPerl] Find SMTP server(s): nslookup?
>Date: Wed, Mar 31, 1999, 6:34 AM
>

> 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).
haven't tried it
>
> Would some Macs have environment variables like $ENV{MAILHOST} set?
doubt it
>
> 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`?
>
> Or would some Macs have such a command (I read something about Unix tools
> in a new Mac OS)?
the way I get the address of the SMTP hostname is this (it uses
InternetConfig, which has come bundled with the Mac OS since Mac OS 7.6):

use Mac::InternetConfig;
print $InternetConfig{kICSMTPHost};

If you want to send e-mail, then you can just use Net::SMTP, which is in
libnet. It automatically gets the data from InternetConfig, including SMTP
host, SMTP username, SMTP password, and others.
>
>
>
> ===== Want to unsubscribe from this list?
> ===== Send mail with body "unsubscribe" to macperl-request@macperl.org
>
> 

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

------------------------------

Date: Wed, 31 Mar 99 13:19:11 PST
From: pvhp@forte.com (Peter Prymmer)
Subject: Re: [MacPerl] Find SMTP server(s): nslookup?

Chris Nandor wrote:

> While perlport is a good reference, it is not very complete in respect to
> $^O values.  Perhaps it could be, though.

In two different respects.  One would be to try to catalog the cacophony of 
different (unix) $^O values in perlport.  Another approach would be to have 
perl do what tcl now does with a global variable that returns a generic 
'UNIX' 'MAC' or 'WIN'.  I do not recall the name of the tcl variable nor 
do I recall what the exact return values are, but the idea is to have 
something into which broad categories of OS/filesystem code code be 
important.  Thus I could write:

    if ($^OS_CATEGORY eq 'Unix') {
        # Unix code
    }

rather than the unweildly:

    if ($^O eq 'aix' || $^O eq 'dec_osf' || ...) {
        # Unix code
    }

or the more likely:

    {
        # Unix code
    } unless ($^O eq 'MacOS' || $^O eq 'Win32');

I know where this would be better discussed (I also have some tweaks to 
perlport independent of this proposal that I'll send to p5p anyway).

Peter Prymmer


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

------------------------------

End of MacPerl-Digest V1 #30
****************************


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