[email_account] Script now work in unix hierarchy

- To be able to create mailbox with accountname containing dots, the
  script need to support unixhierarchy
This commit is contained in:
Thomas Preud'homme 2010-01-26 08:16:43 +01:00 committed by Thomas Preud'homme
parent 8df27270a5
commit 70b6750518
1 changed files with 2 additions and 2 deletions

View File

@ -384,11 +384,11 @@ restore_cyrus_state ()
create_mail_account ()
{
local - nblines
nblines=$(echo "listmailbox user.$emailuser@$emaildomain" | cyradm --user $cyruser --auth login --pass $cyrpwd localhost | wc -l)
nblines=$(echo "listmailbox user/$emailuser@$emaildomain" | cyradm --user $cyruser --auth login --pass $cyrpwd localhost | wc -l)
if [ $nblines -eq 0 ]
then
echo "Mailbox for $emailuser@$emaildomain doesn't exist, creating it…"
echo "createmailbox user.$emailuser@$emaildomain" | cyradm --user $cyruser --auth login --pass $cyrpwd localhost
echo "createmailbox user/$emailuser@$emaildomain" | cyradm --user $cyruser --auth login --pass $cyrpwd localhost
fi
}