From: Omar Polo Subject: Re: mail(1) set Date and User-Agent [was: Re: Back to rfc2045] To: Walter Alejandro Iglesias Cc: tech@openbsd.org Date: Thu, 01 Aug 2024 23:44:38 +0200 On 2024/08/01 21:47:32 +0200, Walter Alejandro Iglesias wrote: > On Thu, Aug 01, 2024 at 08:00:57PM +0200, Omar Polo wrote: > > On 2024/08/01 10:41:40 +0200, Walter Alejandro Iglesias wrote: > > > I fixed some mistakes and simplified a bit the code: > > > > > > https://en.roquesor.com/Downloads/mail_patches.tar.gz > > > > > > I understand why my proposal doesn't attract too much attention, I can > > > count only one person here using mail(1) as a MUA. Anyway, I'd like to > > > know if I'm doing something wrong. > > > > > > At least I'd appreciate some guidance about the general procedure. > > > Regarding the size, for example, I understand conceptually the > > > convenience of splitting and committing a diff in small chunks to gain > > > control and avoid introducing regressions, but isn't it necessary to > > > test the full functional patches first, to evaluate what they do? > > > > No, it is not. For example, Date and User-agent are completely > > orthogonal to MIME support or UTF8. > > Haven't I posted separates diffs, one including Date and User-agent and > another with the MIME headers?!!! a link to a tarball with a bunch of diffs inside isn't exactly how tech@ works, usually at least. more commonly one just open a thread with one diff and gets it reviewed and fixes stuff until it gets committed. Then opens a new thread for another diff. > > So, while I'm happy to see this > > interest in improving mail(1), > > OK. So according to you, mine is just interest. My work and my time > doesn't count at all. oh, come on... i hereby humbly apologize for picking the wrong word and offending your work. I haven't done it on purpose. > > let's try to get it down to small pieces > > that can be reviewed and everyone agree on. > > So far you aren't helping in what I asked: how to split the diffs or > reducing its size without breaking its functionality. You are just > confusing things like you did at the time of my first proposal. OK. This is where i draw the line. I think I've had enough. Sorry if i seem to have just created confusion, i'll just stop caring about this tread. Hope that without me making confusion you'll be able to finally get these diffs merged. > On that > occasion you told me off-list that you agreed with what I had done, here > is what you told me (name censored for privacy): > > "P.S. I personally don't like the suggestion proposed by <.....> > about having mail spawning another program to decide, seems too much > complex for the task at hand." > > And right after hat you posted on tech@ a diff of yours doing exactly > the opposite. I don't know, maybe I'm a psychopath with multiple personalities, but I'm quite sure I haven't posted a diff to make mail(1) run another program to decide whether the text is utf8 or not. Also no need to censor. It was Crystal Colipe to suggest that IIRC and I thought it was a bad idea, and advised you against it to avoid doing work that was, in my humble opinion, difficult to get committed. Sorry if I cared about your time. > > Especially when some > > "controversial" or, rather, delicate topics like UTF-8 are involved. > > Are we discussing politics, religion? I pasted below the program[1] I > wrote to design the function to base64 encode words, it also includes > the function I wrote to wrap the headers. We're talking about delicate topics that need to be throughly thought off. > Feel free anyone to review > the code, test it and then *technically* tell me what I did wrong or in > which way can be improved. Usually when I review a diff I try to be objective about the changes I suggest. Maybe I make mistakes, or don't explain enough why I thought something had to be changed. These things can be sorted out talking. I've found your reply off-putting, to the point that I think I had enough of this, so I don't really want to spend my time explaining stuff to you anymore. > > The risk is to derail the thread on some details and so loosing all the > > other stuff. > > This time there is no room to derails, contrary to what happened with my > first proposal, now I am quite clear about what I want to do, and the > work is done. Again, my doubt was about how to split id.diff, which is > large, without breaking its functionality (at deraadt@ request.) > > > > > > So, let's discuss the first (?) patch, the one to add the Date and > > User-Agent header. > > We'll do separate threads for the others when I'll > > get to review them. > > > > Personally I don't feel a strong need for User-Agent, > > but given that > > even mblaze(1) sets it by default I think it's fine. I'm a bit unsure > > about the format, your diff has "OpenBSD mail(1)" and the (...) are > > usually comments in mail headers, so I've changed it to just "OpenBSD > > mail". > > I don't care about the User-Agent. That's cosmetic. I included it to > check if someone really tested my patches. > > > > > Then, we can't use strftime() since it depends on the locale. (On > > OpenBSD this technically doesn't matter, but let's do the right thing.) > > So, I've stolen a function from OpenSMTPD. (which opens the problem of > > the copyright and ISC vs BSD 3 clausole) > > I'd also read the comment and the function in OpenSMTP code, I could've > stolen it as you did. I used strftime() instead for two reasons, first > because of the advice (in my first proposal) of Stefan Sperling to use > libc, second to keep my diffs as small as possible at deraadt@ request. > Then knowing that under OpenBSD that problem with the locale doesn't > exist (OpenSMTP is used in operating systems supporting more locales) > and also having verified it after applying my patches, I decided to use > strftime(). Which is wrong. Because even if strftime on openbsd works like that, code is often reused. It is copied around. You won't know where it'll end up in. So, better doing a tiny bit of effort from the start to write decent code that works portably. Or, at least that's my opinion. You seem to have some issues in understanding the context. Stefan told you to use libc functions instead of rolling your own utf8 decoder. The others (me included) suggested you to keep the diffs small so they can be reviewed. Ideally one (small) thing per diff. No one told you to write wrong code because of the line count. > So, sorry Omar, but you're not adding nothing new to what I > already did. > > Anyway, here's the diff. Except for the copyright "problem" from which > > I'd like to hear other opinions, I think this is fine and is ok op@ if > > someone wants to go ahead with this. > > I don't see any improvement in your solution compared to mine. It's fine, it's not necessarely better. Usually we can talk. However, I'm quite fed up and I think there are better ways I can emply my time with. So, please ignore my diff and my replies. > But > since, despite me, you have credentials to commit your patch, do > whatever you want. It's totally fine for me. I think it's better if I stop following about this thread. Sorry for being unhelpful and making you waste time. good luck with your work, i really hope some if this will land in the tree. just don't mention me anymore because i don't want to hear. thank you.