On 10/03/01 04:44 PM, Alexander Skwar sat at the `puter and typed:
So sprach »Louis LeBlanc« am 2001-10-03 um 10:22:05 -0400 :
Hmm. Thinking about it some more, if you were to hit a message with a
binary attachment with the sed command above, you'd hose the binary.
Not sure how dos2unix would handle it.
Hm? Base64 doesn't contain the ^M character in its character set. Or
what am I missing here? And what's a binary attachment? I only know
I don't know about base64, but a binary attachment could be any
attachment with other than a 'text/*' mime type. Just because it's
text, doesn't mean it should be handled as such. The attachment may
still be base64 encoded, but it's intrinsic 'file type' is still
maintained. And the '' char is still base 64 encoded if the file is
attached with a non-text mime type.
What if I sent a script designed to strip the '' character out of a
file. If I sent it as a text type, it could be stripped by an MTA and
would therefore be rendered useless.
If I sent it as a type 'application/x-sh' on the other hand, special
chars would be preserved - at least thru the MTA. This may be a text
attachment, but it would still be transferred as a 'binary attachment'
meaning don't do the MS - Unix carriage return translations.
I believe the same thing applies to MS to Unix ftp sessions, where a
text file works fine under ascii transfer mode, but a binary would be
hosed under ascii transfer mode because the MS client will replace any
'\n' chars with '\r\n'. With mail, you can't babysit each transfer,
so we rely on mime types to tell each agent how to handle (or not
handle) each attachment. Otherwise, every mail message you got from
someone using MS would be littered with the darn things.
Of course, since the list mentioned sounds like it is simply a text
based list, it probably won't pose any problems to just filter the
offending MS carriage returns into proper Unix newlines. :)
Louis LeBlanc leblanc(_at_)acadia(_dot_)ne(_dot_)mediaone(_dot_)net
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
There *is* no such thing as a civil engineer.
procmail mailing list