Re: [Dovecot] Best way to migrate from qmail-ldap's autoreply?

2010-09-03 Thread Timo Sirainen
On Thu, 2010-09-02 at 18:12 +0200, Attila Nagy wrote:

 qmail-ldap uses four LDAP attributes for handling autoreplies in 
 qmail-local:
 - deliverymode (to see whether the autoreply should be send)
 - mailreplytext, which is a base64 encoded multiline string*
 - mailreplystart and mailreplystop, unix dates
..
 - conditionally provide these values to a sieve script and process them 
 accordingly (the base64 string and maybe the dates seem to be hard for 
 the first glimpse)

This seems like the way to do it. Just generate a Sieve script vacation
script whenever those values change. I don't know if you can do the
start/end dates easily, maybe write something else that just generates a
simple unconditional vacation script when the start date arrives and
removes the script when the end date comes?



[Dovecot] Best way to migrate from qmail-ldap's autoreply?

2010-09-02 Thread Attila Nagy

 Hi,

qmail-ldap uses four LDAP attributes for handling autoreplies in 
qmail-local:

- deliverymode (to see whether the autoreply should be send)
- mailreplytext, which is a base64 encoded multiline string*
- mailreplystart and mailreplystop, unix dates

I'm wondering how this could be handled with Dovecot (2.0) in the most 
easier way.

All I could find out so far:
- patching the code
- writing a plugin (it it possible to get these LDAP attributes in the 
LMTPd with a single userdb-lookup and get it from the plugin during a 
new mail event? Any examples?)
- conditionally provide these values to a sieve script and process them 
accordingly (the base64 string and maybe the dates seem to be hard for 
the first glimpse)

the mad stuff:
- using an LD_PRELOAD library, which emulates per user sieve scripts 
according to LDAP lookups (gives a lot more flexibility)
- an LMTP proxy/server, which does all this and forwards the traffic to 
the Dovecot LMTPd/deliver process


* a sample mailreplytext looks like this:
'''%HEADER%
Content-type: text/plain; charset=utf-8

távol vagyok'''

(of course this is in UTF-8).