• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

mailmng failed: mailmng: Unable to calculate Maildir++ size

barryc

New Pleskian
getting this error when pressing 'refresh usage stats'. all else seems ok.

it tells me there is an error in Manager.php on line 186 that it can't find the file or directory. of course Manager.php is zend-ed, so i can't see what file it's missing.

Message mailmng failed: mailmng: Unable to calculate Maildir++ size: No such file or directory System error 2: No such file or directory
File Manager.php
Line 186
Type mail_Exception_ManagerExecution

any ideas what could cause this?
 
Directory /var/qmail/mailnames/domain.com/mailbox_name does not exist and this caused the error. To fix the misconfiguration you can disable mailbox for the mail account of this domain and enable it again through Plesk.

Then recreate configuration for all mail accounts with mchk:

# /usr/local/psa/admin/sbin/mchk --with-spam

It should help.
 
If you know domain of this mailbox (domain.com in this example) you can use following method to locate exact mailbox which caused the error with testing with utility mailmng. Here are the command:

Get list of all mail accounts on domain domain.com and put it into file mail.list:

# mysql -BN -uadmin -p`cat /etc/psa/.psa.shadow` psa -e"select mail_name from domains, mail where domains.id=mail.dom_id and domains.name='domain.com'" > mail.list

Tested all mail accounts with mailmng and received the error when testing [email protected]:

# for mail_name in `cat mail.list`; do echo $mail_name; /usr/local/psa/admin/sbin/mailmng --get-mailbox-size --domain-name=domain.com --mailname=$mail_name; done
...
mailboxname
mailmng: Unable to calculate Maildir++ size: No such file or directory
System error 2: No such file or directory
mailmng: Unable to calculate Maildir++ size: No such file or directory
System error 2: No such file or directory
 
I have the same issue, but all maildirs existed. Running

/opt/psa/admin/bin/mchk --without-spam

Was enough to g et things up and running again.
 
We have changed from QMail to Postfix and now we have this Problem.

I have now fix this Problem. The Problem is Case Sensitive - search at the Database: "SELECT name, mail_name FROM domains, mail WHERE domains.id = mail.dom_id" - and check the "mail"-Field where e.g. the first is uppercase, then go to /var/qmail/mailnames/<DOMAIN.TLD>/ and change the lowercase Mail Folder to the Database entry, now re run /opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php - and you haven't this error again.
 
Back
Top