ErrorCreating Email Mailbox - possibility co create mailbox name with CAPITALletters
Hello,
as i found when trying create Custom directories - Sent, Trash, Drafts, Spam when mailbox is created, because Mozilla Thunderbird is not creating this directories itself:
there is problem with Creating Mailbox function
There is possibility in ISPC 3.0.1.6 to add Mailbox with Capital letters in name as: USERname@domain.tld
Then is created record in ispconfig db, table mail_user, column mailbox /var/vmail/domain.tld/USERname
then maildrop sends email and dir /var/vmail/domain.tld/username is created
then Ispconfig in one minute creates another directory /var/vmail/domain.tld/USERname (which was main problem for me as Custom directories Vas created in /var/vmail/domain.tld/USERname)
Then when you delete user in ISPConfig interface, directory /var/vmail/domain.tld/USERname is deleted but /var/vmail/domain.tld/username stays in the place with all emails
============= Solution:
In file /usr/local/ispconfig/interface/web/mail/mail_user_edit.php
line 178 must be changed from original:
maildir = str_replace("[localpart]",
_POST["email_local_part"],$maildir);
to following:
maildir = str_replace("[localpart]",strtolower(
_POST["email_local_part"]),$maildir);
=============
i'm also adding to attachment script which is creating Sent, Drafts, Trash, Spam subfolders and also patch to original script /usr/local/ispconfig/server/plugins-available/mail_plugin.inc.php