Re: [Exim] using LDAP within Exim

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Ron Smits
Data:  
Para: Paul Shields
CC: exim-users
Assunto: Re: [Exim] using LDAP within Exim
Afternoon,

don't know if I can help. But.... your ldap url looks good to me. As a
comparison here is mine:
data = ${lookup ldap
{ldap://pc15.ronsmits.com/ou=People,dc=ronsmits,dc=com?uid?sub?mailLocalAddress=${quote_ldap:$local_part@$domain}}}

this one is geared towards finding a uid instead of a mail

I found that debugging exim in this is most easily done by running it in
debug mode as exim -d -bd -q10m. This will show you exactly how the
routers are treated and what they return

Ron

On Fri, 2002-12-20 at 19:27, Paul Shields wrote:
> Hello
>
> dont know if anyone can help, but I'm struggling to use LDAP for mailbox
> authentication. Basically, we have Exim set up to work well with
> SpamAssassin, as outlined in the configure snippet below.
>
> We now need to perform an LDAP lookup before the Spam processing to ensure
> that the receiving mailbox exists (the mail box is on another mail server
> that we are relaying to). If the mailbox doesn't exist, then we bounce the
> mail.
>
> I've tried various scenarios, but just can't crack the correct syntax. Any
> assistance gratefully received. (note that the settings below work fine
> when the ldapcheck router is not there).
>
> thanks
>
> Paul
>
>
>
>
>
>
> Routers definition:
>
> begin routers
>
> dnslookup:
> driver = dnslookup
> domains = ! +local_domains
> transport = remote_smtp
> ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
> no_more
>
>
> ldapcheck:
> driver = redirect
> verify_recipient
> no_verify
> domains = +scan_domain1
> data = ${lookup ldap
> {ldap://ldapserver/ou=emailservice,ou=compname,ou=members,o=compname?mail?sub?mail=${quote_ldap:$local_part@$domain}
> } }
> self = pass
> pass_router = spamcheck
> no_more
>
>
> spamcheck:
> driver = accept
> no_verify
> domains = +scan_domain1
> condition = "${if or { {def:h_X-Spam-Flag:} {eq
> {$received_protocol}{relayed}} } {0}{1}}"
> transport = forward
> no_more
>
> # This sends scanned mail to external server
> forward:
> driver = accept
> no_verify
> domains = +scan_domain1
> condition = "${if or { {def:h_X-Spam-Flag:} {eq
> {$received_protocol}{relayed}} } {1}{0}}"
> transport = forward
>
> userforward:
> driver = redirect
> check_local_user
> file = $home/.forward
> no_verify
> no_expn
> check_ancestor
> # allow_filter
> file_transport = address_file
> pipe_transport = address_pipe
> reply_transport = address_reply
>
>
> # This router matches local user mailboxes.
>
> localuser:
> driver = accept
> check_local_user
> transport = local_delivery
>
>
>
>
> begin transports
>
> # This transport is used for delivering messages over SMTP connections.
>
> remote_smtp:
> driver = smtp
>
> # Send all incoming mail through spamassassin.
>
> spamcheck:
> driver = pipe
> command = /usr/exim/bin/exim -oMr relayed -bS
> use_bsmtp = true
> transport_filter = /usr/bin/spamc
> home_directory = "/tmp"
> current_directory = "/tmp"
> log_output = true
> return_fail_output = true
> return_path_add = false
> message_prefix =
> message_suffix =
>
> forward:
> driver = smtp
> # Remove all headers that Spam Assassin adds for testing
> #headers_remove =
> "X-Spam-Flag:X-Spam-Status:X-Spam-Level:X-Spam-Checker-Version:"
> hosts = desthost
> gethostbyname = true
> interface = 192.168.7.5
>
>
>
>
>
>
>
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##

--
Ron Smits
www: www.ronsmits.org and www.ron-kitten.net