RE: [Exim] Forwarding via LDAP lookup

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: steve
Dátum:  
Címzett: exim-users
Tárgy: RE: [Exim] Forwarding via LDAP lookup
On Tuesday, August 21, 2001 6:04 PM, Barry Pederson
[SMTP:barryp@???] wrote:
> Philip Hazel wrote:
> > On Mon, 20 Aug 2001, Dave Lewney wrote:
> >
> > > (I suspect the answer is no, but ...)
> > > Is it possible to achieve forwarding via an LDAP lookup for an

attribute
> > > that would hold the contents of a .forward file ?
> >
> > The answer is yes! Check out the "data" option of the forwardfile
> > director (new in release 3.30).
>
> I don't know anything about this new data option, but under older exims
> you could have a director like:
>
> ----------------
> ldap_forward:
> driver = aliasfile
> search_type = ldap
> query
> ="ldap:///o=Foo,c=US?mailforwardingaddress?sub?(mail=$local_part@$domain)"
>
> ----------------


Similarly, I'm using this (again, please excuse any unfortunate wrapping):

# lookup routing address in LDAP (with forwarding)
#
# 'lookup' should pass one of the following to 'extract'
# with the corresponding results
#
#   ""     = [fail this director]
#
#   "mailRoutingAddress=bob@???"
#   = bob@???
#
#   "ourForwardingAddress=sally@???
#    mailRoutingAddress=sally@???"
#   = sally@??? 


ldap_with_forwarding:
  driver = smartuser
  new_address = ${extract \
              {2}{"= "} \
              {${lookup
ldap{ldap:///o=brighton.ac.uk?ourForwardingAddress,mailRoutingAddress?sub?(m
ail=$local_part@???)}}} \
              {$value}fail \
         }
  user=exim



As Dave's only up the road from us, I've already mentioned this to him.

However, I thought I'd post it to the group as I'd really welcome comments -
particularly on performance issues - as since implementing this AND swapping
from Netscape to OpenLDAP libraries (AND upgrading to 3.32!), the mailhubs
seem a little slower...

Kind regards,
Steve Holden
Network Services
University of Brighton