Author Topic: Download folder messages as zip/tar plugin  (Read 13107 times)

Offline menno

  • Newbie
  • *
  • Posts: 5
Download folder messages as zip/tar plugin
« 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

Offline DefaultBR

  • Newbie
  • *
  • Posts: 1
Download folder messages as zip/tar plugin
« Reply #1 on: August 04, 2010, 02:49:30 PM »
no one????

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Download folder messages as zip/tar plugin
« Reply #2 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
« Last Edit: August 22, 2010, 05:38:08 AM by JohnDoh »
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline freebird

  • Newbie
  • *
  • Posts: 1
    • http://www.discountrosettastone4u.com/
Download folder messages as zip/tar plugin
« Reply #3 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.

Offline Mircea Tanciu

  • Jr. Member
  • **
  • Posts: 14
Download folder messages as zip/tar plugin
« Reply #4 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.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Download folder messages as zip/tar plugin
« Reply #5 on: August 25, 2010, 04:49:30 PM »
yea... please read the previous post...
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Mircea Tanciu

  • Jr. Member
  • **
  • Posts: 14
Download folder messages as zip/tar plugin
« Reply #6 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.
« Last Edit: August 26, 2010, 06:28:33 AM by Mircea Tanciu »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Download folder messages as zip/tar plugin
« Reply #7 on: August 26, 2010, 06:57:24 AM »
are you using RC 0.4 stable?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Mircea Tanciu

  • Jr. Member
  • **
  • Posts: 14
Download folder messages as zip/tar plugin
« Reply #8 on: August 26, 2010, 07:09:44 AM »
I'm using RC Version 0.4-20100807

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Download folder messages as zip/tar plugin
« Reply #9 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
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Mircea Tanciu

  • Jr. Member
  • **
  • Posts: 14
Download folder messages as zip/tar plugin
« Reply #10 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.
« Last Edit: August 27, 2010, 05:15:26 AM by Mircea Tanciu »

Offline Mircea Tanciu

  • Jr. Member
  • **
  • Posts: 14
Download folder messages as zip/tar plugin
« Reply #11 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).

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Download folder messages as zip/tar plugin
« Reply #12 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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Mircea Tanciu

  • Jr. Member
  • **
  • Posts: 14
Download folder messages as zip/tar plugin
« Reply #13 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.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Download folder messages as zip/tar plugin
« Reply #14 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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…