Re: [Django] #13142: Add support for SSL connections in core.mail.backends.smtp

14 views
Skip to first unread message

Django

unread,
Dec 23, 2011, 4:09:10 PM12/23/11
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
---------------------------------+------------------------------------
Reporter: serg.partizan@… | Owner: nobody
Type: New feature | Status: new
Component: Core (Mail) | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Wojciech Banaś <fizista@…>):

* cc: fizista@… (added)
* needs_docs: 1 => 0
* ui_ux: => 0
* easy: => 1
* needs_tests: 1 => 0


Comment:

Tested patch for python version 2.6. Has been added documentation and
default settings.

--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 23, 2011, 4:18:14 PM12/23/11
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
---------------------------------+------------------------------------
Reporter: serg.partizan@… | Owner: nobody
Type: New feature | Status: new
Component: Core (Mail) | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Wojciech Banaś <fizista@…>):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:9>

Django

unread,
Feb 4, 2012, 6:38:16 AM2/4/12
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
---------------------------------+------------------------------------
Reporter: serg.partizan@… | Owner: nobody
Type: New feature | Status: new
Component: Core (Mail) | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by chomik):

* needs_tests: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:10>

Django

unread,
Feb 5, 2012, 7:21:17 AM2/5/12
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
-------------------------------------+-------------------------------------
Reporter: serg.partizan@… | Owner: nobody
Type: New feature | Status: new
Component: Core (Mail) | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 1 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jezdez):

* stage: Accepted => Ready for checkin


Comment:

The docs need info about when the setting was added, but other than that
this looks good to me.

--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:11>

Django

unread,
Feb 10, 2012, 6:53:09 PM2/10/12
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
-------------------------------------+-------------------------------------
Reporter: serg.partizan@… | Owner: nobody
Type: New feature | Status: new
Component: Core (Mail) | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 1 | Needs documentation: 1
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by PaulM):

* needs_docs: 0 => 1


Comment:

I'm going to leave this at RFC, but with the caveat that the docs MUST
make it EXTREMELY clear that this setting does not do any form of
certificate checking whatsoever. The communications are encrypted over the
wire, but an active attacker can snoop on the contents.

It would be nice to have certificate checking, but it's a difficult
problem, so I'm ok with adding the feature as-is since it's an
interoperability issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:12>

Django

unread,
Feb 11, 2012, 6:52:53 PM2/11/12
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
---------------------------------+------------------------------------
Reporter: serg.partizan@… | Owner: nobody
Type: New feature | Status: new
Component: Core (Mail) | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by ramiro):

* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted


Comment:

I agree with Karen here. If the Python version in use (< 2.6) is such that
no SSL support exists in the `smtplib`library and the user has requested
it with `settings.MAIL_USE_SSL = True` then the code should **refuse** to
work at deployment time and should show some kind of explanation about the
reason.

Otherwise with the latest patch, the user might erroneously think
connections to the SMTP server are SSL-encrypted when they fact aren't;
giving he/she a false sense of security.

I'm going to move this back to accepted/patch needs improvement. Please
move it back to RFC if I'm misunderstanding things.

--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:13>

Django

unread,
Sep 7, 2012, 2:24:09 PM9/7/12
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
---------------------------------+--------------------------------------
Reporter: serg.partizan@… | Owner: jwmayfield
Type: New feature | Status: assigned
Component: Core (Mail) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by jwmayfield):

* owner: nobody => jwmayfield
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:14>

Django

unread,
Sep 7, 2012, 3:40:47 PM9/7/12
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
---------------------------------+--------------------------------------
Reporter: serg.partizan@… | Owner: jwmayfield
Type: New feature | Status: assigned
Component: Core (Mail) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by jwmayfield):

* cc: jason@… (added)


Comment:

https://github.com/django/django/pull/347

Fixed #13142 -- Added support for SSL connections in
core.mail.backends.smtp

Note: SVN-based patch originally provided by serg.partizan / partizan and
Wojciech Banaś in Trac (refer to
https://code.djangoproject.com/ticket/13142). (Patch didn't apply cleanly
for me.)

This commit includes the work done by those previous, with the following
changes:

* If use_ssl is True, or settings.EMAIL_USE_SSL is True, but the current
Python version is less than 2.6, use_ssl is not internally changed to
False. Nor does the SMTP backend code raise an exception. We don't need
to, because Django 1.5 is dropping support for Python prior to 2.6.

* This update provides the ability to configure the keyfile and certfile
to use with SMTP_SSL.

* Documentation is updated to specify that this feature is new in 1.5.

--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:15>

Django

unread,
Sep 7, 2012, 5:17:14 PM9/7/12
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
---------------------------------+--------------------------------------
Reporter: serg.partizan@… | Owner: jwmayfield
Type: New feature | Status: assigned
Component: Core (Mail) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by jwmayfield):

* needs_docs: 1 => 0
* needs_tests: 1 => 0

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:16>

Django

unread,
Dec 30, 2012, 6:59:37 AM12/30/12
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
---------------------------------+--------------------------------------
Reporter: serg.partizan@… | Owner: jwmayfield
Type: New feature | Status: assigned
Component: Core (Mail) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by apollo13):

* needs_better_patch: 0 => 1


Comment:

See my notes on the PR:
https://github.com/django/django/pull/347#issuecomment-8599632

--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:17>

Django

unread,
Jul 12, 2013, 11:29:20 AM7/12/13
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
---------------------------------+--------------------------------------
Reporter: serg.partizan@… | Owner: jwmayfield
Type: New feature | Status: assigned
Component: Core (Mail) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by timo):

#17471 is a duplicate which was recently committed but lacks the cert/key
file setting options in the PR.

--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:18>

Django

unread,
Jul 12, 2013, 2:46:28 PM7/12/13
to django-...@googlegroups.com
#13142: Add support for SSL connections in core.mail.backends.smtp
---------------------------------+--------------------------------------
Reporter: serg.partizan@… | Owner: jwmayfield
Type: New feature | Status: closed

Component: Core (Mail) | Version: master
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by claudep):

* status: assigned => closed
* resolution: => duplicate


Comment:

I opened a new ticket dedicated to the keyfile/certfile issue: #20743

--
Ticket URL: <https://code.djangoproject.com/ticket/13142#comment:19>

Reply all
Reply to author
Forward
0 new messages