cbpolicyd - no such table: amavis_rules)

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
thiagotgc
Posts: 30
Joined: Fri Sep 12, 2014 11:38 pm

cbpolicyd - no such table: amavis_rules)

Post by thiagotgc »

Hello friends.


I'm using cbpolicyd, however the settings Amavis Seasons specific giving the following error as soon as I click save.


Array ([0] => HY000 [1] => 1 [2] => no such table: amavis_rules)


What can I do to resolve?


Thank you!
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1668
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

cbpolicyd - no such table: amavis_rules)

Post by quanah »

You fail to note your version of ZCS, but there are some significant fixes to cbpolicyd in ZCS 8.0.4.
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
thiagotgc
Posts: 30
Joined: Fri Sep 12, 2014 11:38 pm

cbpolicyd - no such table: amavis_rules)

Post by thiagotgc »

My version of Zimbra is 8.0.3


Do not leave any patch fix before?
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1668
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

cbpolicyd - no such table: amavis_rules)

Post by quanah »

You can create the amavis DB via sqlite using the database schema in /opt/zimbra/cbpolicyd/share/database/amavis.tsql
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1668
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

cbpolicyd - no such table: amavis_rules)

Post by quanah »

I found that this particular issue is still present in 8.0.4 as well. I've fixed the cbpolicyd intialization script to correctly add amavis & accounting schema on fresh installs, and will work on getting that fixed for upgrades in 8.0.5
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
thiagotgc
Posts: 30
Joined: Fri Sep 12, 2014 11:38 pm

cbpolicyd - no such table: amavis_rules)

Post by thiagotgc »

Could you pass me how can I fix this error?
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1668
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

cbpolicyd - no such table: amavis_rules)

Post by quanah »

Upgrade to 8.0.4, then load the schema into cbpolicyd would do it.
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
User avatar
quanah
Zimbra Alumni
Zimbra Alumni
Posts: 1668
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

cbpolicyd - no such table: amavis_rules)

Post by quanah »

Ok, I've checked in the sql file that you can use to load the amavis and accounting schema in to ZCS 8.0.4. You will be able to pull it out of the p4 repo.
Alternatively, you can just do this once you've upgraded to ZCS 8.0.4:


/opt/zimbra/cbpolicyd/share/database/convert-tsql sqlite /opt/zimbra/cbpolicyd/share/database/accounting.tsql | sed -e '/^#/d' >/tmp/q.sq3

/opt/zimbra/cbpolicyd/share/database/convert-tsql sqlite /opt/zimbra/cbpolicyd/share/database/amavis.tsql | sed -e '/^#/d' >>/tmp/q.sq3

cd /tmp

sqlite3 /opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb
--
Quanah Gibson-Mount
Product Architect, Symas http://www.symas.com/
OpenLDAP Core team http://www.openldap.org/project/
thiagotgc
Posts: 30
Joined: Fri Sep 12, 2014 11:38 pm

cbpolicyd - no such table: amavis_rules)

Post by thiagotgc »

[quote user="quanah"]Upgrade to 8.0.4, then load the schema into cbpolicyd would do it.[/QUOTE]
Friends, updated Zimbra and the error continues.


As soon as I try to add a rule to the policyd Amavis appears the error:


Array ([0] => HY000 [1] => 1 [2] => no such table: amavis_rules)
thiagotgc
Posts: 30
Joined: Fri Sep 12, 2014 11:38 pm

cbpolicyd - no such table: amavis_rules)

Post by thiagotgc »

[quote user="quanah"]Ok, I've checked in the sql file that you can use to load the amavis and accounting schema in to ZCS 8.0.4. You will be able to pull it out of the p4 repo.
Alternatively, you can just do this once you've upgraded to ZCS 8.0.4:


/opt/zimbra/cbpolicyd/share/database/convert-tsql sqlite /opt/zimbra/cbpolicyd/share/database/accounting.tsql | sed -e '/^#/d' >/tmp/q.sq3

/opt/zimbra/cbpolicyd/share/database/convert-tsql sqlite /opt/zimbra/cbpolicyd/share/database/amavis.tsql | sed -e '/^#/d' >>/tmp/q.sq3

cd /tmp

sqlite3 /opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb
[/QUOTE]


Thanks... Works......:)
Post Reply