• 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

Failed in Mail Account Creating and Deleting

A

AnhP

Guest
I'm using Plesk 9.5.3 on CentOS. When I create a mail account I got below error

ERROR: PleskUtilException
mailmng failed: Fatal error: boost::filesystem::basic_filesystem_error<boost::filesystem::basic_path<std::string, boost::filesystem::path_traits> >(boost::filesystem::exists)
0: class.MailManager.php:242
MailManager::execWithException(string 'smart_exec', string 'mailmng', array, array, string 'lst')
1: class.MailManager.php:274
MailManager->callMailManager(string 'add-mailname', array)
2: class.MailManager.php:346
MailManager->addMailname(string 'slappit.com', string 'anhpham2')
3: MailName.php:976
Mailname->update()
4: mail_name_preferences.php:92
require(string '/usr/local/psa/admin/htdocs/domains/mail/mail_name_preferences.php')
5: plesk.php:51

After then I try to delete the failed account and I got below error:
ERROR: PleskUtilException
Favorites
Visited Pages
Up Level
mailmng failed: Unable to open database /var/spool/postfix/plesk/passwd.db: unable to open database file
Unable to remove mailname [email protected]
0: class.MailManager.php:242
MailManager::execWithException(string 'smart_exec', string 'mailmng', array, array, string 'lst')
1: class.MailManager.php:274
MailManager->callMailManager(string 'remove-mailname', array)
2: class.MailManager.php:354
MailManager->removeMailname(string 'slappit.com', string 'anhpham2')
3: cmd_mail.php3:1357
mn_del(string '7')
4: class.MailNamesList.php:597
MailNamesList->remove(array)
5: mail_names_remove.php:55

It seems that there's wrong permission in configuration somewhere and it fails.
I also tried with mchk --with-spam command and still not works.

Does anyone get the same issue? Please let me know. Any ideas will be appreciated.
Thanks a lot.
 
Looks like /var/spool/postfix/plesk/passwd.db database is corrupted. Try to rebuild it with
# mv /var/spool/postfix/plesk/passwd.db /var/spool/postfix/plesk/passwd.db_
# /usr/local/psa/admin/sbin/mchk --without-spam
 
Thanks IgorG, I will try and then let you know later.

Now I cannot delete alias domain, cannot remove mail account.I think the root cause is I'd changed some files in /usr/local/psa/admin/sbin permissions.

I got another question, I intend to reinstall the psa package. Will command yum reinstall psa affect to other configurations of my customer.
 
Do you still have error like
mailmng failed: Unable to open database /var/spool/postfix/plesk/passwd.db: unable to open database file

?
 
Do you still have error like


?

Yes, the error when delete email account is still there.
ERROR: PleskUtilException

Favorites

Visited Pages

Up Level
mailmng failed: Unable to open database /var/spool/postfix/plesk/passwd.db: unable to open database file
Unable to remove mailname [email protected]

0: class.MailManager.php:242
MailManager::execWithException(string 'smart_exec', string 'mailmng', array, array, string 'lst')
1: class.MailManager.php:274
MailManager->callMailManager(string 'remove-mailname', array)
2: class.MailManager.php:354
MailManager->removeMailname(string 'slappit.com', string 'tester')
3: cmd_mail.php3:1357
mn_del(string '9')
4: class.MailNamesList.php:597
MailNamesList->remove(array)
5: mail_names_remove.php:55
 
I got another question, I intend to reinstall the psa package. Will command yum reinstall psa affect to other configurations of my customer.
I've changed permission of some files in /usr/local/psa/admin/sbin.
Do the command yum reinstall psa reset the default permission of them?
 
Make sure that you have correct permissions:

# stat /var/spool/postfix/plesk/passwd.db
File: `/var/spool/postfix/plesk/passwd.db'
Size: 11264 Blocks: 24 IO Block: 4096 regular file
Device: 37h/55d Inode: 17728704 Links: 1
Access: (0460/-r--rw----) Uid: ( 89/ postfix) Gid: ( 0/ root)

Reset the permissions of the all installed RPM packages

You need to use combination of rpm and a shell for loop command as follows:
for p in $(rpm -qa); do rpm --setperms $p; done
for p in $(rpm -qa); do rpm --setugids $p; done

Above command combination will reset all the permissions to the default permissions under CentOS / RHEL / Fedora Linux.
You can modify it only for psa* and plesk* packages.
 
Make sure that you have correct permissions:

Reset the permissions of the all installed RPM packages

You need to use combination of rpm and a shell for loop command as follows:


Above command combination will reset all the permissions to the default permissions under CentOS / RHEL / Fedora Linux.
You can modify it only for psa* and plesk* packages.

I've reset the default permission and owner as you suggested but the error still not fixed.
Below is all stat permission of all DB files.
# stat /var/spool/postfix/plesk/virtual.db
File: `/var/spool/postfix/plesk/virtual.db'
Size: 12288 Blocks: 24 IO Block: 4096 regular file
Device: fd01h/64769d Inode: 9271958 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)

# stat /var/spool/postfix/plesk/passwd.db
File: `/var/spool/postfix/plesk/passwd.db'
Size: 11264 Blocks: 24 IO Block: 4096 regular file
Device: fd01h/64769d Inode: 8467875 Links: 1
Access: (0460/-r--rw----) Uid: ( 89/ postfix) Gid: ( 0/ root)

# stat /var/spool/postfix/plesk/poplock.db
File: `/var/spool/postfix/plesk/poplock.db'
Size: 12288 Blocks: 24 IO Block: 4096 regular file
Device: fd01h/64769d Inode: 8467878 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)

# stat /var/spool/postfix/plesk/transport.db
File: `/var/spool/postfix/plesk/transport.db'
Size: 12288 Blocks: 24 IO Block: 4096 regular file
Device: fd01h/64769d Inode: 8467880 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)

# stat /var/spool/postfix/plesk/vmailbox.db
File: `/var/spool/postfix/plesk/vmailbox.db'
Size: 12288 Blocks: 24 IO Block: 4096 regular file
Device: fd01h/64769d Inode: 8467876 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)

# stat /var/spool/postfix/plesk/virtual_domains.db
File: `/var/spool/postfix/plesk/virtual_domains.db'
Size: 12288 Blocks: 24 IO Block: 4096 regular file
Device: fd01h/64769d Inode: 8467874 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)

Please help me check if there's something wrong with the CHMOD access permission.

For more information about this issue:
I can create email account with root user, it fails when create email account on Plesk Control Panel.
/usr/local/psa/bin/mail -c [email protected] -cp-access false -mailbox true -passwd 123456

Thanks a lot.
 
I think that you should contact support team for fixing this broken Plesk.
 
Please provide me ticket ID when you create it. I will check how it will be processed.
 
Because the urgency of businuess, my customer decided to use abother Mail Server and did not submit a support ticket.
Thanks to your help.
 
Back
Top