Thomas Bruederli schrieb:
> Hi everybody
>
> After following this thread a while, here are my 2 cents about this:
> I admit that the current behavior is not right because deleting can
> fail. The patch submitted by Jacob would solve this and that's what IMO
> should happen. Choice is good, I agree, but I'm not sure how many of the
> "dummy" users have ever seen the settings for deleting messages in their
> mail client. The number of configuration parameters an end-user has to
> deal with should be kept low.

i applied the patch for testing and found out, that courier-imap does
not allow to delete the trash folder, but instead unsubscribes from it.

I found out, that even if we are not subscribed to the Trash Folder it's
still possible to move messages there (Don't know if it's possible with
other folders also). This seems to be possible not only with courier.

I changed the patch a little bit, so that wie check if the folder exists
unsubscribed, then we do nothing and continue, else if the folder
doesn't exist, we create it.

btw, without having it tested, the admin of a roundcube installation
should be able to disable the trash folder behaviour, by using following
setting in main.inc.php:
  // move messages to this folder when deleting them
  // leave blank if they should be deleted directly
  $rcmail_config['trash_mbox'] = 'Trash';


Here is a part of the function, i will commit the change if sf is
working again.

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

    if (in_array($to_mbox_orig,$this->list_unsubscribed())) { // mailbox
exists, but is unsubscribed but we can still move messages there
    } else
      // make sure mailbox exists
      if (!in_array($to_mbox, $this->_list_mailboxes()) and
!in_array($to_mbox_orig,$this->list_unsubscribed()))
        if (in_array(strtolower($to_mbox), $this->default_folders))
          $this->create_mailbox($to_mbox, TRUE);
        else
          return FALSE;


Kind regards

Florian Sperber


Reply via email to