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

Re: [MacPerl] Net::SMTP and Mail::Internet->smtpsend in MacPerl



At 14.19 -0500 1999.02.16, Christian Schaller wrote:
>If I use Net::SMTP and leave debugging off (again, in the construction
>of the object), then when I send the mail, there's a longish delay on
>the order of maybe thirty seconds.
>
>If I use Mail::Internet->smtpsend, the same longish delay appears.

>I'm running MacPerl on a G3 that sits beside an older PPC on which
>my SMTP server (EIMS) lives. They're connected via an ethernet pipe
>that can deliver up to 500kbps between the two machines.
>
>Any thoughts on this matter? Why the delay? How can I minimize it without
>using Net::SMTP's debugging? (And can I get Net::SMTP to take embellished
>e-mail addresses?)

Hm.  Well, let me ask you, does your machine have a name in any DNS, or
just a numeric IP address?  If the latter, I wonder if Net::SMTP uses
Net::Domain.  I bet it does for the HELO command.  Yep,
Net::Domain::hostfqdn().  If you have a numeric IP, try doing what I put in
this post a couple weeks ago:

# I sent this to Graham Barr for inclusion awhile back, and I expect it in
# the next revision, but if you use some Perl modules that try to get a
# hostname that uses Net::Domain, and you don't have a name but only an IP
# address, it can take forever and a day for Net::Domain::domainname to
# fail. So I put this on line 218 of Net::Domain 2.09:
#
#     return $fqdn = $host if ($host =~ /\./ && $host =~ /^[\d.]+$/);
#
# I was just reminded of this again while using the CPAN Testers script (I am
# rewriting it to work as a droplet, with MacPerl prompts instead of
# text-based prompts ... this is going to be so easy you'll have no reason
# NOT to be a CPAN Tester!).  I had overwritten my changed version when
# getting the latest libnet.
#
# If you have a name for your computer when connected to the Internet, you
# are fine.  But I in an internal network usually, and just have a numeric
# IP address.

Note, hostfqdn() calls domainname(), which is where the problem is.

--
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 mac-perl-request@iis.ee.ethz.ch