KyaPanel with Zimbra
This document will describe how to integrate Zimbra with KyaPanel.
Why?
- The main question is why?
KyaPanel has 4 years and it’s a mature mail management server. It provides some exclusive features to manage users and domains. In our - very suspect - point of view, KyaPanel is the best of it’s kind.
Otherwise, we like Zimbra Webmail’s Interface a lot. It’s true that Zimbra came with its own management interface, and it is beautiful, but it’s not so complete and flexible as KyaPanel.
Zimbra‘s admin interface is not that complete because it fails on making per user and per domain controls, like attachments and message size.
So, why not get together the best of these “two worlds”?
Installation
- Here we are going to explain the integration on the two possible scenarios.
- For now KyaPanel must be using OpenLDAP as database. Integrations with KyaPanel using MySQL or PostgreSQL are not supported.
KyaPanel on Zimbra Server
- This is the first scenario. Proceed as described below:
1 - Stop Zimbra;
2 - Install KyaPanel as described on it’s guides here
3 - After the installation, stop all services:
postfix, courier-authdaemon, courier-imap, courier-ldap, courier-pop, samba, postfix, slapd and clamav-daemon
4 - Go to /usr/share/kyapanel/mail/zimbra
5 - Run the script kp2z.sh
./kp2z.sh
- To run kp2z.sh, Zimbra must be stopped.
6 - Run the second script kp2z_users.sh
./kp2z_users.sh -a
- To run kp2z_users.sh, Zimbra must be started.
- kp2z_users.sh can run in interactive mode. Try -i option.
7 - Configure Apache to listen on any port you want, except 80
8 - Restart Apache
9 - Access KyaPanel through this port
10 - Go to E-mail Management → General Configurations → Postfix and follow the instructions.
11 - Restart Zimbra MTA with zmmtactl command
su zimbra -c"/opt/zimbra/bin/zmmtactl stop" su zimbra -c"/opt/zimbra/bin/zmmtactl start"
Zimbra on KyaPanel Server
- This is the second scenario. Proceed as described below:
1 - Stop all KyaPanel services:
postfix, courier-authdaemon, courier-imap, courier-ldap, courier-pop, samba, postfix, slapd, clamav-daemon and spamassassin
2 - Install Zimbra as described in their Guide
3 - Go to /usr/share/kyapanel/mail/zimbra
4 - Follow instructions from the chapter above...
ClamAV
- KyaPanel is ready to use ClamAV installed by Zimbra. You don’t have to be aware of it.
Even if KyaPanel‘s ClamAV configuration interface complains, don’t worry, it’s working.
Anti-Spam
- Zimbra came with Dspam installed, but KyaPanel uses SpamAssassin to do anti-spam protection. So, to get it running, install SpamAssassin as explained by its configuration interface on KyaPanel.
Troubleshooting
- Most common problems
The last argument is not a valid userAQUI3
- This message means that KyaPanel OpenLDAP entries hasn’t be imported correctly on Zimbra‘s OpenLDAP database.
To fix this you will need to delete ou=kya_panel branch from Zimbra‘s OpenLDAP database and run ./kp2z.sh again.
FAQ
What about the services conflict?
When you install Zimbra it’s came with it’s own services like Postfix, OpenLDAP and a HTTP Server and when you install all KyaPanel dependencies this services are installed as well.
So they will conflict when you reboot you Gnu/Linux making Zimbra stop to work.
What you need to know is that you want Zimbra running so disable all services from the system to be started and let Zimbra starts it’s own services.
This is clear in the Apache configuration where you make it work in a different port than 80.
What OpenLDAP must be running?
Yes, as you can see there are two OpenLDAP services available: Slapd feom the repositories and OpenLDAP from Zimbra.
When you made the integration between Zimbra and KyaPanel, the second migrates all it’s database from Slapd from the repositories to OpenLDAP from Zimbra. So all you need to do is let Zimbra’s OpenLDAP run.
Zimbra tells me that some services are not working
I get some errors messages from Zimbra like the below ones:
Starting logger...FAILED Starting logswatch...failed. Starting zmmtaconfig...failed. Starting mta...FAILED Starting zmmtaconfig...failed.
Don’t bother about this error messages. The reason of those is simple: KyaPanel prevents Zimbra to modify Postfix config files.
So, when Zimbras understands that he can’t change this files it’s get anger and try to spread fear and tels you that the service “failed”.
Relax...