[issue29860] smtplib.py doesn't capitalize EHLO.

2022-01-18 Thread Irit Katriel


Irit Katriel  added the comment:

It's been 5 years, it's not really a bug, and nobody seems to be interested 
enough to submit a patch so I'm closing this. Feel free to reopen if you want 
to pursue this.

--
nosy: +iritkatriel
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29860] smtplib.py doesn't capitalize EHLO.

2020-12-22 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29860] smtplib.py doesn't capitalize EHLO.

2017-04-04 Thread Maciej Szulik

Changes by Maciej Szulik :


--
nosy: +maciej.szulik

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

Is EHLO the only command sent in lower case?  I think it might not be.

I suppose I'm a solid ±0 on changing this (how's that for a completely neutral 
endorsement?).  I won't do the change myself, but I'd review a pull request.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread R. David Murray

R. David Murray added the comment:

On the other hand, the current mixed case sending found a bug in your code, so 
it has some value.  I'm neither in favor nor in objection to the change, at 
this point.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread Lord Anton Hvornum

Lord Anton Hvornum added the comment:

Seeing as I'm the one who built the server, it sure is out of spec :)

I could also quickly correct for this "issue" server-side.
So this is more of a "style guideline" change client-side - If no one opposes 
of keeping commands stylistically the same.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread R. David Murray

R. David Murray added the comment:

It is interesting that in all the years smtplib has been in use, this is the 
first time (as far as I know) this has been reported as a problem.  I don't see 
any reason to object to changing it to send the commands in upper case, but the 
server you are talking to is definitely out of spec with the RFC :)

--
components: +email
nosy: +barry, r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread Lord Anton Hvornum

Lord Anton Hvornum added the comment:

Turns out, this goes for a lot more commands, such as:

```
Traceback (most recent call last):
  File "mail.py", line 12, in 
smtp_server.sendmail(fromaddr, toaddrs, msg)
  File "/usr/lib/python3.6/smtplib.py", line 866, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
```

The command that the server refused was:

mail FROM: size=11

Again, this is mostly because traditionally server commands are upper case 
(even tho RFC 821 defines that they can be any syntax, such as `mAiL FroM`).

But it would be nice if Python could keep consistency in it's syntax IMHO.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread Lord Anton Hvornum

New submission from Lord Anton Hvornum:

```
  File "mail.py", line 9, in 
smtp_server.starttls(context)
  File "/usr/lib/python3.6/smtplib.py", line 748, in starttls
self.ehlo_or_helo_if_needed()
  File "/usr/lib/python3.6/smtplib.py", line 600, in ehlo_or_helo_if_needed
(code, resp) = self.helo()
  File "/usr/lib/python3.6/smtplib.py", line 429, in helo
(code, msg) = self.getreply()
  File "/usr/lib/python3.6/smtplib.py", line 393, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
```

This happens due to the server expecting commands (like EHLO, STARTTLS) being 
strict upper-case. And when the SMTP command isn't, it drops us.

This is a rare edge case since most mail servers handles shady client data in 
numerous different ways (such as gmail never sending QUIT for instance).

I don't know of a work-around for this and the documentation states `EHLO` is 
being sent (https://docs.python.org/3/library/smtplib.html), so I guess the lib 
assumes that's the case as well.

--
components: Library (Lib)
messages: 289886
nosy: Lord Anton Hvornum
priority: normal
severity: normal
status: open
title: smtplib.py doesn't capitalize EHLO.
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com