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