[RCU] Roundcube cannot create Trash folder

2009-11-18 Thread Ilya Evseev
  Hi, folks!
There is Roundcube 0.2.1 (seems that 0.3.1 has this problem too).
Mailboxes are IMAP under Dovecot.
There are two folders visible: Inbox and Trash,
but when I try to remove message,
errormoving alert is displayed, and Trash is always empty.

File roundcubemail/program/include/rcube_imap.php contains following code:

  function move_message($uids, $to_mbox, $from_mbox='')
{
$to_mbox = $this-_mod_mailbox($to_mbox);
$from_mbox = $from_mbox ? $this-_mod_mailbox($from_mbox) :
$this-mailbox;

// make sure mailbox exists
if ($to_mbox != 'INBOX'  !in_array($to_mbox,
$this-_list_mailboxes()))
  {
  if (in_array($to_mbox_in, $this-default_folders))
$this-create_mailbox($to_mbox_in, TRUE);
  else
return FALSE;   // This always happens when Trash does not exists!
  }

What is $to_mbox_in variable in this code?
It is never assigned and is always empty (while $to_mbox == 'Trash').

BTW, when Trash folder is already created, then messages are removed
normally,
but two Trash folders are visible in folderlist.

WBR, Ilya
___
List info: http://lists.roundcube.net/users/


Re: [RCU] Roundcube cannot create Trash folder

2009-11-18 Thread Claudio Kuenzler
Hi Ilya

Did you set the mailfolders in the config file?
I'm also using Roundcube on Dovecot and never saw a problem like this.

I'm using the following config:

// store draft message is this mailbox
// leave blank if draft messages should not be stored
$rcmail_config['drafts_mbox'] = 'Drafts';

// store spam messages in this mailbox
$rcmail_config['junk_mbox'] = 'Junk';

// store sent message is this mailbox
// leave blank if sent messages should not be stored
$rcmail_config['sent_mbox'] = 'Sent';

// move messages to this folder when deleting them
// leave blank if they should be deleted directly
$rcmail_config['trash_mbox'] = 'Trash';

// display these folders separately in the mailbox list.
// these folders will also be displayed with localized names
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent',
'Junk', 'Trash');

cheers,
Claudio

On Wed, Nov 18, 2009 at 2:40 PM, Ilya Evseev ilya.evs...@gmail.com wrote:

   Hi, folks!
 There is Roundcube 0.2.1 (seems that 0.3.1 has this problem too).
 Mailboxes are IMAP under Dovecot.
 There are two folders visible: Inbox and Trash,
 but when I try to remove message,
 errormoving alert is displayed, and Trash is always empty.

 File roundcubemail/program/include/rcube_imap.php contains following code:

   function move_message($uids, $to_mbox, $from_mbox='')
 {
 $to_mbox = $this-_mod_mailbox($to_mbox);
 $from_mbox = $from_mbox ? $this-_mod_mailbox($from_mbox) :
 $this-mailbox;

 // make sure mailbox exists
 if ($to_mbox != 'INBOX'  !in_array($to_mbox,
 $this-_list_mailboxes()))
   {
   if (in_array($to_mbox_in, $this-default_folders))
 $this-create_mailbox($to_mbox_in, TRUE);
   else
 return FALSE;   // This always happens when Trash does not exists!
   }

 What is $to_mbox_in variable in this code?
 It is never assigned and is always empty (while $to_mbox == 'Trash').

 BTW, when Trash folder is already created, then messages are removed
 normally,
 but two Trash folders are visible in folderlist.

 WBR, Ilya

 ___
 List info: http://lists.roundcube.net/users/


___
List info: http://lists.roundcube.net/users/