smtplib / solaris (newbie problem?)

C

chuck

I've good luck with this on a Linux system (foolproof), and now
I'm trying to get the same thing to run on a Solaris box.
pythonpath, or env or..?

Any help much appreciated. Thanks

Chuck


Python 2.3.2 (#1, Oct 17 2003, 19:06:15) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/smtplib.py", line 240, in __init__
(code, msg) = self.connect(host, port)
File "/usr/local/lib/python2.3/smtplib.py", line 302, in connect
raise socket.error, msg
socket.error: (146, 'Connection refused')
 
S

Steve Holden

I've good luck with this on a Linux system (foolproof), and now
I'm trying to get the same thing to run on a Solaris box.
pythonpath, or env or..?

Any help much appreciated. Thanks

Chuck


Python 2.3.2 (#1, Oct 17 2003, 19:06:15) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/smtplib.py", line 240, in __init__
(code, msg) = self.connect(host, port)
File "/usr/local/lib/python2.3/smtplib.py", line 302, in connect
raise socket.error, msg
socket.error: (146, 'Connection refused')
The problem is almost certainly the simple fact that the machine you
*used* to run on was also running an SMTP server (typically sendmail),
whereas the Solaris box apparently isn't.

If the two machines are on the same network, try replacing "localhost"
with the name, or IP address, of the machine that *did* work.

Otherwise, ask your sysadmin which host you should use as an SMTP server.

regards
Steve
 
C

chuck

Thanks Steve! Your observation was spot-on. Changed to the correct
SMTP
host name, and it's all set.

The error message 'Connection refused' got me thinking that the SMTP
server
wouldn't allow this or required some authentication, or etc.

Chuck
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

The error message 'Connection refused' got me thinking that the SMTP
server wouldn't allow this or required some authentication, or etc.

In case this isn't clear yet: the "connection refused" error happens
in TCP sockets if the remote machine is turned on, but offers no service
at the requested port. To see that in action, try connecting to any
unused port, e.g.

martin@mira:~$ telnet localhost 12354
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

The error message that you get when you *do* connect, but then the
application rejects its service because of missing credentials or
some such should be different.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,631
Members
45,338
Latest member
41Pearline46

Latest Threads

Top