From: Carlos E. R. <rob...@te...> - 2020-05-27 11:24:00
|
On 27/05/2020 13.15, Richard Kimber via Fetchmail-users wrote: > On Tue, 26 May 2020 16:39:04 +0300 > Peter Pentchev <ro...@ri...> wrote: > >> Unfortunately, this is the most "normal" of the formats that you are >> going to get with e-mail. Since none of the software that generates or >> reformats e-mail messages along the way has any idea what other >> software will be used to accept, transfer, or process the message, >> none of it can rely on anything else being able to process anything >> other than "simple" plain text with all characters being in the >> US-ASCII character set. Thus, if somebody wants to include, say, a >> pretty long dash or chevrons, the only way to do that is to use a >> special format for encoding them, a special format for saying "this >> here is a character that is outside the US-ASCII character set, I'll >> tell you how it is represented in UTF-8, but since its UTF-8 >> representation itself depends on bytes that are outside the US-ASCII >> character set, here's a marker that says that the next couple of >> characters are base64-encoded representations of UTF-8 encoded >> characters". >> >> Anything that wants to process e-mail messages the way they are to be >> displayed to the end-user should be able to decode MIME-encoded >> content, including MIME-encoded header fields. And... unfortunately, >> here we come once again to the "procmail is kind of outdated, it does >> not really support a couple of things that are sort of essential in >> the current world, is there any way you might switch to other >> message-filtering software?" For example, it looks like at least >> courier-maildrop may be configured to parse MIME-encoded headers: >> http://courier-mail-server.10983.n7.nabble.com/Filtering-mails-with-UTF-8-headers-td18177.html >> (and yes, I know that switching the mail filtering program is not >> trivial at all, but procmail also has other problems, some of which >> people have become accustomed to working around for decades...) > > Thanks. > > I was wondering, though, whether one could do something like > mda '/usr/bin/formail -s <program that converts to ascii> | procmail' > in the .fetchmailrc file. It is not that simple. The mail itself is already ascii, you would have to convert to utf8 to see a complete rendering of the headers. But procmail can't handle that. If you force conversion to ascii of the headers, so to speak, how do you handle the characters in the headers that do not have an ascii equivalent? You have to replace with '*'. The only thing would be grep patterns in procmail that would handle the headers as they come without conversion. I don't remember if procmail handles grep. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar) |