Connecting with SQLGrey: Difference between revisions

(use the + syntax of zmprov to add a new value in addition to existing values)
No edit summary
Line 1: Line 1:
'''SQLGrey'''
Download SQLGrey from:
Download SQLGrey from:


Line 4: Line 7:




Before install, you need perl-Date-Calc, perl-Net-Server and perl-IO-Multiplex packages.
This example use SQLite as DB for SQLGrey (you can use MySQL, but SQLite it's so easy)
Install SQLite: packages perl-DBD-SQLite and sqlite
Install SQLGrey RPM:
  root# rpm -ivh sqlgrey-x.x.x-x.noarch.rpm
Configure SQLGrey: /etc/sqlgrey/sqlgrey.conf
  conf_dir = /etc/sqlgrey
  user = sqlgrey
  group = sqlgrey
  inet = 2501
  confdir = /etc/sqlgrey
  db_type = SQLite
  db_name = sqlgrey
Start SQLGrey:
  root# service sqlgrey start
  root# chkconfig sqlgrey on
'''Connecting SQLGrey with Zimbra Postfix'''


As the zimbra user, update zimbraMtaRestriction. I've added all the other restrictions that Zimbra suggests to add as well, including several Realtime Blackhole Lists (RBL). The important one is at the end.  
As the zimbra user, update zimbraMtaRestriction. I've added all the other restrictions that Zimbra suggests to add as well, including several Realtime Blackhole Lists (RBL). The important one is at the end.  

Revision as of 14:31, 18 August 2006

SQLGrey

Download SQLGrey from:

http://sqlgrey.sourceforge.net/


Before install, you need perl-Date-Calc, perl-Net-Server and perl-IO-Multiplex packages.

This example use SQLite as DB for SQLGrey (you can use MySQL, but SQLite it's so easy)

Install SQLite: packages perl-DBD-SQLite and sqlite


Install SQLGrey RPM:

  root# rpm -ivh sqlgrey-x.x.x-x.noarch.rpm



Configure SQLGrey: /etc/sqlgrey/sqlgrey.conf

  conf_dir = /etc/sqlgrey
  user = sqlgrey
  group = sqlgrey
  inet = 2501
  confdir = /etc/sqlgrey
  db_type = SQLite
  db_name = sqlgrey


Start SQLGrey:

  root# service sqlgrey start
  root# chkconfig sqlgrey on


Connecting SQLGrey with Zimbra Postfix

As the zimbra user, update zimbraMtaRestriction. I've added all the other restrictions that Zimbra suggests to add as well, including several Realtime Blackhole Lists (RBL). The important one is at the end.

   root# su - zimbra
   zimbra$ zmprov mcf +zimbraMtaRestriction "check_policy_service inet:127.0.0.1:2501"


Edit /opt/zimbra/conf/postfix_recipient_restrictions.cf

  ...
  reject_unauth_destination
  %%contains VAR:zimbraMtaRestriction check_policy_service inet:127.0.0.1:2501%%
  permit


Now restart zimbra, and it should all just work!

  root# su - zimbra
  zimbra$ zmcontrol stop
  zimbra$ zmcontrol start


Good luck, and enjoy.


--
Daniel Eugenin M.
IT Linux Ltda.

Jump to: navigation, search