• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Mail account removal problem

J

JoonasK

Guest
Hi,

I'm unable to remove mail accounts. After confirmation I get the following error message:
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 'molentum.fi', string 'testi')
3: cmd_mail.php3:1357
mn_del(string '249')
4: class.MailNamesList.php:597
MailNamesList->remove(array)
5: mail_names_remove.php:55

I've try to fix this problem with admin/sbin/mchk but no luck.

Any suggestions what would help.
 
Hello

Please try to do it from command line with:
/usr/local/psa/bin/mail -r testi@molentum.fi
Probably the error will be more helpful. Post here the error you are getting.
Also, before that you can try to reconfigure domain with:
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=molentum.fi
and try to remove mailbox again.
 
Hi Yulia,

mail -r user@domain.fi gives me following errors:
ERROR: SpamFilterFatalException
object ID is invalid

0: SpamFilter.php:462
SpamFilter->setError_(string 'object ID is invalid')
1: class.cObject.php:399
cObject->delete()
2: SpamFilter.php:401
SpamFilter->delete()
3: MailName.php:720
Mailname->_onMailNameDelete()
4: MailName.php:1075
Mailname->delete()
5: cuMail.php:920
cuMail->_remove(string 'user@domain.fi')
6: cuMail.php:896
cuMail->cmdRemove(string 'user@domain.fi')
7: cuMail.php:509
cuMail->execute()
8: mail.php:27
PHP Warning: Releasing semaphore 29 in request cleanup in Unknown on line 0

I also checked accounts spam filter setting and they were off. When I tried to enable those I got this messages:
0: common_func.php3:108
psaerror(string 'Error: Can't create Account object: Account: unable to select: no such row in the table')
1: client.domain.mail.mailname.php:86
plesk__client__domain__mail__mailname->accessItemOverview(string 'GET', NULL null)
2: client.domain.mail.mailname.php:160
__plesk__client__domain__mail__mailname->accessItem(string 'GET', NULL null)
3: UIPointer.php:596
UIPointer->access(string 'GET')
4: plesk.php:38

So am I figuring this right that there's really something wrong in the psa db?
 
Hi,

Judging by error message "Can't create Account object: Account: unable to select: no such row in the table" it looks like corresponding record for this mail user in accounts table in Parallels Plesk database is missing.

Below is a how-to example you can use to check it. I am checking on test account test@test.test:

1. Find id of domain in database:
mysql> select id from domains where name='test.test';
+----+
| id |
+----+
| 3 |
+----+

So in my case id of domain is 3


2. Next we find account id of mail user:
mysql> select id,dom_id,mail_name,account_id from mail where dom_id=3;
+----+--------+-----------+------------+
| id | dom_id | mail_name | account_id |
+----+--------+-----------+------------+
| 7 | 3 | test | 49 |
+----+--------+-----------+------------+

So account id of mail user test@test.test is 49


3. Let's check if there is corresponding record in 'accounts' table:
mysql> select * from accounts where id=49;
Empty set (0.00 sec)

See, no records are available and that is not correct. We should have records with id=49 here so let's add it:

mysql> insert into accounts values (49,'plain','testpwd');
Query OK, 1 row affected (0.00 sec)

49 is ID of account
'testpwd' is password - you should place account password instead of it (but as you are going to delete it anyway you can use anything here).

So now we have missing record:
mysql> select * from accounts where id=49;
+----+-------+----------+
| id | type | password |
+----+-------+----------+
| 49 | plain | testpwd|
+----+-------+----------+

And we should be able to delete this mail account.

Try doing same for your mail user.
Hope this helps.
 
I found that deleting the accounts directly from the database was necessary, since there was no account tree for the address under /var/qmail/mailnames

Your SQL was a great starting point, igors, but this is simpler to find the broken accounts:

Code:
select * from mail where account_id not in (select id from accounts);
 
Back
Top