[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread R. David Murray
R. David Murray added the comment: Contributor agreement is here: http://python.org/psf/contrib/contrib-form-python/ ACKS file ships in every Python source tarball (not sure if goes out in the binary ones). Here it is in the repository: http://hg.python.org/cpython/file/default/Misc

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Jason Killen added the comment: Thanks and thanks for all you help. My method names are known to need some tweaking. Where is the agreement I need to sign? I looked around the documentation stuff and didn't see it. I'd like to continue contributing just have to find another bug I know how

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread R. David Murray
R. David Murray added the comment: I tweaked a couple more of your test method names, but otherwise used your patch as is. Welcome to the ACKS file :) If you haven't already submitted a contributor agreement it would be great if you did. I'm hoping you'll want to continue making contributio

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 241c33b6cb95 by R David Murray in branch 'default': #14269: smtpd now conforms to the RFC and requires HELO before MAIL. http://hg.python.org/cpython/rev/241c33b6cb95 -- nosy: +python-dev ___ Python trac

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Jason Killen added the comment: Removed '_syntax' apparently I fix that before but didn't regen the patch. Added tests for noHELO before some commands to test that failures happen as expected. -- Added file: http://bugs.python.org/file24973/test_smtpd.patch __

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread R. David Murray
R. David Murray added the comment: I think we're close. You new test 'test_HELO_RSET_syntax' should be named just 'test_HELO_RSET'. And could you please add tests for RCPT and DATA generating the 'no HELO' error? Thanks. -- ___ Python tracker

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Jason Killen added the comment: Yes, "either way" in the test. The server shouldn't expect them and the client can do it either way. I'm adding a patch that tests with and without HELO for those commands that can be sent either way. -- Added file: http://bugs.python.org/file24972/te

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread R. David Murray
R. David Murray added the comment: If you mean "either way in the test", that's true. But what we need to test is that the smtpd server we are providing matches the spec, which means that we need to confirm that it does *accept* QUIT, NOOP, etc without a previous HELO. Also testing that it

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Jason Killen added the comment: Ok I think this quote from the spec referenced pretty much sums it up. "The NOOP, HELP, EXPN, VRFY, and RSET commands can be used at any time during a session, or without previously initializing a session. SMTP servers SHOULD process these normally (that

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Changes by Jason Killen : Added file: http://bugs.python.org/file24969/smtpd.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Changes by Jason Killen : Removed file: http://bugs.python.org/file24968/smtpd.py ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Changes by Jason Killen : Added file: http://bugs.python.org/file24968/smtpd.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Changes by Jason Killen : Removed file: http://bugs.python.org/file24949/test_smtpd_nogo.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Changes by Jason Killen : Removed file: http://bugs.python.org/file24826/smtpd_nogo.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Changes by Jason Killen : Removed file: http://bugs.python.org/file24948/smtpd_nogo.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Jason Killen added the comment: smtpd.py does not require HELO before NOOP or QUIT. I added them to test_smtpd.py because I felt it made test_smtpd.py well written as opposed to doing the least the spec requires. That said I suppose I should have added QUITs to every test also if that's the

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread R. David Murray
R. David Murray added the comment: Hmm. I'm certain that QUIT shouldn't require HELO, and I wouldn't expect that NOOP would either. I just checked the RFC. The *only* command that requires HELO/EHLO is MAIL (and by implication RCPT, since it in turn requires MAIL). See http://tools.ietf.

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-20 Thread Jason Killen
Jason Killen added the comment: I'm adding a patch for test_smtpd.py. This version includes the changes in my previous patch and adds sending HELO before the commands in the test. Works good for me. -- Added file: http://bugs.python.org/file24963/test_smtpd.patch __

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-19 Thread R. David Murray
R. David Murray added the comment: I applied both patches, and I get 16 test failures in test_smtpd. I haven't looked at the errors, but probably most of them are lack of a HELO in the test. -- ___ Python tracker

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-19 Thread Jason Killen
Jason Killen added the comment: Change of the smtpd test code to match the wording from the smtpd.patch. Also, added \r\n to the end of the expected string. -- Added file: http://bugs.python.org/file24949/test_smtpd.patch ___ Python tracker

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-19 Thread Jason Killen
Jason Killen added the comment: Redone diff including wording preferred by R. David Murray. -- Added file: http://bugs.python.org/file24948/smtpd.patch ___ Python tracker ___ __

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread R. David Murray
R. David Murray added the comment: When do patches get applied? The general answer is "when someone gets around to it" :) In this particular case the issue 8739 patch is waiting on the resolution of its dependency (logging uses smtpd in its tests, and the 8739 patch breaks the logging test)

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread Jason Killen
Jason Killen added the comment: On using a different approach: I weighed an approach like that and decided to go with what I thought was the clean/simple/easy approach. If there were more commands that smptd.py accepted I would have probably gone with more like what you mentioned. Change i

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread R. David Murray
R. David Murray added the comment: Oh, by the way the mention of EHLO in that message depends on issue 8739 going in. -- ___ Python tracker ___

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread R. David Murray
R. David Murray added the comment: Thanks for the patch. I think this is fine. An alternate approach would be to introduce the concept of a state (like imaplib has), have a list of which commands are allowed in which state, and implement the check in the command processing function, but that

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-13 Thread Jason Killen
Jason Killen added the comment: I've generated a patch that checks to see if seen_greeting is set before processing other commands. This is the first time I've submitted a patch so if there is something more I need to do let me know. -- nosy: +Jason.Killen Added file: http://bugs.pyt

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-12 Thread Dan Boswell
Dan Boswell added the comment: Attached a diff containing a unit-test for this behavior. -- keywords: +patch Added file: http://bugs.python.org/file24802/failing_test.diff ___ Python tracker __

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-12 Thread Dan Boswell
New submission from Dan Boswell : The current SMTP RFC (5321) states that 'a client MUST issue HELO or EHLO before starting a mail transaction'. The SMTP server should issue '503 Bad sequence of commands' if a client sends MAIL, RCPT or DATA commands before it sends an HELO/EHLO; currently it