1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Mail account removal problem

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by JoonasK, Jul 29, 2009.

  1. JoonasK

    JoonasK Guest


    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
    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.
  2. Yulia Kostina

    Yulia Kostina Guest


    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.
  3. JoonasK

    JoonasK Guest

    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
    2: SpamFilter.php:401
    3: MailName.php:720
    4: MailName.php:1075
    5: cuMail.php:920
    cuMail->_remove(string 'user@domain.fi')
    6: cuMail.php:896
    cuMail->cmdRemove(string 'user@domain.fi')
    7: cuMail.php:509
    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?
  4. Yves Vogl

    Yves Vogl Basic Pleskian

    Feb 5, 2009
    Likes Received:
    The same issue here. Just right after the upgrade vom 9.2.0 to 9.2.2
  5. majidA

    majidA Guest

    any suggestion?
  6. igors

    igors Basic Pleskian

    Sep 1, 2009
    Likes Received:

    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.
  7. shall

    shall Regular Pleskian

    Apr 2, 2007
    Likes Received:
    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:

    select * from mail where account_id not in (select id from accounts);