smtplib bug with Windows XP

Discussion in 'Python' started by stewart.midwinter@gmail.com, Jan 25, 2005.

  1. Guest

    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
    , Jan 25, 2005
    #1
    1. Advertising

  2. Peter Hansen Guest

    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
    Peter Hansen, Jan 25, 2005
    #2
    1. Advertising

  3. Guest


    > 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.
    , Jan 25, 2005
    #3
  4. Guest

    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.
    , Jan 25, 2005
    #4
  5. In article <>, 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
    Steve Christensen, Jan 26, 2005
    #5
  6. Peter Hansen Guest

    Steve Christensen wrote:
    > In article <>, 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
    Peter Hansen, Jan 26, 2005
    #6
  7. Guest

    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
    , Jan 26, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bill

    SMTPlib Emailing Attachments

    Bill, Sep 17, 2003, in forum: Python
    Replies:
    9
    Views:
    760
    Rudy Schockaert
    Sep 20, 2003
  2. Garry Hodgson

    smtplib question

    Garry Hodgson, Sep 17, 2003, in forum: Python
    Replies:
    2
    Views:
    351
    Tim Roberts
    Sep 19, 2003
  3. Hank

    smtplib sendmail problems

    Hank, Feb 5, 2004, in forum: Python
    Replies:
    1
    Views:
    434
    Peter Hansen
    Feb 9, 2004
  4. Jeff Sandys

    subject with smtplib?

    Jeff Sandys, Feb 23, 2004, in forum: Python
    Replies:
    1
    Views:
    4,822
    Dennis Lee Bieber
    Feb 24, 2004
  5. Evan
    Replies:
    3
    Views:
    470
Loading...

Share This Page