Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: menno on March 16, 2010, 11:09:45 AM

Title: Download folder messages as zip/tar plugin
Post by: menno on March 16, 2010, 11:09:45 AM
Is there any plugin that allows you to download all the messages in a folder as a zip file? So that users can backup their email folders easily.

Dont want to re-invent the wheel.

Cheers,
Menno
Title: Download folder messages as zip/tar plugin
Post by: DefaultBR on August 04, 2010, 02:49:30 PM
no one????
Title: Download folder messages as zip/tar plugin
Post by: JohnDoh on August 04, 2010, 03:55:00 PM
i was thinking of adding this to my zip download plugin (which allows the download of all message attachments in 1 zip file) but tbh i didnt think there was any demand for it

edit: these features are now part of the zipdownload plugin, they are only available in the git repo version atm
Title: Download folder messages as zip/tar plugin
Post by: freebird on August 17, 2010, 09:47:05 PM
This plugin/modification provides several visual enhancements for the SquirrelMail interface, such as using small envelope icons to indicate new and read messages, as well as which messages have been replied to, forwarded, etc. The folder list also has a few icons added to it.
Title: Download folder messages as zip/tar plugin
Post by: Mircea Tanciu on August 25, 2010, 12:03:27 PM
Hello,

My users also tell me they need to download multiple messages for backup (or entire folder/folders) into one .zip archive file.
Is there any plugin to achieve this(or any other way)?
Thank you.
Title: Download folder messages as zip/tar plugin
Post by: JohnDoh on August 25, 2010, 04:49:30 PM
yea... please read the previous post...
Title: Download folder messages as zip/tar plugin
Post by: Mircea Tanciu on August 26, 2010, 06:25:42 AM
Hi,

I downloaded your lastest zipdownload plugin from http://github.com/JohnDoh/RoundCube-Plugin-Zip-Download.git but it does't work as I expected. When I try to open a file downloaded from an attachment, MetaData of that file is corrupted. (message error is: Loading meta information failed). Previous version of zipdownload plugin has no problems with file's metadata. I've seen that in this latest version of zipdownload.php you remove code "TNEF encoded attachment part".
How can I fix this?
Thank you.
Title: Download folder messages as zip/tar plugin
Post by: JohnDoh on August 26, 2010, 06:57:24 AM
are you using RC 0.4 stable?
Title: Download folder messages as zip/tar plugin
Post by: Mircea Tanciu on August 26, 2010, 07:09:44 AM
I'm using RC Version 0.4-20100807
Title: Download folder messages as zip/tar plugin
Post by: JohnDoh on August 26, 2010, 07:57:14 AM
could you send me an example of such a message which doesnt download right and i'll take a look. i need the complete message please.

roundcubepatches|at|tehinterweb|dot|co|dot|uk
Title: Download folder messages as zip/tar plugin
Post by: Mircea Tanciu on August 26, 2010, 10:39:20 AM
Meanwhile I studied what is the difference between the same file downloaded with the two versions of zipdownload. Files downloaded with the new plugin is bigger with 2bytes than the ones downloaded with the older plugin. These bytes are inserted to the beginning of the file and are (in hexa): "20 0A". If I manually delete these bytes the file can be viewed just fine by any viewer that support  that type of file.
Maybe somewhere in the source code of the new plugin (or in other place of RC) is inserted a "space character + new line".
I also tried to download all attachments in a .zip file and could not unzip that archive. The error displayed by my unzip utility is something like that:

Archive:  file.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of file.zip or
        file.zip.zip, and cannot find file.zip.ZIP, period.

When I displayed the content of the file.zip in hexa, the same 2bytes are beeing inserted in the beginning of the file.zip and maybe before each file in the archive.
Maybe the archive file.zip is bigger with (2 bytes * nr_of_files_in_the archive) than it should be.
Title: Download folder messages as zip/tar plugin
Post by: Mircea Tanciu on August 27, 2010, 06:12:37 AM
Which version of RC did you tested zipdownload plugin with?
With my RC 0.4-20100807 this plugin work as I mention in the previous message, and with RC 0.4 stable it works the same way as the older zipdownload plugin( only one message can be downloaded).
Title: Download folder messages as zip/tar plugin
Post by: JohnDoh on August 27, 2010, 12:37:24 PM
The extra 2 bytes at the start of the file sound like they could be a UTF8 BOM. Most likely its in the localisation file. Could you check please your selected localisation files for the core and for any plugins you have active and make sure none of them have either a UTF8 BOM at the start or a blank line at the end.
Title: Download folder messages as zip/tar plugin
Post by: Mircea Tanciu on August 30, 2010, 06:32:03 AM
Hi,

I reedited the array of plugins used by my version of RC and now zipdownload plugin works just fine :)

Now I have another problem. When I tried to download an entire folder (by selecting "Download  folder" from the context menu displayed on the left bottom corner of the page), that "archive.zip" that was created contains ONLY the messages that was displayed on the current page NOT ALL the messages that that folder contains(as I expected). This works just like selecting all messages from the current current page and then archive them. Was I wrong somewhere in the settings? (I set the variable $rcmail_config['zipdownload_folder'] = true into the config.inc.php);
Thank you.
Title: Download folder messages as zip/tar plugin
Post by: JohnDoh on August 30, 2010, 07:58:59 AM
Quote
Now I have another problem. When I tried to download an entire folder (by selecting "Download folder" from the context menu displayed on the left bottom corner of the page), that "archive.zip" that was created contains ONLY the messages that was displayed on the current page NOT ALL the messages that that folder contains(as I expected). This works just like selecting all messages from the current current page and then archive them. Was I wrong somewhere in the settings? (I set the variable $rcmail_config['zipdownload_folder'] = true into the config.inc.php);

thats a bug, its been fixed in the repo.
Title: Download folder messages as zip/tar plugin
Post by: Mircea Tanciu on August 30, 2010, 09:46:52 AM
Now all is fine. :)
Thanks.
Title: Download folder messages as zip/tar plugin
Post by: rosali on September 03, 2010, 04:08:11 AM
Hi JohnDoh,

are there any plans to extend the plugin by an upload feature:

- Upload zip
- unzip
- finally move to appropriate folder

Regards,
Rosali
Title: Download folder messages as zip/tar plugin
Post by: JohnDoh on September 04, 2010, 05:53:47 AM
Hi Rosali,

I don't have any plans to do that at the moment, TBH I never even thought about it until you said. I'm not sure if it would be better to extend zipdownload or to make a seperate "message importing" plugin.
Title: Download folder messages as zip/tar plugin
Post by: SKaero on September 04, 2010, 07:50:59 AM
It would be a nice feature to have, I backup my emails using zipdownload it would be nice to be able to import easily if needed.
Title: Download folder messages as zip/tar plugin
Post by: rosali on September 05, 2010, 01:24:02 AM
I would make a separate plugin. I asked for this feature for the same reason than skaero.

JohnDoh, are you going to do the job?
Title: Download folder messages as zip/tar plugin
Post by: JohnDoh on September 05, 2010, 04:16:50 AM
Sure, I'll see what I can do.
Title: Download folder messages as zip/tar plugin
Post by: Mircea Tanciu on September 09, 2010, 12:00:41 PM
Hi JohnDoh,

I have a problem about downloading large folders. My browser try to download for a while, after that nothing happened. Is this a zipdownload plugin issue or php or apache? In php.ini I could not find any option for download size limit (only upload limit), increasing time limit for running php scripts didn't help. What can I do?
Thank you.
Title: Download folder messages as zip/tar plugin
Post by: SKaero on September 09, 2010, 12:12:57 PM
Is there anything in your error log?