Client experiencing several issues with IM&P, one of which is an error found on Diagnostics | System Troubleshooter. The External Database Troubleshooter tests indicated the external database was pingable, but the connection was failing. The External Database Settings indicated the solution was "Verify the hostname, username, and password are valid."
The usernames and passwords were reset, the external database re-associated, the message archiver settings reset, XCP Router restarted, etc., etc. The PostgresSQL user was made a superuser, connections could be made manually, the PostgresSQL config files and schema was thoroughly checked and it was discovered instant messages were logged appropriately, even with this error. My predecessor must have been satisfied things were therefore fine, despite the error messages. I can't personally can't stand things almost being finished.
The fix? The fix was ultimately simply changing the DB user password to something that did not include the '$' character.
Hope it helps.