Hello.
I am trying to implement another paranoid header sanitizing: assuming valid RFC2822
headers may not contain any non-ascii symbols except properly mime-2 wrapped in
accordance with RFC2231.
The obvious operator is something like
$line =~ tr [\240-\377] [\040-\177];
$line =~ s/[\000-\010][\014-\037][\200-\237]/\?/g;
before any other header processing.
The problem is place. I could not find in what point of MIMEStream (?) should it be done.
For ALL headers, no exclusions. And not damaging [properly defined in Content-transfer-
encoding: 8BIT] 8-bit message body.
Any suggests?
Alexey
from very 8-bit Russia