Unable to rename or remove a domain in Plesk: mailmng-outgoing failed: ERROR:

Started by mahesh, May 04, 2024, 07:53 AM

Previous topic - Next topic

mahesh

Question: Unable to rename or remove a domain in Plesk: mailmng-outgoing failed: ERROR:outgoing:No backend DB entries were modified
Symptoms
  • Unable to manage domain settings (rename a domain, change a hosting type, add an email account, etc.):
mailmng-outgoing failed: ERROR:outgoing:No backend DB entries were modified.

mailmng-outgoing failed: ERROR:outgoing:domain_aliases.domain_id may not be NULL

  • In /var/lib/plesk/mail/outgoing/data.db SQLite database, there is a record about alias.example.com:
#sqlite3 /var/lib/plesk/mail/outgoing/data.db
sqlite> SELECT id,name,subscription_id,out_limit FROM domains WHERE name='alias.example.com';
13|alias.example.com|11|500
'

#plesk db 'select id, name from domains where name like "%alias.example.com%";'
Empty set (0.00 sec)
Cause
An inconsistency of internal database: a domain was not renamed.

Resolution
1.Connect to the server using SSH.

2.Create a backup of /var/lib/plesk/mail/outgoing/data.db database:

#cp /var/lib/plesk/mail/outgoing/data.db{,_bk}
3.Log in to SQLite database:

#sqlite3 /var/lib/plesk/mail/outgoing/data.db
4.Get the ID of the domain:

SELECT id,name,subscription_id,out_limit FROM domains WHERE name='alias.example.com';
10|alias.example.com|1|130

5.Rename the domain using the domain ID from the previous step:

UPDATE domains SET name='example.com' WHERE id=10;
If it is necessary to remove domain, delete the related records from the database:

DELETE FROM domains WHERE id=10;
6.Verify the directory /var/qmail/mailnames/example.com does not exist. If it exists, perform steps from this article:
Unable to swap domain and domain alias names: boost::filesystem::filesystem_error Directory not empty

Note: if additional errors occur during the attempt to rename a domain, step 5 should be repeated.