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

Resolved Error: mailmng-outgoing failed: ERROR:outgoing:UNIQUE constraint failed: domains.name

9musashi

Basic Pleskian
Hello, I have fresh Plesk Onyx (Version 17.5.3 Update #4) , I use Plesk migrator to migrate all domains from old server (Plesk 12.5.30 Update #63) to here.

When I tried to add new domain as admin it shows error "Error: Domain Service Web not exists: domain=mydomain.tld, id=26". but the domain has been created and I removed it from Plesk GUI. After that I googling and try to repair the database using "plesk repair db", it found some error
"Inconsistency in the table 'dns_recs' for the column dns_zone_id: No rows in the table 'dns_zone' ...
Remove unnecessary rows from the table 'dom_param'? [Y/n] Y
Removing unnecessary rows ....................................... [FIXED]"

But now everytime I add new domain its shows different error:
"Error: mailmng-outgoing failed: ERROR: outgoing:UNIQUE constraint failed: domains.name"
but when I checked at domain list it appears that the domain has been created.

I checked with:
# sqlite3 /var/lib/plesk/mail/outgoing/data.db
>SELECT id,name,subscription_id,out_limit FROM domains WHERE name='mydomain.tld';
21|mydomain.tld|21|500
It looks like the domain still in the database ? Although I already delete it from Plesk GUI.

I also check my old Plesk 12.5. and try to add new domain and it shows error "Error: Domain Service Web not exists: domain=mydomain.tld, id=69". I tried to repair db with "plesk repair db" command but it shows no error:
"Error messages: 0; Warnings: 0; Errors resolved: 0"

FYI, I don't want to continue using the Plesk 12.5 server but only report this just in case it has some relation with my Plesk 17.5.3 error.

UPDATE: All the above errors is when I try to add domain as admin. Now I check to add domain as reseller, and it shows no error.
 
Last edited:
Hello,

I think I've made mistake by deleting "Unlimited" (administrator) service plan without removed the domain inside the plan first.

Now if I try to add that specific domain again, it will shows error "mailmng-outgoing failed: ERROR: outgoing:UNIQUE constraint failed: domains.name"

If I continue to use that domain, the mail feature will be missing - I cannot enable mail on this domain.

Code:
# /usr/local/psa/bin/domain --update mydomain.com -mail_service true
ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/mailmng-outgoing' '--add-subscription' '--main-domain-name=mydomain.com' '--out-limit=500'] with exit code [1]
mailmng-outgoing failed: ERROR:outgoing:UNIQUE constraint failed: domains.name

I already move the domain from "Unlimited" plan to "My Domain" plan but still I cannot enable the Mail Function.

How do I correct this error from my Plesk ? Please help.
 
I solved this issue by running these command in , but I dont know which one is fix that issue because I already run all of them without success before:

Code:
# /usr/local/psa/admin/sbin/mchk --with-spam
==> Checking for: mailsrv_conf_init... ok
==> Checking for: mail_handlers_init... ok
==> Checking for: mailsrv_entities_dump... ok
==> Checking for: mail_admin_aliases... ok
==> Checking for: mail_auth_dump... ok
==> Checking for: mailman_lists_dump... ok
==> Checking for: mail_kav8_restore... ok
==> Checking for: mail_responder_restore... ok
==> Checking for: mail_imap_restore... ok
==> Checking for: mail_spam_restore... not found, skipped
==> Checking for: mail_grey_restore... ok
==> Checking for: mail_mailbox_restore... ok
==> Checking for: mail_spf_restore... ok
==> Checking for: mail_dk_restore... ok
==> Checking for: mail_dmarc_restore... ok
==> Checking for: mail_drweb_restore... ok
==> Checking for: mail_outgoing_restore... ok
==> Checking for: mail_transport_restore... ok


Run "Unlock & Sync" for that domain at Plesk GUI

#/usr/local/psa/bin/domain --update mydomain.com -mail_service true
SUCCESS: Update of domain 'mydomain.com' completed.
 
I solved this issue by running these command in , but I dont know which one is fix that issue because I already run all of them without success before:

Code:
# /usr/local/psa/admin/sbin/mchk --with-spam
==> Checking for: mailsrv_conf_init... ok
==> Checking for: mail_handlers_init... ok
==> Checking for: mailsrv_entities_dump... ok
==> Checking for: mail_admin_aliases... ok
==> Checking for: mail_auth_dump... ok
==> Checking for: mailman_lists_dump... ok
==> Checking for: mail_kav8_restore... ok
==> Checking for: mail_responder_restore... ok
==> Checking for: mail_imap_restore... ok
==> Checking for: mail_spam_restore... not found, skipped
==> Checking for: mail_grey_restore... ok
==> Checking for: mail_mailbox_restore... ok
==> Checking for: mail_spf_restore... ok
==> Checking for: mail_dk_restore... ok
==> Checking for: mail_dmarc_restore... ok
==> Checking for: mail_drweb_restore... ok
==> Checking for: mail_outgoing_restore... ok
==> Checking for: mail_transport_restore... ok


Run "Unlock & Sync" for that domain at Plesk GUI

#/usr/local/psa/bin/domain --update mydomain.com -mail_service true
SUCCESS: Update of domain 'mydomain.com' completed.
Please where do I run the command?
 
Back
Top