Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > smtplib bug with Windows XP

Reply
Thread Tools

smtplib bug with Windows XP

 
 
stewart.midwinter@gmail.com
Guest
Posts: n/a
 
      01-25-2005
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:

>>> s = smtplib.SMTP('10.50.200.6',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:

>>> s = smtplib.SMTP('10.50.200.6',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

 
Reply With Quote
 
 
 
 
Peter Hansen
Guest
Posts: n/a
 
      01-25-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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. <wink>

>>>>s = smtplib.SMTP('10.50.200.6',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')


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
 
Reply With Quote
 
 
 
 
elbertlev@hotmail.com
Guest
Posts: n/a
 
      01-25-2005

> 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.

 
Reply With Quote
 
stewart.midwinter@gmail.com
Guest
Posts: n/a
 
      01-25-2005
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.

 
Reply With Quote
 
Steve Christensen
Guest
Posts: n/a
 
      01-26-2005
In article <(E-Mail Removed) .com>, (E-Mail Removed) wrote:
> 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
 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      01-26-2005
Steve Christensen wrote:
> In article <(E-Mail Removed) .com>, (E-Mail Removed) wrote:
>>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'


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

-Peter
 
Reply With Quote
 
stewart.midwinter@gmail.com
Guest
Posts: n/a
 
      01-26-2005
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

 
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
[SMTPLIB] how to send a "Multiline" mail with smtplib? Evan Python 3 06-23-2008 08:50 AM
*bug* *bug* *bug* David Raleigh Arnold Firefox 12 04-02-2007 03:13 AM
smtplib sendmail problems Hank Python 1 02-09-2004 08:07 PM
SMTPlib Emailing Attachments Bill Python 9 09-20-2003 10:26 AM
smtplib question Garry Hodgson Python 2 09-19-2003 06:33 AM



Advertisments