Re: [exim] Greylist memcached perl implementation

Top Page
Delete this message
Reply to this message
Author: Chris Laif
Date:  
To: exim-users
Subject: Re: [exim] Greylist memcached perl implementation
On Tue, Jul 28, 2009 at 11:39 AM, Mike
Cardwell<exim-users@???> wrote:
> Chris Laif wrote:
>
>> We definitely need native memcached support compiled in exim. It would
>> be very useful to cache all kinds of lookup data (routing and user
>> information ...) as well. Currently exim looses all these information
>> as it is forking new processes for every mail processed.
>> Cache-invalidation might be a serious problem but there exist several
>> ways to solve it.
>
> I wouldn't go so far as, "definitely need," but I'd certainly go so far
> as to say, "very nice to have."
>


;-)


> I suspect it would be a good project for someone who is learning the
> code base. They could take much of the code that exists for socket
> connections with ${readsocket} and build on that.


I would suggest to use the client library 'libmemcached' and not to
re-implement the memcached protocol. The client library is able to
talk the binary protocol as well (increased performance).


> This would be nice:
>
> hostlist memcache_servers = <; 127.0.0.1:11211 ; 192.168.0.1:11211
> NAMESPACE = exim
>
> ${memcached{+memcache_servers}{NAMESPACE}{set}{key}{value}}
> ${memcached{+memcache_servers}{NAMESPACE}{set}{key}{value}{+1d}}
> ${memcached{+memcache_servers}{NAMESPACE}{get}{key}{$value}{None}}
>


Maybe it is more conform with the other database types to use a syntax
like this:

memcached_servers = <; 127.0.0.1 ; 192.168.0.1:12345
memcached_namespace = exim

acl_m_foo = ${lookup memcached{...}}

Chris