Issue 16462: smtpd should return greeting (original) (raw)

Created on 2012-11-12 15:08 by mike.a, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (9)
msg175451 - (view) Author: (mike.a) Date: 2012-11-12 15:08
The greeting value is required by SPF, and should be returned by SMTPChannel. This would involve a simple fix by adding self.__greeting to the list of returned values in the status object
msg175452 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2012-11-12 15:24
Mike, could you possibly elaborate more?. I don't understand your bug report. BTW, Python 2.6 is open only for security bugfixes. Python 2.7, 3.2 and 3.3 are currently open for regular bugfixes.
msg175454 - (view) Author: (mike.a) Date: 2012-11-12 15:36
The greeting value is the HELO/EHLO identity. RFC 4408 (SPF) recommends checking both the mail from domain as well as the HELO identity, so this value is useful and could be passed to proc_message() function (API for "doing something useful with this message"). Later versions of the code pass the same values, so this is relevant for 2.7, 3.2, and 3.3.
msg175457 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-11-12 15:50
Are you asking to have seen_greeting passed in the server.process_message call? That is reasonable.
msg175458 - (view) Author: (mike.a) Date: 2012-11-12 15:53
David, Yes, that is what I am asking. Thanks, -Mike
msg175460 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-11-12 16:06
On the other hand, it would also be backward incompatible. Can anyone think of a backward compatible way to provide this info? Maybe we could use the new signature object support.
msg176432 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2012-11-26 17:35
The trivial approach would be to add a new "set_helo_string()" method to "SMTPServer" class, and be called before "process_message()". User subclasses would be inherit it.
msg275130 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-09-08 19:55
If someone wants to write a patch for this, we now require (unless you set decode_data to False) that process_message take a **kw dict, so we can pass the greeting in that dict.
msg309745 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2018-01-10 00:49
I'm closing this as won't fix since smtpd.py is deprecated and likely won't see any fixes. Please take a look at aiosmtpd as a much better third party replacement.
History
Date User Action Args
2022-04-11 14:57:38 admin set github: 60666
2018-01-10 00:49:01 barry set status: open -> closedresolution: wont fixmessages: + stage: resolved
2016-09-08 19:55:14 r.david.murray set messages: + versions: + Python 3.7, - Python 3.4
2015-03-07 15:17:05 Håkan Lövdahl set nosy: + Håkan Lövdahl
2013-11-20 10:54:06 lpolzer set nosy: + lpolzer
2012-11-26 17:35:48 jcea set messages: +
2012-11-12 16:06:11 r.david.murray set versions: + Python 3.4, - Python 2.6
2012-11-12 16:06:02 r.david.murray set messages: +
2012-11-12 15:53:58 mike.a set messages: +
2012-11-12 15:50:18 r.david.murray set versions: + Python 2.6, - Python 3.1, Python 2.7, Python 3.2, Python 3.3nosy: + barry, r.david.murraymessages: + components: + email
2012-11-12 15:36:51 mike.a set messages: + versions: + Python 3.1, Python 2.7, Python 3.2, Python 3.3, - Python 2.6
2012-11-12 15:24:23 jcea set nosy: + jceamessages: +
2012-11-12 15:08:11 mike.a create