When saving from the create new domain dialog an error occurs stating unable to create new user. However the domain is shown in the domain list. But when you click on it I get an error, Object reference not set to an instance of an object.
The log shows (domain name being masked)
[2021.08.13] 12:50:02.009 [184.108.40.206] User admin@ calling add domain, name:xxxxxxxx
[2021.08.13] 12:50:02.024 User add error user:admin, domain:xxxxxxxx, exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
[2021.08.13] at System.Collections.Generic.HashSet`1.AddIfNotPresent(T value)
[2021.08.13] at MailService.Repositories.DomainRepository.FoldersLoadFile(String accountName, String accountguid)
[2021.08.13] at MailService.Repositories.DomainRepository.AddMissingDefaultFolders(String accountName, Boolean createMailboxes, String acctGuid)
[2021.08.13] at MailService.Repositories.DomainRepository.UserCreate(String userName, String adUsername, String fullName, String password, SecurityFlags securityFlags, Boolean lockPassword, Int64 maxMailboxSize, String description, Boolean forcePasswordReset, db_contact& contact, Boolean fast)
[2021.08.13] at MailService.Core.Domain.AddUser(String userName, String adUsername, String fullName, String password, SecurityFlags securityFlags, Boolean lockPassword, Int64 maxMailboxSize, String description, Boolean forcePasswordReset)
[2021.08.13] 12:50:02.040 [220.127.116.11] User admin@ failed creating domainxxxxxxx
The new domain does appear in the domains list but after right clicking on the domain name and choosing reload, I can now access the management of the domain. However the user details for the domain administrator are all blank.
When I attempt to create a new user for the domain I get the 'unable to create user' error again. After reloading the domain again that user appears but their account details are all blank as well.
Also, when I have a look in the file system, the user folder is there but there are no subfolders of the user's Mail folder. I tried creating the folders and reattaching the mail box but that didn't make any difference.