Discussion:
[RCU] Roundcube cannot create Trash folder
Ilya Evseev
2009-11-18 13:40:14 UTC
Permalink
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/users/attachments/20091118/b5d37642/attachment.html>
-------------- next part --------------
_______________________________________________
List info: http://lists.roundcube.net/users/
Claudio Kuenzler
2009-11-18 13:47:12 UTC
Permalink
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
Post by 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.
function move_message($uids, $to_mbox, $from_mbox='')
{
$to_mbox = $this->_mod_mailbox($to_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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/users/attachments/20091118/fb83a3cc/attachment.html>
-------------- next part --------------
_______________________________________________
List info: http://lists.roundcube.net/users/
Ilya Evseev
2009-11-18 13:51:06 UTC
Permalink
Hi, Claudio and everybody!
Of course, most of my settings still having default values like yours :)

WBR, Ilya

2009/11/18 Claudio Kuenzler <napsty at gmail.com>
Post by 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.
$rcmail_config['trash_mbox'] = 'Trash';
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent',
'Junk', 'Trash');
cheers,
Claudio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/users/attachments/20091118/80b6e7a4/attachment.html>
-------------- next part --------------
_______________________________________________
List info: http://lists.roundcube.net/users/
Ilya Evseev
2009-11-18 13:51:06 UTC
Permalink
Hi, Claudio and everybody!
Of course, most of my settings still having default values like yours :)

WBR, Ilya

2009/11/18 Claudio Kuenzler <napsty at gmail.com>
Post by 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.
$rcmail_config['trash_mbox'] = 'Trash';
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent',
'Junk', 'Trash');
cheers,
Claudio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/users/attachments/20091118/80b6e7a4/attachment-0001.html>
-------------- next part --------------
_______________________________________________
List info: http://lists.roundcube.net/users/

A.L.E.C
2009-11-18 13:52:14 UTC
Permalink
Post by Ilya Evseev
function move_message($uids, $to_mbox, $from_mbox='')
{
$to_mbox = $this->_mod_mailbox($to_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').
Try this patch.

--- rcube_imap.php (wersja 3113)
+++ rcube_imap.php (kopia robocza)
@@ -1711,8 +1711,8 @@
// 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);
+ if (in_array($tbox, $this->default_folders))
+ $this->create_mailbox($tbox, TRUE);
else
return FALSE;
}
--
Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252
LAN Management System Developer http://lms.org.pl
Roundcube Webmail Project Developer http://roundcube.net
_______________________________________________
List info: http://lists.roundcube.net/users/
Ilya Evseev
2009-11-18 13:40:14 UTC
Permalink
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/users/attachments/20091118/b5d37642/attachment-0001.html>
-------------- next part --------------
_______________________________________________
List info: http://lists.roundcube.net/users/
Claudio Kuenzler
2009-11-18 13:47:12 UTC
Permalink
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
Post by 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.
function move_message($uids, $to_mbox, $from_mbox='')
{
$to_mbox = $this->_mod_mailbox($to_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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/users/attachments/20091118/fb83a3cc/attachment-0001.html>
-------------- next part --------------
_______________________________________________
List info: http://lists.roundcube.net/users/
A.L.E.C
2009-11-18 13:52:14 UTC
Permalink
Post by Ilya Evseev
function move_message($uids, $to_mbox, $from_mbox='')
{
$to_mbox = $this->_mod_mailbox($to_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').
Try this patch.

--- rcube_imap.php (wersja 3113)
+++ rcube_imap.php (kopia robocza)
@@ -1711,8 +1711,8 @@
// 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);
+ if (in_array($tbox, $this->default_folders))
+ $this->create_mailbox($tbox, TRUE);
else
return FALSE;
}
--
Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252
LAN Management System Developer http://lms.org.pl
Roundcube Webmail Project Developer http://roundcube.net
_______________________________________________
List info: http://lists.roundcube.net/users/
Loading...