euglug.org

[Eug-lug] More advanced procmail voodoo

작성자

카테고리:



Patrick R. WadeSat Dec 10 18:30:34 PST 2005

T. Joseph CARTER wrote:

> 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?
> 

I have a feeling this is going to involve an egrep pattern that 
incorporates a newline, and then use of formail to munge the 
Content-Type line, but i'm groping.

-- 
On two occasions I have been asked [by members of Parliament!], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able rightly to apprehend the kind of
confusion of ideas that could provoke such a question.
	-- Charles Babbage