Connecting with SQLGrey: Difference between revisions
No edit summary |
No edit summary |
||
Line 45: | Line 45: | ||
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 | If you're using the lastest Zimbra version: | ||
root# su - zimbra | root# su - zimbra |
Revision as of 02:57, 30 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"
If you're using the lastest 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.