From 919638efdf74c44c4eb59215d6ea1840134855e0 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sun, 25 May 2008 19:33:43 +0000 Subject: [PATCH] create-mailbox.php: - create subfolders _after_ sending the welcome mail functions.inc.php: - sleep(1) before creating subfolders for a newly created mailbox This fixes subfolder creation when courier is used. https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1970684&group_id=191583 git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@369 a1433add-5e2c-0410-b055-b7f2511e0802 --- create-mailbox.php | 15 ++++++++------- functions.inc.php | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/create-mailbox.php b/create-mailbox.php index 089b93dc..cc22cca4 100644 --- a/create-mailbox.php +++ b/create-mailbox.php @@ -278,13 +278,6 @@ TODO: this is the end of /create-mailbox.php code segment */ $tDomain = $fDomain; - if (create_mailbox_subfolders($fUsername,$fPassword)) - { - $tMessage = $PALANG['pCreate_mailbox_result_success'] . "
($fUsername"; - } else { - $tMessage = $PALANG['pCreate_mailbox_result_succes_nosubfolders'] . "
($fUsername"; - } - if ($CONF['generate_password'] == "YES") { $tMessage .= " / $fPassword)
"; @@ -326,6 +319,14 @@ TODO: this is the end of /create-mailbox.php code segment $tMessage .= "
" . $PALANG['pSendmail_result_success'] . "
"; } } + + if (create_mailbox_subfolders($fUsername,$fPassword)) + { + $tMessage = $PALANG['pCreate_mailbox_result_success'] . "
($fUsername"; + } else { + $tMessage = $PALANG['pCreate_mailbox_result_succes_nosubfolders'] . "
($fUsername"; + } + } } } diff --git a/functions.inc.php b/functions.inc.php index 2d3aaa18..2263bf96 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1926,6 +1926,8 @@ function create_mailbox_subfolders($login,$cleartext_password) $s='{'.$s_host.$s_port.$s_options.'}'; + sleep(1); # give the mail triggering the mailbox creation a chance to do its job + $i=@imap_open($s,$login,$cleartext_password); if (FALSE==$i) {