Zimbra 10 CBPolicyd

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
Koala
Posts: 10
Joined: Sat Nov 26, 2022 8:34 pm

Zimbra 10 CBPolicyd

Post by Koala »

Hello all,

I installed Zimbra Multi Server 10 NE. All goes well. However I can't follow tutorial to enable cbpolicyd on zimbra MTA.

From the tutorial example that I followed:
https://wiki.zimbra.com/wiki/CBPolicyD_Management

I'm stuck on a step
Setting up CBPolicyd with Zimbra MariaDB.
Is mariadb needed on mta? If yes, why when I try to login to mysql in MTA there is the following error?
$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/zimbra/data/tmp/mysql/mysql.sock' (2 "No such file or directory")


Is there an incorrect configuration?
Please enter if you have other tutorials for cbpolicyd zimbra 10 multiserver

Thank You
ozhzimbra
Posts: 8
Joined: Tue Jan 16, 2024 12:51 am

Re: Zimbra 10 CBPolicyd

Post by ozhzimbra »

thanks for posting !

same issue here, it is most likely due to MySQL not being initialised on this server, which is what I'm trying to do now using /opt/zimbra/libexec/zmmyinit --sql_root_pw

however that one is also borking on me at the moment, argh .. will post back more once I get through this hurdle
User avatar
adrian.gibanel.btactic
Outstanding Member
Outstanding Member
Posts: 237
Joined: Thu Jan 30, 2014 11:13 am

Re: Zimbra 10 CBPolicyd

Post by adrian.gibanel.btactic »

Koala wrote: Fri May 03, 2024 1:58 pm https://wiki.zimbra.com/wiki/CBPolicyD_Management

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/zimbra/data/tmp/mysql/mysql.sock' (2 "No such file or directory")
ozhzimbra wrote: Wed Jan 15, 2025 6:39 am same issue here, it is most likely due to MySQL not being initialised on this server, which is what I'm trying to do now using /opt/zimbra/libexec/zmmyinit --sql_root_pw

however that one is also borking on me at the moment, argh .. will post back more once I get through this hurdle
MariaDB server or Mysql server is only installed if you have installed a mailbox ( zimbra-store ). If you have a multi server you might have a separated mta node (where to install CBPolicyD) with no Mailbox / zimbra-store / Mysql server / Mariadb server, so that's why.

Not sure how to help you there but I wouldn't add mailbox capabilities to an mta node just to add mysql to it.
ozhzimbra
Posts: 8
Joined: Tue Jan 16, 2024 12:51 am

Re: Zimbra 10 CBPolicyd

Post by ozhzimbra »

but I wouldn't add mailbox capabilities to an mta node just to add mysql to it.
thanks for your comments ! now it's clear why the MySQL was not initialized, and definitely agreed about not feeling quite OK to install it on the MTA ..

I'll check if I can maybe use Mbox MySQL instead, or maybe SQlite could be even better
ozhzimbra
Posts: 8
Joined: Tue Jan 16, 2024 12:51 am

Re: Zimbra 10 CBPolicyd

Post by ozhzimbra »

SQlite was mentioned here - https://wiki.zimbra.com/wiki/Cluebringer_Policy_Daemon - but indeed seems like MariaDB is now recommended + this how-to apparently is for ZCS 8 not version 10
ozhzimbra
Posts: 8
Joined: Tue Jan 16, 2024 12:51 am

Re: Zimbra 10 CBPolicyd

Post by ozhzimbra »

did some more checking and asking, so indeed
  • the separate MTA is not supposed to have MySQL on it - only Mailbox servers have it, from my understanding
  • with SQlite in our case, we will need to also sync them between two MTAs, so I am not going to go there
  • we'll go with fully separate MariaDB environment for it, now the only issue here is that install script is only capable to do it with local MySQL ... will need to modify that a bit to make it work
Post Reply