Change mailbox name
There seems to be an error in the mv command of the vmail directory when changing the name of a mailbox:
Steps to reproduce:
-
Create a mailbox mbox1@domain.tld a maildir direcotry /var/vmail/domain.tld/mbox1 is created - so far so good
-
Update mailbox to mbox2@domain.tld the directory mbox1 is not renamed to mbox2 but is moved into directory mbox2 i.e. the directory structure is: /var/mail/domain.tld/mbox2/mbox1/
if the command in line 119 is changed to exec('mv -f '.escapeshellcmd(
Maybe it would be a better solution to move the whole directory, instead of the content i.e. mv -f /var/mail/domain.tld/mbox1 /var/mail/domain.tld/mbox2
instead of mkdir -p /var/mail/domain.tld/mbox2 mv -f /var/mail/domain.tld/mbox1/* /var/mail/domain.tld/mbox2 rmdir(/var/mail/domain.tld/mbox1)
Cheers, David