[exim] Problems with sieve filters and LDAP virtual users

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Javier Calahorra Novillo
Data:  
Para: exim-users
Assunto: [exim] Problems with sieve filters and LDAP virtual users
Hello all,

We´ve configured Exim(v4)+Courier-imap+IMP+Maildir. Our users are virtual ones stored in an OpenLDAP, with the appropriate extended schema. We´ve defined the following router and transport, and everything runs ok:

ldapuser:
driver = accept
condition = ${if eq {}{${lookup ldap {ldap://192.168.45.27/ou=usuarios,dc=xxxx,dc=es?mailMessageStore?sub?(&(mail=${local_part}@${domain})(objectclass=person))}}}{no}{yes}}
retry_use_local_part
transport = ldap_delivery


ldap_delivery:
driver = appendfile
maildir_format = true
maildir_tag = ,S=$message_size
quota_size_regex = ,S=(\d+)
maildir_use_size_file = true
directory = ${lookup ldap {ldap://192.168.45.27/ou=usuarios,dc=xxxx,dc=es?mailMessageStore?sub?(uid=${local_part})} {$value} fail }/Maildir
create_directory = true
directory_mode = 0700
delivery_date_add
envelope_to_add
user = vmail
group = vmail
mode = 0660
quota = ${lookup ldap {ldap://192.168.45.27/ou=usuarios,dc=xxxx,dc=es?mailQuotaSize?sub?(uid=${local_part})} {$value} }

But now we want apply to the incoming messages Sieve filters (.forward files with # Sieve filter header in each user mailbox, I mean, user filters), before being delivered to the users mailboxes. Therefore, we´ve added one router more (situated before the ldapuser router in the configuration file exim.conf), but it doesn´t seem to be working:

userforward:
driver = redirect
allow_filter
condition = ${if eq {}{${lookup ldap {ldap://192.168.45.27/ou=usuarios,dc=xxxx,dc=es?mailMessageStore?sub?(&(mail=${local_part}@${domain})(objectclass=person))}}}{no}{yes}}
user = vmail
group = vmail
require_files = $home/.forward
file = $home/.forward
no_verify
directory_transport = ldap_delivery

Going over Exim logs only shows us that all messages continue being processed by the ldapuser router, and never by userforward ¿Has anyone been able to make this kind of filters run with LDAP virtual users? ¿Any ideas about what we are doing wrong?

Thanks a lot,

Javier

****************************************
Javier Calahorra Novillo
División de Infraestructuras Seguras
SGI Soluciones Globales Internet
Tel: +34 918061600
www.sgi.es
****************************************

______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
puede contener informacion clasificada por su emisor como confidencial
en el marco de su Sistema de Gestion de Seguridad de la
Informacion siendo para uso exclusivo del destinatario, quedando
prohibida su divulgacion copia o distribucion a terceros sin la
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje
erroneamente, se ruega lo notifique al remitente y proceda a su borrado.
Gracias por su colaboracion.
______________________
This message including any attachments may contain confidential
information, according to our Information Security Management System,
and intended solely for a specific individual to whom they are addressed.
Any unauthorised copy, disclosure or distribution of this message
is strictly forbidden. If you have received this transmission in error,
please notify the sender immediately and delete it.
______________________