T. Joseph CARTERSat Dec 10 04:02:24 PST 2005
If you never thought you'd see the day Joseph ASKS how to use procmail rather than ANSWERING, today is the day. ;) I have no clue how to do this easily.. The problem: If you are an AOL user (WHY are you an AOL user!?) and you set your wonderful point-and-drool email client to not send out HTML mail, it still sends multipart/alternative email with the first attachment being: Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Now, this attachment is readable. However, mutt chooses the latter one, which says: Content-type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable No problem, all modern mail clients support that. Except AOL lies, of course. It's text/plain, and it's Q-P, but it's absolutely not us-ascii by any stretch of the imagination. It's windows-1251, which means my messages are filled with ?????? and whatnot anywhere there's an 8-bit character. Now, I can trivially identify the AOL client through its msgid, or through its X-Mailer being a retarded string like "8.0 for Windows", but I have no idea how to do the two-line match to determine that one of the parts is a mislabelled Q-P part with windows-1252 charset. I've managed to determine that AOL's software sends a proper charset for anything BUT windows-1252, which makes this just really annoying. So the question is, how do I match on the condition of that two-line breakage and, having done so, how do I fix the broken charset before writing the message to the destination folder? -- "We are what we repeatedly do. Excellence, therefore, is not an act, but a habit." -- Aristotle