Page 1 of 2

cbpolicyd - no such table: amavis_rules)

Posted: Wed May 29, 2013 7:22 am
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!

cbpolicyd - no such table: amavis_rules)

Posted: Wed May 29, 2013 2:13 pm
by quanah
You fail to note your version of ZCS, but there are some significant fixes to cbpolicyd in ZCS 8.0.4.

cbpolicyd - no such table: amavis_rules)

Posted: Wed May 29, 2013 3:27 pm
by thiagotgc
My version of Zimbra is 8.0.3


Do not leave any patch fix before?

cbpolicyd - no such table: amavis_rules)

Posted: Wed May 29, 2013 5:10 pm
by quanah
You can create the amavis DB via sqlite using the database schema in /opt/zimbra/cbpolicyd/share/database/amavis.tsql

cbpolicyd - no such table: amavis_rules)

Posted: Wed May 29, 2013 5:19 pm
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

cbpolicyd - no such table: amavis_rules)

Posted: Tue Jun 04, 2013 7:45 am
by thiagotgc
Could you pass me how can I fix this error?

cbpolicyd - no such table: amavis_rules)

Posted: Tue Jun 04, 2013 10:13 am
by quanah
Upgrade to 8.0.4, then load the schema into cbpolicyd would do it.

cbpolicyd - no such table: amavis_rules)

Posted: Thu Jun 06, 2013 7:13 pm
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

cbpolicyd - no such table: amavis_rules)

Posted: Tue Jun 18, 2013 8:18 pm
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)

cbpolicyd - no such table: amavis_rules)

Posted: Tue Jun 18, 2013 8:20 pm
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......:)