Unable to remove a customer in Plesk: Unable to load object of type Mailname wit

Started by senthil, Oct 21, 2025, 07:23 AM

Previous topic - Next topic

senthil

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Symptoms

The following error appears in Plesk UI during an attempt to delete a customer:
Error: Some of the selected customers were not deleted. Unable to remove customer:
Unable to load object of type Mailname with id=64: Unable to create domain with ID
"498"
The same error can be obtained in the Plesk log.

Cause

The issue is caused by a psa database inconsistency. It occurs if a record in the psa.mail table points to
a non-existent domain ID.

Resolution

  • Create a database backup.
  • Make sure that the domain with id mentioned in wthe arning does not exist:
    mysql> select id, name from domains where id=498;
    Empty set (0.00 sec)
  • Check how many mailnames belong to the non-existent domain:
    mysql> select id,mail_name,dom_id from mail where dom_id=498;
    +----+-----------+--------+
    | id | mail_name | dom_id |
    +----+-----------+--------+
    | 26 | user1     | 498 |
    | 10 | user2     | 498 |
    | 11 | user3     | 498 |
    | 23 | user4     | 498 |
    | 64 | user5     | 498 |
    +----+-----------+--------+
  • Remove these mailnames:
    mysql> delete from mail where dom_id=498;
  • Remove the customer in Hosting Services > Customers