Re: [Exim] Ldap sender_address lookup

Góra strony
Delete this message
Reply to this message
Autor: Jeff
Data:  
Dla: Mark Sapp
CC: exim-users
Temat: Re: [Exim] Ldap sender_address lookup
Where are you putting this query ??? I presume in the Authenticators
section..
I believe the Authenticators are run:
- after the initial EHLO and response
- before the "MAIL FROM:"
Therefore, I would suspect that any sender or recipient variables should
not be used..

However, if you require the users to use their email address as their
username in the SMTP AUTH, then I suspect that you would be able to extract
the sub-domain info from $2...

Rgds
Jeff

----- Original Message -----
From: "Mark Sapp" <mark@???>
To: <exim-users@???>
Sent: Friday, August 15, 2003 3:59 AM
Subject: Re: [Exim] Ldap sender_address lookup


> It seems as if the $sender_address_domain variable is empty when I try
> to access it. I thought perhaps the lsearch was hosed, so I modified
> the code using extract:
>

ldapdn{ldap:///ou=people,ou=${extract{-2}{.}{$sender_address_domain}},dc=ma
incompany,dc=com?sn?sub?(&(uid=$2))}{$value}{no}}\"
> pass=$3 \
>

ldap:///ou=people,ou=${extract{-2}{.}{$sender_address_domain}},dc=maincompa
ny,dc=com?sn?sub?(&(uid=$2))}{yes}{no}}"
>
> The query still returns a blank ou. Suggestions?
>
> -M
>
> jvanasco@??? wrote:
>
> >
> > I've got a lookup similar to that, but not as complex
> >
> > maybe this snippet will help you:
> >
> > ldap:///
> >

fqdn=$sender_address_domain,ou=Email,o=mobwire,dc=redivi,dc=com?maildir?
> > sub?mail=${quote_ldap:$sender_address}
> >
> > i know for certain it is possible, i haven't had enough coffee this
> > a.m. to take a stab at it though
> >
> >
> >
> >
> >
> >
> > On Thursday, August 14, 2003, at 03:51 AM, Mark Sapp wrote:
> >
> >> I would like to enable SMTP AUTH via LDAP with the username/password
> >> query based upon the sender's domain. In essence, the main site will
> >> receive mail from other domains, which happen to be subsidiary
> >> companies. These companies are represented as organizational units
> >> within the root dn...i.e. users at subcompany1.com would be found in
> >> ou=people,ou=subcompany1,dc=maincompany,dc=com
> >>
> >> When performing the authorization, I would like to lookup the sender's
> >> email domain in a linear file and grab the appropriate ou name for

that
> >> domain. I've tried:
> >> "${lookup ldap {user=\"${lookup \
> >> ldapdn{ldap:///ou=people,ou=${lookup
> >> {$sender_address}lsearch{/etc/
> >> ldap.domains}},dc=maincompany,dc=com?sn?sub?(&(uid=$2))}
> >> {$value}{no}}\" pass=$3 \
> >> ldap:///ou=people,ou=${lookup
> >> {$sender_address}lsearch{/etc/
> >>

ldap.domains}{$value}},dc=maincompany,dc=com?sn?sub?(&(uid=$2))}{yes}{n
> >> o}}"
> >>
> >> ldap.domains looks like:
> >> subcompany1.com : subcompany1
> >>
> >> The query errors out as a malformed DN - the second ou is blank.
> >>
> >> Is this even possible, or should I just put the crack pipe down?
> >>
> >> Thanks,
> >> -Mark
> >>
> >>
> >>
> >> --
> >>
> >> ## List details at http://www.exim.org/mailman/listinfo/exim-users
> >> Exim details at http://www.exim.org/ ##
> >>
> >
> >
> >
>
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim

details at http://www.exim.org/ ##
>
>