Symptoms
When trying to compose an email and use contacts auto-complete you may see an internal server error. The same occurs if you access Contacts and then click into cPanel CardDav. The same error will occur.
Description
The first step here is to tail the user's RoundCube log file. Replace the $user variable with the actual cPanel username.
tail -0f /home/$user/logs/roundcube/errors.log
If you see:
Failed connect to somedomain.com:2080; Connection refused
then it is likely somedomain.com doesn't resolve to this server and gets this connection refused error.
Workaround
The mailbox SQLite database will need to be updated to use the server's hostname instead of the domain name in order for the connections to remain locally on this server itself. The mailbox RoundCube SQLite database is located in
/home/$user/etc/$domain/$mailuser.rcube.db
Let's say the user is fastcars and the domain is veryfastcars.com with email account mustang@veryfastcars.com you would use the following to access that mailbox via sqlite
/usr/local/cpanel/3rdparty/bin/sqlite3 /home/fastcars/etc/veryfastcars.com/mustang.rcube.db
Then to change the domain somedomain.com to the server hostname like myserver.host.com you would execute the following SQL statement
UPDATE carddav_addressbooks SET URL = replace( url, 'somedomain.com', 'myserver.host.com') WHERE url LIKE '%somedomain.com%';
Then you can check the results by running;
select * from carddav_addressbooks;
After confirming the change was correct or the command needs to be run again to change the host again you can quit by typing ".quit" and hitting enter.
Next, test RoundCube and the error should be cleared.
Comments
0 comments
Article is closed for comments.