On Jul 30, 2009, at 11:12 AM, Stephan Bosch wrote:

Jonathan Siegle schreef:
I'm looking at implementing sieve in my environment.
Software is:
dovecot-1.2-sieve revision 1022:3c9a22c28156
dovecot-1.2 revision 9269:a303bb82c1c9
AIX 5.3 with sendmail mta using prescribed deliver lda.
I have a few questions. I'll have 110k sieve files(1 for each user). Does sieve read the file each time a new message is accepted by sendmail? Are there any measurements on cpu load for sieve filters?
If all is configured correctly, the Sieve scripts are compiled once each time they are changed or created. After that, the deliver LDA only reads the compiled binary from disk for each message.

I recently found out about something called memcached. The goal of memcached(server)[1] and libmemcached(client library)[2] is to store maps in memory of tokens. So my key would be "jsiegle_sieve" and my data would be my sieve file. So instead of the 10-20 million reads to disk, we would just pull from memory. The logic looks like this:

On update of sieve file,
        Do validation of file.
        Do compilation of file.
        Delete key if it exists and add new.

On new mail, sieve plugin would call memcached_get() and get the token. I could be very wrong, but I think this is a big win. memcached is designed for small files(<1MB). So if each of my users has a 2KB file, that would only be 20MB of memory for usage.


[1] http://www.danga.com/memcached/
[2] http://tangent.org/552/libmemcached.html


-Jonathan

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to