6.0.0-beta1
7/17/25

[#9830] attachments with non-latin characters in the filename
Summary attachments with non-latin characters in the filename
Queue IMP
Queue Version 5.0
Type Bug
State Resolved
Priority 2. Medium
Owners slusarz (at) horde (dot) org
Requester vilius (at) lnk (dot) lt
Created 04/07/2011 (5215 days ago)
Due
Updated 04/08/2011 (5214 days ago)
Assigned 04/08/2011 (5214 days ago)
Resolved 04/08/2011 (5214 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/08/2011 09:49:23 PM Jan Schneider Comment #18
State ⇒ Resolved
Reply to this comment
For me too.
04/08/2011 08:30:14 PM vilius (at) lnk (dot) lt Comment #17 Reply to this comment
Still getting "esource id xxx" during download. Other attachments 
are fine though.
Never mind, probably just browser cache. Tried on new email and it works.
04/08/2011 08:26:52 PM vilius (at) lnk (dot) lt Comment #16
New Attachment: imap_bad_download Download
Reply to this comment
Still getting "esource id xxx" during download. Other attachments are 
fine though.

Attaching the logs.
04/08/2011 08:21:53 PM Michael Slusarz Comment #15
Priority ⇒ 2. Medium
Reply to this comment
Never mind - my error.  Copied/pasted code from elsewhere, but here we 
are directly parsing the FETCH data return rather than a list of 
parameter keys => parameter values.

So see if this works any better.
04/08/2011 08:20:59 PM Git Commit Comment #14 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9830: Fix parsing of fetch parameters

  1 files changed, 5 insertions(+), 5 deletions(-)
http://git.horde.org/horde-git/-/commit/d93d107af29b2ae9091e0978b2802aecf61b6164
04/08/2011 08:07:44 PM Michael Slusarz Comment #13 Reply to this comment
Actually now I have all other attachments in all emails as "Unnamed 
Message Part".
Then I definitely need to see an IMAP log of what the server is 
returning for BODYSTRUCTURE (see comment I made to Jan).
04/08/2011 08:02:13 PM vilius (at) lnk (dot) lt Comment #12 Reply to this comment
I can confirm that sometimes I can see "esource id xxx" in 
attachment list without downloading also.

Patch fixes this partially for me. I get attachment named 
"sample_____txt". Note missing dot before extension.
Actually now I have all other attachments in all emails as "Unnamed 
Message Part".
04/08/2011 07:12:41 PM Michael Slusarz Comment #11 Reply to this comment
I don't get any file name at, it's falling back to "text/plain Part" 
(btw, we should lowercase "part", this looks strange).
I'm cleaning this up a bit as I speak.  Going to open a separate 
ticket for tracking.
I tried to get a useful IMAP earlier already, for some reason, there 
is not STRUCTURE request at all.
Did you nuke the cache?
04/08/2011 07:00:45 PM Jan Schneider Comment #10
New Attachment: imap.log Download
Reply to this comment
I don't get any file name at, it's falling back to "text/plain Part" 
(btw, we should lowercase "part", this looks strange). I tried to get 
a useful IMAP earlier already, for some reason, there is not STRUCTURE 
request at all.
04/08/2011 06:56:28 PM vilius (at) lnk (dot) lt Comment #9 Reply to this comment
I can confirm that sometimes I can see "esource id xxx" in attachment 
list without downloading also.

Patch fixes this partially for me. I get attachment named 
"sample_____txt". Note missing dot before extension.
04/08/2011 06:49:02 PM Michael Slusarz Comment #8
State ⇒ Feedback
Assigned to Michael Slusarz
Reply to this comment
I'm getting "esource id #355" as the attachment name. Both in the 
message view and when downloading.
Jan, maybe see if this patch fixes things for you?  Also, could you 
provide me an IMAP log of the BODYSTRUCTURE fetch return for these 
messages?
04/08/2011 06:48:19 PM Git Commit Comment #7 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9830: Some IMAP servers might automatically compute RFC 2231 
parameters (?)

  1 files changed, 7 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/19c46b11b67a254ad09e6adbd9c0a11ebba10eee
04/07/2011 08:33:31 PM Jan Schneider Comment #6 Reply to this comment
I'm getting "esource id #355" as the attachment name. Both in the 
message view and when downloading.
04/07/2011 05:41:49 PM vilius (at) lnk (dot) lt Comment #5 Reply to this comment
Maybe it is dependent on fileinfo version? This is what I get in the 
logs when I tried to attach sample ??????.txt to the message.

2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `W' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: Current entry already has a MIME type 
`application/x-quicktime-player', new type `   image/jp2' [pid 27098 
on line 158 of "/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `W' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `W' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `W' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]

2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `w' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `w' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: Current entry already has a MIME type `text/x-python', new 
type ` text/x-python' [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `w' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `w' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: Current entry already has a MIME type `text/x-ruby', new type 
` text/x-ruby' [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `W' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `W' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `W' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `w' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: Current entry already has a MIME type `text/html', new type ` 
   application/xml' [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `w' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: string extension `w' invalid [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: Current entry already has a MIME type `application/xml', new 
type `     application/xml' [pid 27098 on line 158 of 
"/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 NOTICE: HORDE [imp] PHP ERROR: finfo_open(): 
Warning: Current entry already has a strength type: - 10 [pid 27098 on 
line 158 of "/usr/share/pear/Horde/Mime/Magic.php"]
2011-04-07T20:39:37+03:00 WARN: HORDE [imp] PHP ERROR: finfo_open(): 
Failed to load magic database at '/usr/share/misc/magic'. [pid 27098 
on line 158 of "/usr/share/pear/Horde/Mime/Magic.php"
04/07/2011 05:30:10 PM Michael Slusarz Comment #4
New Attachment: screen2.PNG Download
Reply to this comment
And it works fine for me.
04/07/2011 05:05:57 PM vilius (at) lnk (dot) lt Comment #3
New Attachment: test.eml Download
Reply to this comment
Attaching sample message.
04/07/2011 04:32:50 PM Michael Slusarz Comment #2 Reply to this comment
Don't see this.
04/07/2011 07:22:16 AM vilius (at) lnk (dot) lt Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ attachments with non-latin characters in the filename
Type ⇒ Bug
Queue ⇒ IMP
Reply to this comment
When downloading attachments from IMP with non-latin characters in the 
filename the name is changed to something like "esource%20id%20289" 
and without extension.

Saved Queries