moaa / postfix_redis

Postfix Redis Lookup Table Support / Postfix Redis Map

Home Page:titusjose.github.com/postfix_redis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Postfix Redis

This is a patch to the postfix 2.9.3 MTA to add a lookup table for redis database. This patch depends on hiredis client library.

Apply the patch to a vanilla postfix 2.9.3 source tree

Copy dict_redis.c, dict_redis.h and hiredis.h files to the src/global directory
Patch Makefile.in and mail_dict.c in src/global with the provided diffs

Generate make files

% make makefiles CCARGS="-DHAS_REDIS -I/usr/local/include/hiredis" AUXLIBS="-L/usr/local/lib -lhiredis"
Change the include and library location for hiredis client library if required.

Compile postfix

% make

Install postfix

% make install

Using the lookup table

transport_maps = redis:/etc/postfix/redis_transport_maps.cf

redis_transport_maps.cf:
host = localhost
port = 6379

About

Postfix Redis Lookup Table Support / Postfix Redis Map

titusjose.github.com/postfix_redis