smtplib bug with Windows XP

S

stewart.midwinter

I'm having problem with a script that used to work under Win2k but is
now broken after an install of WinXP Pro. I can no longer connect to a
local mail server. Has anyone else seen this? If so, were you able to
work around it? Here's the traceback (below). Interestingly, if I
change ports to the POP port 110, I get a different error, but one that
lets me know that I can reach the server.

trying to connect on the SMTP port 25:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Programs\Python24\Lib\smtplib.py", line 241, in __init__
(code, msg) = self.connect(host, port)
File "C:\Programs\Python24\Lib\smtplib.py", line 303, in connect
raise socket.error, msg
socket.error: (10053, 'Software caused connection abort')

trying to connect on POP port 110:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Programs\Python24\Lib\smtplib.py", line 243, in __init__
raise SMTPConnectError(code, msg)
smtplib.SMTPConnectError: (-1, 'Microsoft Exchange 2000 POP3 server
version 6.0.
6249.0 (11exg01.es.int) ready.')

All clues gratefully accepted!
S
 
P

Peter Hansen

I'm having problem with a script that used to work under Win2k but is
now broken after an install of WinXP Pro. I can no longer connect to a
local mail server. Has anyone else seen this? If so, were you able to
work around it? Here's the traceback (below).

The usual first step to troubleshooting such a problem is to
use Telnet to connect manually. Type this "telnet 10.50.200.6 25"
and see what you get. If it appears correct (it helps to know
some of the SMTP protocol: you should get a "220" response here
plus the host's name), type "helo blech.org" or something like
that to see the response. "Help" is usually a valid command
at this point. If you can't do this manually, then smtplib
certainly cannot either.
> Interestingly, if I
change ports to the POP port 110, I get a different error, but one that
lets me know that I can reach the server.

"ping" would let you know you can reach the server as well,
but using SMTP to connect to a POP3 server is perhaps a
somewhat more complicated and hopeless, but interesting
way to do the same thing. said:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Programs\Python24\Lib\smtplib.py", line 241, in __init__
(code, msg) = self.connect(host, port)
File "C:\Programs\Python24\Lib\smtplib.py", line 303, in connect
raise socket.error, msg
socket.error: (10053, 'Software caused connection abort')

Try manually, but think about these options: a firewall that
has suddenly been enabled, an SMTP server that now requires
authentication, some kind of proxy like what virus scanners
use (though why they would intercept outgoing mail I don't
know)...

-Peter
 
E

elbertlev

Try manually, but think about these options: a firewall that
has suddenly been enabled, an SMTP server that now requires
authentication, some kind of proxy like what virus scanners
use (though why they would intercept outgoing mail I don't
know)...

-Peter

I bet it was the firewall on XP.
 
S

stewart.midwinter

thank Peter, elbert, for the suggestions. I hadn't thought of using
telnet to try to connect to the SMTP server. and when I do try, telnet
can't connect either, at least on port 25. On port 110, it has no
problem. So, perhaps the IT people have made some configuration
changes; I'll have a chat with them. I'm relieved that it's not a
Python problem, though.
 
S

Steve Christensen

thank Peter, elbert, for the suggestions. I hadn't thought of using
telnet to try to connect to the SMTP server. and when I do try, telnet
can't connect either, at least on port 25. On port 110, it has no
problem. So, perhaps the IT people have made some configuration
changes; I'll have a chat with them. I'm relieved that it's not a
Python problem, though.

We had similar issues when our systems were upgraded to McAfee VirusScan
8.0. If you're running that locally (on the system trying to connect to
the SMTP server), try disabling the rule in the Access Control dialog
that's labeled 'Prevent mass mailing worms from sending email'


-Steve
 
P

Peter Hansen

Steve said:
We had similar issues when our systems were upgraded to McAfee VirusScan
8.0. If you're running that locally (on the system trying to connect to
the SMTP server), try disabling the rule in the Access Control dialog
that's labeled 'Prevent mass mailing worms from sending email'

How do such tools still allow the sending of valid emails?

-Peter
 
S

stewart.midwinter

it works! you da man!

At the same time as my desktop was upgraded to Windows XP, the IT
people switched virus checker products to McAfee Enterprise. And
indeed, as soon as I disabled that 'mass worm sending' option, my
Python scripts is once again able to send mail.
thanks so much for this tip! 247 karma points for you.

S
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top