[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:
parent
8df27270a5
commit
70b6750518
|
@ -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
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue