[imp] Attachment corruption due to incorrect mime type
Tornoci Laszlo
torlasz at xenia.sote.hu
Sat May 30 10:33:37 UTC 2009
Hi,
my problem is, some binary files attached get recognized as plain/text,
and as a result are coded as quoted-printable. This leads to corruption
of the files, as explained here:
http://lists.horde.org/archives/imp/Week-of-Mon-20060424/045099.html
If I make a binary file like:
dd bs=1024 count=10 </dev/urandom > 10kB
that's full of nonASCII bytes, 'file' says data:
$ file 10kB
10kB: data
If I send a message through IMP with '10kB' attached (browser:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.10) Gecko/2009042708
Fedora/3.0.10-1.fc10 Firefox/3.0.10)
it gets attached as plain/text coded as quoted-printable (and gets
corrupted).
What really determines the mime-type? Does IMP accept what the browser
suggests? (If yes, that's a problem of Firefox). Or does IMP look at the
file and may override what the browser suggested? (Then it's IMP's fault).
By the way, I have installed the fileinfo PECL thing, as suggested.
test.php returns:
# MIME Magic Support (fileinfo): Yes
# MIME Magic Support (mime_magic): Yes
What is causing the problem?
Yours: Laszlo
More information about the imp
mailing list