diff --git a/config.inc.php b/config.inc.php index bf41e189..9ce22b07 100644 --- a/config.inc.php +++ b/config.inc.php @@ -700,20 +700,6 @@ function x_struct_admin_modify($struct) { // $CONF['domain_postdeletion_script']='sudo -u courier /usr/local/bin/postfixadmin-domain-postdeletion.sh'; $CONF['domain_postdeletion_script'] = ''; -// Optional: -// Sub-folders which should automatically be created for new users. -// The sub-folders will also be subscribed to automatically. -// Will only work with IMAP server which implement sub-folders. -// Will not work with POP3. -// If you define create_mailbox_subdirs, then the -// create_mailbox_subdirs_host must also be defined. -// Note: requires imap extension within PHP -// $CONF['create_mailbox_subdirs']=array('Spam'); -$CONF['create_mailbox_subdirs'] = array(); -$CONF['create_mailbox_subdirs_host']='localhost'; -// -// Specify '' for Dovecot and 'INBOX.' for Courier. -$CONF['create_mailbox_subdirs_prefix']='INBOX.'; // Optional: // Show used quotas from Dovecot dictionary backend in virtual @@ -727,19 +713,6 @@ function x_struct_admin_modify($struct) { // Note about dovecot config: table "quota" is for 1.0 & 1.1, table "quota2" is for dovecot 1.2 and newer $CONF['new_quota_table'] = 'YES'; -// -// Normally, the TCP port number does not have to be specified. -// $CONF['create_mailbox_subdirs_hostport']=143; -// -// If you have trouble connecting to the IMAP-server, then specify -// a value for $CONF['create_mailbox_subdirs_hostoptions']. These -// are some examples to experiment with: -// $CONF['create_mailbox_subdirs_hostoptions']=array('notls'); -// $CONF['create_mailbox_subdirs_hostoptions']=array('novalidate-cert','norsh'); -// See also the "Optional flags for names" table at -// http://www.php.net/manual/en/function.imap-open.php -$CONF['create_mailbox_subdirs_hostoptions'] = array(); - // Optional: // Allows a user to reset his forgotten password with a code sent by email/SMS $CONF['forgotten_user_password_reset'] = true; diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index 242d5cbe..a0d361da 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -728,38 +728,22 @@ protected function mailbox_postdeletion() } - /** - * Called by postSave() after a mailbox has been created. - * Immediately returns, unless configuration indicates - * that one or more sub-folders should be created. - * - * Triggers E_USER_ERROR if configuration error is detected. - * - * If IMAP login fails, the problem is logged to the system log - * (such as /var/log/httpd/error_log), and the function returns - * FALSE. - * - * Doesn't clean up, if only some of the folders could be - * created. - * - * @return boolean TRUE if everything succeeds, FALSE on all errors - * - * @todo rewrite/remove dependency on php-imap and use instead something like : https://www.php-imap.com/api/client + * Effectively deprecated - see linked issues + * @see https://github.com/postfixadmin/postfixadmin/issues/472 + * @see https://github.com/postfixadmin/postfixadmin/issues/812 */ protected function create_mailbox_subfolders() { - // no longer implemented; code relied on deprecated PHP imap extension. + // no longer implemented; code relied on deprecated PHP imap extension, output some sort of error message + // if it looks like the installation used to support it. $create_mailbox_subdirs = Config::read('create_mailbox_subdirs'); if (empty($create_mailbox_subdirs)) { return true; } - // see https://github.com/postfixadmin/postfixadmin/issues/472 - // see https://github.com/postfixadmin/postfixadmin/issues/812 etc - error_log(__FILE__ . ' WARNING : PostfixAdmin no longer supports the imap folder population via config parameters: create_mailbox_subdirs, create_mailbox_subdirs_host, create_mailbox_subdirs_hostport and create_mailbox_subdirs_hostoptions '); - + error_log(__FILE__ . ' WARNING : PostfixAdmin no longer supports the imap folder population via config parameters, see https://github.com/postfixadmin/postfixadmin/issues/812'); return true; }