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)

Postby thiagotgc » Wed May 29, 2013 7:22 am

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: 1667
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

cbpolicyd - no such table: amavis_rules)

Postby quanah » Wed May 29, 2013 2:13 pm

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)

Postby thiagotgc » Wed May 29, 2013 3:27 pm

My version of Zimbra is 8.0.3


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

cbpolicyd - no such table: amavis_rules)

Postby quanah » Wed May 29, 2013 5:10 pm

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: 1667
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

cbpolicyd - no such table: amavis_rules)

Postby quanah » Wed May 29, 2013 5:19 pm

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)

Postby thiagotgc » Tue Jun 04, 2013 7:45 am

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

cbpolicyd - no such table: amavis_rules)

Postby quanah » Tue Jun 04, 2013 10:13 am

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: 1667
Joined: Fri Sep 12, 2014 10:33 pm
Contact:

cbpolicyd - no such table: amavis_rules)

Postby quanah » Thu Jun 06, 2013 7:13 pm

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)

Postby thiagotgc » Tue Jun 18, 2013 8:18 pm

[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)

Postby thiagotgc » Tue Jun 18, 2013 8:20 pm

[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......:)

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 9 guests