From c498214bad9d9089bc0e8f8c658c5543531ce5b8 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 1 Dec 2009 09:20:01 +0000 Subject: [PATCH] Applied patch to disable imap folder deletion git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14851 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../mail/personal/mail/class_mail-methods-cyrus.inc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc index e054fa29e..97e742771 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods-cyrus.inc @@ -270,9 +270,16 @@ class mailMethodCyrus extends mailMethod{ $cfg= $this->ServerList[$this->MailServer]; @imap_setacl ($this->imap_handle, $this->account_id, $cfg["admin"], "lrswipcda"); - if (!imap_deletemailbox($this->imap_handle, $cfg["connect"].$this->account_id)){ - $this->error = imap_last_error(); - return (FALSE); + + if ($this->config->get_cfg_value("cyrusDeleteMailbox", "true") == "true"){ + if (!imap_deletemailbox($this->imap_handle, $cfg["connect"].$this->account_id)){ + $this->error = imap_last_error(); + return (FALSE); + } + } else{ + msg_dialog::display(_("Mail info"), + sprintf(_("LDAP entry has been removed but cyrus mailbox (%s) is kept.\nPlease delete it manually!"), + $this->account_id), INFO_DIALOG); } return (TRUE); } -- 2.30.2