Connecting with SQLGrey: Difference between revisions

No edit summary
No edit summary
Line 48: Line 48:


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.  
For 3.x Zimbra versions:


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


If you're using the lastest Zimbra version:
If you're using the lastest (4.x) Zimbra version:


     root# su - zimbra
     root# su - zimbra

Revision as of 21:43, 28 September 2006

SQLGrey

Download SQLGrey from:

http://sqlgrey.sourceforge.net/


Before install, you need

  * perl-Date-Calc (from Red Hat or CentOS CDs)
  * perl-Net-Server and perl-IO-Multiplex  (from DAG repository: http://apt.sw.be/redhat/el4/en/i386/RPMS.dag/)


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


Install SQLite packages

  * perl-DBD-SQLite
  * sqlite

(from DAG repository: http://apt.sw.be/redhat/el4/en/i386/RPMS.dag/)


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. For 3.x Zimbra versions:

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

If you're using the lastest (4.x) Zimbra version:

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


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