6.0.0-git
2019-03-19

[#6957] Problem with appledouble Viewer
Summary Problem with appledouble Viewer
Queue IMP
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester scalero (at) datadec (dot) es
Created 2008-06-19 (3925 days ago)
Due 06/19/2008 (3925 days ago)
Updated 2008-11-14 (3777 days ago)
Assigned 2008-11-09 (3782 days ago)
Resolved 2008-11-14 (3777 days ago)
Milestone 5
Patch No

History
2008-11-14 20:41:18 Michael Slusarz Comment #12
State ⇒ Resolved
Reply to this comment
Looking at this a bit more - there is nothing to do here above/beyond 
the MIME/display rewrite.  So closing.
2008-11-09 07:53:43 Michael Slusarz Comment #11
Version ⇒ HEAD
Reply to this comment
Leave it open, if just so I can easily find to test when needed.
2008-11-09 03:34:50 Chuck Hagenbuch Comment #10
State ⇒ Assigned
Reply to this comment
Michael, is there anything specific here to do in the MIME rewrite, or 
can it be closed?
2008-07-15 06:31:30 scalero (at) datadec (dot) es Comment #9 Reply to this comment
OK, I will not send more comments to this ticket, but I still think 
there is a bug in appledouble viewer because 'mimeCache' parameter 
changes in every request and the Parts of the message can not be 
obtained from the cache.



Greetings and thanks.



Sebastián Calero.
2008-07-15 04:55:16 Michael Slusarz Comment #8 Reply to this comment
Any response to my last coments??
No, nothing in addition to what has already been previously posted.
2008-07-10 07:00:37 scalero (at) datadec (dot) es Comment #7 Reply to this comment
Any response to my last coments??



Greetings and thanks.



Sebastián Calero.
2008-07-03 07:34:09 scalero (at) datadec (dot) es Comment #6 Reply to this comment
Sorry, but I think that something is wrong with IMP 4(4.2 - webmail 1.1).



I have a message with 4 'application/applefile' parts, with 4 .PSD 
embedded files, and now I follow this steps to get the IMP error:



1.- I open the message and try to download a .PSD files. It's OK and I 
get the file.



2.- Go to 'mailbox.php' or any other IMP page.



3.- Go back to the original message and reopen it, try now to download 
any of the .PSD files, do not get a blank page? I can not download any 
.PSD files now.



I have not been able to attach a mail sample because its size >10 Mb, 
I imagine.





Greetings and thanks.



Sebastián Calero.
2008-07-03 06:57:51 scalero (at) datadec (dot) es Comment #5 Reply to this comment

[Show Quoted Text - 11 lines]
Yes, I enable 'large_items', this is my conf.php lines for memcache:



$conf['memcache']['enabled'] = true;

$conf['memcache']['hostspec'] = array('localhost');

$conf['memcache']['port'] = array('9000');

$conf['memcache']['persistent'] = true;

$conf['memcache']['compression'] = true;

$conf['memcache']['c_threshold'] = 0;

$conf['memcache']['prefix'] = 'cache';

$conf['memcache']['large_items'] = true;

[Show Quoted Text - 12 lines]
Ok, but I see the following sentence at link you send me: "Remove 
caching code from MIME_Contents". I think this is not the 'only way' 
can make these messages work although it may be the most efficient.


2008-07-03 05:43:11 Michael Slusarz Comment #4
State ⇒ Stalled
Milestone ⇒ 5
Reply to this comment
A posible solution is this change in
'imp/lib/MIME/Viewer/appledouble.php', function 'render()':
No, this is not quite correct.



There is nothing wrong with the current way we view messages - it 
could just be made more resource friendly in certain instances.  But 
since nothing is broken in IMP 4, this ticket is no more than another 
reason to do the MIME rewrite and, as such, will be marked stalled.
2008-07-03 05:38:10 Michael Slusarz Comment #3 Reply to this comment
1.- When I open the message my horde session is closed, I use
memcache for session container. I have follow the code and I see the
'appledouble' Viewer has a 'new MIME_Contents()' and a posterior
'$mc->buildMessage()' which cause that each part(>2Mb) is cached. OK,
this is the cause of my closed session because in memcache the size
limit per session is 1Mb, Is this right?
Wrong.  Sounds like you did not enable 'large_items' support in 
horde/config/conf.xml.  You can also change this value in the memcache 
source.
This is correct?? And by other hand, Is right to store such large
attachments in cache? It is better than to get directly the
attachments from the IMAP Server?
This is a known limitation with Horde's MIME implementation.  See:

http://wiki.horde.org/Project/HordeMime?referrer=Projects#toc3



The short answer is - this data does not exist on the IMAP server, it 
is an "embedded" MIME Part.  Since we don't have a way to access the 
part without parsing the entire message again (and this may be 
difficult to do on a separate page), caching is the only way we can 
make these messages work.
2008-06-20 08:08:25 Jan Schneider Assigned to Michael Slusarz
State ⇒ Assigned
 
2008-06-19 15:34:50 scalero (at) datadec (dot) es Comment #2 Reply to this comment
A posible solution is this change in 
'imp/lib/MIME/Viewer/appledouble.php', function 'render()':



         /* Display the content of the file. */

         $part = 
$contents->getDecodedMIMEPart($this->mime_part->getRelativeMIMEId(2));

         if ($part) {

             $mime_message = &MIME_Message::convertMIMEPart($part);

             $mc = new MIME_Contents($mime_message, array('download' 
=> 'download_attach', 'view' => 'view_attach'), array(&$contents));

+           if (isset($contents->_sessionCacheID) && 
!empty($contents->_sessionCacheID)) {

+               $mc->_sessionCacheID = $contents->_sessionCacheID;

+           }

             $mc->buildMessage();

             $text .= '<table cellspacing="0">' . 
$mc->getMessage(true) . '</table>';

         }





This cause the 'multipart/appledouble' parts are not cached and the 
attachments are downloaded directly from the IMAP server. It helps?



Greetings.






2008-06-19 15:22:32 scalero (at) datadec (dot) es Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Problem with appledouble Viewer
Due ⇒ 2008-06-19
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
Hello, I received a message with 4 'multipart/appledouble' parts(>2Mb 
aprox. each one). And this is my experience about it:



1.- When I open the message my horde session is closed, I use memcache 
for session container. I have follow the code and I see the 
'appledouble' Viewer has a 'new MIME_Contents()' and a posterior 
'$mc->buildMessage()' which cause that each part(>2Mb) is cached. OK, 
this is the cause of my closed session because in memcache the size 
limit per session is 1Mb, Is this right?



2.- I active the Horde Cache driver with local files, and now I can 
open the message and I see 4 cache files(>2Mb) has been created, now I 
can see or download any of them.



3.- Now I go to the mailbox.php view and I continue seeing another 
messages, now I go back to see another time the message with the 4 
'multipart/appledouble' parts but now(this second time) I can not view 
or download the parts!!! when I click the links to view or download 
the 'view.php' page is empty.

     The unique difference between the source code(HTML) of the first 
time and the second is the value of 'mimeCache'. This value changes 
every time I go back to the message.





This is correct?? And by other hand, Is right to store such large 
attachments in cache? It is better than to get directly the 
attachments from the IMAP Server?







Greetings and thanks.



Sebastián Calero.

Saved Queries