Re: Re[4]: [Exim] Delivery errors for unknown users

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Michael Dominok
Date:  
À: exim-users
Sujet: Re: Re[4]: [Exim] Delivery errors for unknown users
Hi Graham,

On Thu, 2004-06-17 at 18:17, Graham Dodd wrote:
> >> I need to find out where I can plugin a reject mail if $local_part not in
> >> LDAP
> >>
> >> Any ideas ??


You could add a condition to your router. I'm using this one:

cyrus_router:
        debug_print = "R: cyrus_router $local_part@$domain"
        driver = accept
        domains = +local_domains
        condition = ${lookup pgsql{     \
                SELECT COUNT (*) FROM company_value cv, person p
\
                WHERE (cv.db_status = p.db_status)      \
                AND (cv.db_status != 'archived')        \
                AND (cv.attribute = 'email1')           \
                AND (LOWER(cv.value_string) =
LOWER('$local_part@$domain'))     \
                AND (cv.company_id = p.company_id)}}
        transport = cyrus_deliver


Which is using a Postgres-DB. I guess it won't look that different in
LDAP-syntax?

HTH

Michael

--
Michael Dominok        Tel.: +49 231 61048 - 42
natural computing GmbH    Fax.: +49 231 61048 - 40
Martener Strasse 535     Mail: michael.dominok@???
44379 Dortmund         http://www.natural-computing.de/