Postfix, Omar Kilani’s Memcache Patch Try-Out

No Comments »

I was rewrote Omar Kilani’s memcache patch couple of weeks ago. But that was not tested due to lack of time and unavailability of servers that can be used.

Now, i got chance to implement simple test. This is my configuration:

smtpd_recipient_restrictions =
   check_recipient_access memcache:/etc/postfix/,

servers = localhost:11211
key_format = %s

Entry on memcache	REJECT	not allowed

Query using postmap

$ postmap -q "" memcache:/etc/postfix/
postmap: dict_memcache_lookup: using key_format '%s'
postmap: plmemcache_get: fetching key from memcache
postmap: plmemcache_get: key => REJECT not allowed
postmap: dict_memcache_lookup: returned REJECT not allowed
REJECT not allowed

A little bit too verbose i guess, but it can be adjusted by modifying source code.
Read the rest of this entry »


Postfix, old memcache lookup table patch

No Comments »

Yesterday, I was idly fiddling with the old patch postfix “memcached lookup table” created by Omar Kilani . unfortunately, patches can only be used for old postfix distributions (2.1.x – Released 2005-04-01, 2.2.x – Released 2005-04-01).

I rewrote the patch (code was not modified) so it can be applied against last postfix-2.9-20110706 snapshot.
This patches required memcached and libmemcache .

I was successfully compiled it, but not test it yet whether it will work or not. so it’s not recommended for use on production servers.

$ wget
$ tar xzf postfix-2.9-20110706.tar.gz
$ cd postfix-2.9-20110706

Postfix memcache patch can be download here:
postfix-2.9-20110706-memcache.patch (558)

Patch postfix source distribution

$ patch -p1 < ../postfix-2.9-20110706-memcache.patch
patching file html/DATABASE_README.html
patching file html/
patching file html/MEMCACHE_README.html
patching file html/memcache_table.5.html
patching file man/
patching file man/man5/memcache_table.5
patching file proto/DATABASE_README.html
patching file proto/
patching file proto/MEMCACHE_README.html
patching file proto/memcache_table
patching file src/global/dict_memcache.c
patching file src/global/dict_memcache.h
patching file src/global/mail_dict.c
patching file src/global/

Read the rest of this entry »

keep looking »