Robert Luberda: > Thorsten Glaser wrote: >> >>> Mind you, I am also open to reviewing his proposal of >>> adding those headers even with -a (letting -a override the >>> auto-generated ones when there is a conflict). > > I was thinking how to implement this functionality, and during that I > realized that it actually would nice not to add the headers if the mail > content is 7-bit only. I even tried to write some code for this, but it > would require too many changes, so I gave up the idea for now. > > Anyway after a few attempts I ended with the attached patch. It allows > user to override the headers, however it touches different parts of code > than your original patch, mostly because of my failed attempt of 7 vs 8 > bit mail content detection. It potentially has slightly worse > performance due to parsing of the user-provider headers after they have > been already joined by "\n" chars, but on the other hand it does not > allocate additional memory via asprintf(). What do you think about it? > >> >> Robert, Niels, what do you think about the attached patch? > > The patch looks OK. The addition of -D_GNU_SOURCE flag causes warnings > during compilation of files that already #define _GNU_SOURCE, but this > is easy to fix by using #define in main.c. > > > I would like to prepare an upload tomorrow. Could you please let me know > which patch you prefer: the original one or the one attached to this mail? > > Regards, > robert >
Hi, I like this patch better because it is more robust than the previous patch for the user and seems to DTRT. (I.e. -a doesn't throw unnecessary auto-detection away). I don't know the surrounding code very well, but from what I can see the patch looks consistent and I cannot spot any bugs in it. * Should we update some documentation to reflect these changes? Like a man page or so? Re: 7-bit only. You are right that would be even better in the long run as it would not require a 8bit compatible MTA unnecessarily. Though that smells like a post release thing. Thanks, ~Niels