[Exim-users-de] Aliasing mittels LDAP, lookup ldap formulier…

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Frank Elsner
Data:  
Para: exim-users-de
Assunto: [Exim-users-de] Aliasing mittels LDAP, lookup ldap formulierung?

Hallo *,
          ich benötige Hilfe bei der Formulierung eines ldap lookups:



Gegeben sei beispielhaft der LDAP-Eintrag (personenbezogene Werte anonymisiert):

# ldapsearch -xh bl024.zrz.tu-berlin.de -LLL -b ou=accounts,dc=tu-berlin,dc=de
tubMailAlternateAddress=vorname.nachname@???

dn: uid=username,ou=Accounts,dc=tu-berlin,dc=de
objectClass: top
objectClass: account
objectClass: posixAccount
objectClass: shadowAccount
objectClass: tubAccount
objectClass: tubMail
uid: username
uidNumber: 72250
gidNumber: 100
cn: Vorname Nachname
homeDirectory: /home/users/e/username
tubAccountOwner: tubPersonOM=16908002221,ou=People,dc=tu-berlin,dc=de
gecos: Vorname Nachname
loginShell: /bin/sh
tubAccountService: cn=linuxpool,ou=services,dc=tu-berlin,dc=de
tubAccountService: cn=SMTP,ou=services,dc=tu-berlin,dc=de
tubAccountService: cn=Web-Mail,ou=services,dc=tu-berlin,dc=de
tubAccountService: cn=POP-IMAP,ou=services,dc=tu-berlin,dc=de
tubAccountService: cn=radius,ou=services,dc=tu-berlin,dc=de
tubAccountStatus: aktiv
tubAccountMaintainer: legacy
mail: username@???
tubMailAlternateAddress: Vorname.Nachname@???

Für die Adresse <Vorname.Nachname@???> soll nun die "reale" Mailbox
<username@???> ermittelt werden.


Mein - ohne LDAP-Erfahrungen gebastelter - Router

aliases_ldap:
  driver = redirect
  allow_defer
  allow_fail
  data = ${lookup ldap {ldap:///ou=accounts,dc=tu-berlin,dc=de?mail \
                       (tubMailAlternateAddress=${local_part}@${domain})}{$value}fail}
  file_transport = address_file
  pipe_transport = address_pipe


bringt nicht die Adresse <username@???>,
hier der Debug-Output:

-bash-3.00$ exim -v -d-all+lookup -bt
Exim version 4.69 uid=777 gid=777 pid=1463 D=10000
Probably ndbm
Support for: crypteq iconv() Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch dbm dbmnz ldap ldapdn ldapm
Authenticators: plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile autoreply pipe smtp
Size of off_t: 4
configuration file is /usr/exim/etc/Configuration
log selectors = 0000053c 002b9e0d
trusted user
admin user
> vorname.nachname@???

search_open: ldap "NULL"
search_find: file="NULL"
key="ldap:///ou=accounts,dc=tu-berlin,dc=de?mail (tubMailAlternateAddress=vorname.nachname@???)" partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=ldap key="ldap:///ou=accounts,dc=tu-berlin,dc=de?mail (tubMailAlternateAddress=vorname.nachname@???)"
database lookup required for ldap:///ou=accounts,dc=tu-berlin,dc=de?mail (tubMailAlternateAddress=vorname.nachname@???)
LDAP parameters: user=NULL pass=NULL size=0 time=0 connect=0 dereference=0 referrals=on
perform_ldap_search: ldap URL = "ldap:///ou=accounts,dc=tu-berlin,dc=de?mail (tubMailAlternateAddress=vorname.nachname@???)" server=bl024.zrz.TU-Berlin.DE port=0 sizelimit=0 timelimit=0 tcplimit=0
after ldap_url_parse: host=bl024.zrz.TU-Berlin.DE port=0
ldap_initialize with URL ldap://bl024.zrz.TU-Berlin.DE:389/
initialized for LDAP (v3) server bl024.zrz.TU-Berlin.DE:389
LDAP_OPT_X_TLS_TRY set
binding with user=NULL password=NULL
Start search
ldap_result loop
LDAP entry loop
search ended by ldap_result yielding 101
ldap_parse_result: 0
ldap_parse_result yielded 0: Success
LDAP search: found no attributes
lookup failed
search_open: dbm "/usr/exim/dbm/local_domains"
search_find: file="/usr/exim/dbm/local_domains"
key="tu-berlin.de" partial=-1 affix=NULL starflags=0
LRU list:
1/usr/exim/dbm/local_domains
End
internal_search_find: file="/usr/exim/dbm/local_domains"
type=dbm key="tu-berlin.de"
file lookup required for tu-berlin.de
in /usr/exim/dbm/local_domains
lookup yielded:
vorname.nachname@??? is undeliverable: Unknown mailbox
>



Kann mir jemand sagen, wie der - offensichtlich falsche - ldap lookup
richtig formuliert werden müßte?


Gruß           ______________________________________________________________ 
Frank Elsner  /                        c/o  Technische Universitaet Berlin   |
 ____________/                              tubIT [BD], Sekr. E-N 50         |

|                                           Einsteinufer 17                  |
| Phone: +49 30 314 23897                   D-10587 Berlin                   |
| eMail: Frank.Elsner@???          Germany        __________________|

|_________________________________________________________| in dubio pro exim