HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=19)
-   -   RoundCubeMail - Error at deleting of mails (http://www.howtoforge.com/forums/showthread.php?t=5710)

TobiasTM 21st July 2006 23:45

RoundCubeMail - Solution for error by deleting of mails
 
I have found the solution of the problem.

Following "BUG" is known:
You have created a new mail-box, get a mail and want delete it, but there comes an error-message, that the mail couldnīt delete.

Solution for the problem:
Log into roundcube, go to settings, and create a new folder with name: "Trash" Thatīs it. The problem should now eliminated ;)

Davide 24th July 2006 18:38

Make roundcube create all needed folders
 
I think this is far better solution:

Create a text file in /home/admispconfig/ispconfig/web/roundcubemail (for example patch.diff)
with the following content:

--- program/include/rcube_imap.inc (revision 260)
+++ program/include/rcube_imap.inc (working copy)
@@ -362,13 +362,18 @@
if (!is_array($a_folders) || !sizeof($a_folders))
$a_folders = array();

- // create INBOX if it does not exist
- if (!in_array_nocase('INBOX', $a_folders))
+ // create Default folders if they do not exist
+ global $CONFIG;
+ foreach ($CONFIG['default_imap_folders'] as $folder)
{
- $this->create_mailbox('INBOX', TRUE);
- array_unshift($a_folders, 'INBOX');
+ if (!in_array_nocase($folder, $a_folders))
+ {
+ $this->create_mailbox($folder, TRUE);
+ $this->subscribe($folder);
+ }
}

+ $a_folders = iil_C_ListSubscribed($this->conn, $this->_mod_mailbox($root), $filter);
$a_mailbox_cache = array();

// write mailboxlist to cache


patch roundcube mail:

machine:/home/admispconfig/ispconfig/web/roundcubemail# patch -p0 < patch.diff

And... voilā!

Every user who log in roundmail, get all needed folders created (not only Trash)

TobiasTM 24th July 2006 23:18

I try it some times, but there come evetime a Error-Message like this:

Quote:

patching file program/include/rcube_imap.inc
patch: **** malformed patch at line 4: if (!is_array($a_folders) || !sizeof($a_folders))
When I delete this file Iīll get error-messages at other places in you little skript.

Is it possible that you have forgotten some + or - or other things ?

till 25th July 2006 08:53

Davide, thanks for the patch!

May you please attach a copy of the pached file (program/include/rcube_imap.inc) as .zip to this thraed?

I guess it might be easier for users to replace the file instead of patching it, even if patching is technically the correct way of handling this :)

Davide 25th July 2006 09:10

1 Attachment(s)
I attach patched file to this post

It should work with roundcube 0.1 beta (that is the packaged version for ISPConfig)

Simply make a backup of your /home/admispconfig/ispconfig/web/roundcubemail/rcube_imap.php and substitute it with the attached one.

schmidtedv 18th September 2006 22:03

...newest beta-package in other thread does this already...

m u r 3rd January 2007 20:04

This file doesn't exist on my system? Can anyone tell me how to make it autocreate the folders?

ubuntuman 24th April 2007 18:19

applyng the patch
 
hi, to apply patch

1- download the rcube_imap.zip
2- uncompress it
3- check if exist rcube_imap.inc in your "roundcubefolder"/program/includes/
4- if exist put the rcube_imap.inc in "roundcubefolder"/program/includes/ and replace the old file..

sorry for my english
Ubuntuman from Argentina


All times are GMT +2. The time now is 09:35.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.