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

Modified on Mon, 31 Mar at 8:15 PM

When you have had a domain previously on your server with the mail service disabled, a situation may occur where re-adding the same domain may result in an error:

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

To resolve this, the following command may be used to enable the mailbox. Please note that it will output an error, but after this you may re-add the domain again:

/usr/local/psa/bin/domain --update YOURDOMAIN.COM -mail_service true

The following may help as well, but may require a longer time to run and may impact the server performance negatively:

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

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article