Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Mail::Sendmail cannot connect to localhost but the mail command can

Reply
Thread Tools

Mail::Sendmail cannot connect to localhost but the mail command can

 
 
Andres Monroy-Hernandez
Guest
Posts: n/a
 
      06-27-2003
Hello,
I have a script that uses Mail::Sendmail, this script works just fine
in 4 different boxes (RedHat and Solaris).

Nevertheless, there is this Solaris machine where it doesn't work, and
this is the error I get in the $Mail::Sendmail::error variable:

connect to localhost failed (Connection refused)

The thing that puzzles me, is that in the same machine, the mail
command works just fine.

<snipet>
39 sfx@et2:ver_2> mail http://www.velocityreviews.com/forums/(E-Mail Removed)
testing
..
</snipet>

As far as I know, mail tries to send emails via the localhost SMTP
just as Mail::Sendmail does.

I also tried changing the host name in Mail::Sendmail from localhost
to the server's IP and host name, but it didn't work either.

Any comments are appreciated.

-Andrés
 
Reply With Quote
 
 
 
 
Tony Curtis
Guest
Posts: n/a
 
      06-27-2003
>> On 27 Jun 2003 16:52:32 -0700,
>> (E-Mail Removed) (Andres Monroy-Hernandez) said:


> Hello, I have a script that uses Mail::Sendmail, this
> script works just fine in 4 different boxes (RedHat and
> Solaris).


> Nevertheless, there is this Solaris machine where it
> doesn't work, and this is the error I get in the
> $Mail::Sendmail::error variable:


> connect to localhost failed (Connection refused)


> The thing that puzzles me, is that in the same machine,
> the mail command works just fine.


> <snipet> 39 sfx@et2:ver_2> mail (E-Mail Removed)
> testing . </snipet>


This just requires a locally installed sendmail (or some
other MTA like postfix) into which mail/mailx can inject
the message. It doesn't require an SMTP service.

I'd wager there's an SMTP server running on all the other
machines (probably sendmail -bd) but not on this one, or
the other boxes are configured as clients to a local mail
hub, and this one isn't.

(If so, we've wandered out of perl territory. You
probably want to take a step back and re-think your local
mail setup first.)

hth
t
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I CAN connect socket to any localhost port but I shouldn't be able to qvx Python 2 07-30-2008 07:02 AM
Can connect to wireless but can not connect to internet Lucy Wireless Networking 2 09-23-2006 11:47 AM
Can connect to wireless but can not connect to internet Lucy Wireless Networking 0 09-22-2006 11:52 AM
Can connect to wireless but can not connect to internet Lucy Wireless Networking 0 09-22-2006 11:03 AM
Can I Reset the Root from localhost/myproject/ to localhost/ Alex ASP .Net 4 02-08-2005 01:45 PM



Advertisments