Hello Makers,

If you can't able to turn on the mail service for one of your domains and getting the error message (mailmng-outgoing failed: ERROR:outgoing:UNIQUE constraint failed: domains.name) while turning on the mail service, then this guide will help you to fix this error.

First, you need to login into your server via SSH and run the commands below:

# /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... not found, skipped
==> 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

And after running this command, you need to run "Unlock & Sync" for that domain at Plesk GUI. For this, you need to run the command below:

#/usr/local/psa/bin/domain --update yourdomain.com -mail_service true
SUCCESS: Update of domain 'mydomain.com' completed.

For your clarification, you only need to run two commands.

Command 1:

# /usr/local/psa/admin/sbin/mchk --with-spam

Once you run this command, Plesk will check mail services and you'll get the results. After this, you need to run the command below.

Command 2:

#/usr/local/psa/bin/domain --update yourdomain.com -mail_service true

Note: Don't forget to replace yourdomain.com with your domain, that you're having issues with.

And that's it! If you're still getting the same error, please feel free to contact us!

Happy Making!

Did this answer your question?