[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2018-09-08 Thread Jens Troeger
Jens Troeger added the comment: Any updates on this? Looks like the proposed change has not been merged into mainstream yet? I’m having problems with Google rejecting emails: (555, b'5.5.2 Syntax error, goodbye. r10-v6sm7321838qtj.41 - gsmtp', '…') and using IETF’s message linter

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2018-01-13 Thread Eric Lafontaine
Change by Eric Lafontaine : -- pull_requests: +5028 ___ Python tracker ___ ___

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-07-10 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +2720 ___ Python tracker ___

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-07-02 Thread R. David Murray
R. David Murray added the comment: Yes. There's a chance someone else will review it if you do that. I'm still not likely to have time for a while, myself, but ping me again in a month if I haven't gotten to it. -- ___ Python tracker

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-07-01 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi All, Should I try to make this a github PR instead to accelerate the review? Regards, Eric Lafontaine -- ___ Python tracker

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-02-20 Thread R. David Murray
Changes by R. David Murray : -- stage: -> patch review ___ Python tracker ___ ___

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-02-17 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi, Could someone put this ticket on "waiting for review"? Regards, Eric Lafontaine -- ___ Python tracker ___

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-01-30 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, Here you go :). Regards, Eric Lafontaine -- Added file: http://bugs.python.org/file46459/issue28879_v5.patch ___ Python tracker

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-01-30 Thread Eric Lafontaine
Eric Lafontaine added the comment: Resent-heuristic -- Added file: http://bugs.python.org/file46460/Resent_heuristic.patch ___ Python tracker ___

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-01-22 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi, I've implemented the heuristic, but it's messy with the issue of this ticket. I'm going to do some clean-up and separate the issue from the heuristic and post them separated. Date issue ; Test Case Documentation Implementation Heuristic of Resent ;

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-01-17 Thread R. David Murray
R. David Murray added the comment: I think this constitutes the heuristic I was talking about in that comment, that will get it right 99+% of the time. Strict mode should raise an error, but strict is not the default in the email package. I probably won't have time to do any review for a

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-01-17 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, I've received an answer from the IETF Pete Resnick. The answer does say however that there is no guaranteed way of getting the right headers if the message doesn't respect the standard; "[...] In this case, if the trace fields were not present,

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-01-17 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, The IETF didn't answer yet :(. I'll await your news regarding this patch ("issue_28879_V4.patch"). I would like to have feedback if I need to change something. Thanks a lot in advance, Eric Lafontaine --

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-22 Thread R. David Murray
R. David Murray added the comment: I'm happy to comment on issues as far as mentoring goes, and yes email is my primary area of responsibility for CPython. However, I don't have much free time, so getting to reviews is proving to be problematic. There's a chance a might have some time this

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-22 Thread Eric Lafontaine
Eric Lafontaine added the comment: overkill file -- Added file: http://bugs.python.org/file46002/issue_28879_python2_overkill.patch ___ Python tracker

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-22 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi David, Henning, Sorry for the delay. Here is the patch for python 2... but I find that adding an "example" just for RFC 5322 is kind of over-kill... So I've made both :) please choose which one you prefer and let me know. I personnally prefer to use

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-19 Thread R. David Murray
R. David Murray added the comment: The documentation is all in the Doc subdirectory of the checkout. So, this should teach me to rely on vague memory instead of reading the code. I've probably still missed something because I don't have enough time to read it properly. Yes, you are correct,

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-19 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, @David, the "Resent-" block should be added by the user and he needs to know what he's doing. Hell, I work with emails all the time and never knew about this. The Worse part of it is that I have to communicate with the IETF just to know how we can

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-19 Thread R. David Murray
R. David Murray added the comment: There is at least one open ticket (maybe two, I forget) about providing a way to insert headers at arbitrary locations in the header list. Our trouble has been deciding on an API. There is a mailing list (email-sig) where such things can be discussed (it

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-18 Thread Henning von Bargen
Henning von Bargen added the comment: I think Eric's To-Do list sums it up pretty well. I just wanted to say how much I appreciate the Python community. It seems that every little detail is very well-thought-out. -- ___ Python tracker

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-18 Thread Eric Lafontaine
Eric Lafontaine added the comment: forgot to re-post the to-do, and to correct the documentation : List of things to do : - Implement a patch for the code to add a missing "Date" field if it doesn't exist . (in review) - Modify the documentation at the SMTPLib for the send_message to mention

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-18 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, this is not a short answer, like I hoped it would be ;). But skip to the last section if you don't want to read it all. the heuristic problem : For the heuristic of the resent headers, it's clearly say in the RFC5322

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-16 Thread R. David Murray
R. David Murray added the comment: The signature of send_message cannot be changed for backward compatibility reasons. It's signature was not intended to be an extension of the sendmail signature. send_message cannot accept a dictionary, as then it would have to know how to format that

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-16 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, I was looking at the code of the function and also noticed multiple "itching". 1- Why raise an error when 2 resent-date exist? it may exist and completely legitimate as per RFC5322. The code should always take the first one it sees as per the RFC.

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-16 Thread Henning von Bargen
Henning von Bargen added the comment: OK, I understand the arguments. If I understand correctly, this will be fixed in one way or another in Python 3.6 or 3.7. For Python 2.7, this will not be fixed (so I have to work around this somehow, should be quite easy). I think that at least the

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-15 Thread R. David Murray
R. David Murray added the comment: Sure the comments can be updated. Some of them elsewhere have been already. The reason for the email library to have a validation function is that it has an 'SMTP' policy that is designed to produce valid SMTP messages when the message is serialized. (It

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-15 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, Thanks for the enlightment. I never figured that there was a send_message function XD. Never needed it and it's true that the example in the email library use sendmail and not send_message.

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-15 Thread Maciej Szulik
Maciej Szulik added the comment: I've chatted a bit with David about this feature. Here are some thoughts: - check what SMTP standard says about some validation rules - add validate method, probably into email package -- ___ Python tracker

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-15 Thread R. David Murray
R. David Murray added the comment: The sendmail function will never modify the RFC822+ content. send_message, however, already does several manipulations of the message headers to make sending email simpler. Practicality (make it easy to send messages without knowing the details of the

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-15 Thread Maciej Szulik
Maciej Szulik added the comment: I tend to agree with Eric Lafontaine, looking at the quote Henning von Bargen posted the originator address field is also required, but yet we don't explicitly check its presence in the code, but rely on the SMTP server to error out. -- nosy:

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-06 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi, Not sure this is where the comment goes... I work with the smtplib and email libraries. I understand Henning von Bargen when he say that we should have a way to support RFC 5322 without asking the user to understand how to support it. The issue is

[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-06 Thread R. David Murray
R. David Murray added the comment: As I implied but did not say explicitly, this is the expected behavior of smtplib. You are responsible for adding any headers to the message that you want smtplib to send. In particular, the 'sendmail' method takes a string to send, and smtplib does not