Roundcube Community Forum

 

Download folder messages as zip/tar plugin

Started by menno, March 16, 2010, 11:09:45 AM

Previous topic - Next topic

menno

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


JohnDoh

#2
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
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

freebird

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.

Mircea Tanciu

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.

JohnDoh

Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Mircea Tanciu

#6
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.

JohnDoh

Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Mircea Tanciu


JohnDoh

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
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Mircea Tanciu

#10
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.

Mircea Tanciu

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).

JohnDoh

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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Mircea Tanciu

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.

JohnDoh

QuoteNow 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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...