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 aboutalias.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' -
There is no
alias.example.com record
inpsa.domains
table:# plesk db 'select id, name from domains where name like "%alias.example.com%";'
Empty set (0.00 sec)
Cause
An inconsistency of external database: a domain was not renamed.
Resolution
-
Connect to the server using SSH.
-
Create a backup of
/var/lib/plesk/mail/outgoing/data.db
database:# cp /var/lib/plesk/mail/outgoing/data.db{,_bk}
-
Log in to SQLite database:
# sqlite3 /var/lib/plesk/mail/outgoing/data.db
-
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 -
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;
-
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.