Thursday, 23 January 2014

Zentyal - Mail Server - Webmail and RDNS

I have set up a mail server based on Zentyal and was very happy with it, but noticed a issue with the RDNS test. So I remembered that I just clicked Next when I set up the server on host name - I should have thought on the consequences first. When you set up Zentyal and set the domain name and hostname be sure that it matches what you need for the mail service. If you change it afterwards in System>General> Hostname&Domain you will have to recreate all the mailboxes and aliases in Office>User and Computers>Manage. But this was only the begining of this adventure:

I got an error on the webmail:

DATABASE ERROR: CONNECTION FAILED!
 
Unable to connect to the database!
Please contact your server-administrator.

To fix this:
Disable the webmail service in 'Module Status'
sudo nano /etc/mysql/conf.d/zentyal.cnf
and change this line as shown: innodb=on
then: service mysql restart
get the MySQL pass: sudo cat /var/lib/zentyal/conf/zentyal-mysql.passwd
then: sudo mysql -p
Execute this query: DROP DATABASE roundcube;
Run this script: sudo /usr/share/zentyal-webmail/enable-module
Re-enable the webmail service in 'Module Status'

Easy huh. Everything is working now. Think about it when you click Next.