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
postfixadmin-2.3
Christian Boltz 18 years ago
parent 0f836d1236
commit 919638efdf

@ -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'] . "<br />($fUsername";
} else {
$tMessage = $PALANG['pCreate_mailbox_result_succes_nosubfolders'] . "<br />($fUsername";
}
if ($CONF['generate_password'] == "YES")
{
$tMessage .= " / $fPassword)</br />";
@ -326,6 +319,14 @@ TODO: this is the end of /create-mailbox.php code segment
$tMessage .= "<br />" . $PALANG['pSendmail_result_success'] . "<br />";
}
}
if (create_mailbox_subfolders($fUsername,$fPassword))
{
$tMessage = $PALANG['pCreate_mailbox_result_success'] . "<br />($fUsername";
} else {
$tMessage = $PALANG['pCreate_mailbox_result_succes_nosubfolders'] . "<br />($fUsername";
}
}
}
}

@ -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)
{

Loading…
Cancel
Save