Hi everybody,
i'm trying to configure my postfix for ldap lookups, but with strange
results.
My ldap record has 2 important fields: 'mail' and 'uid'. Postfix should
use the 'mail' field to verify the recipient and than save the email
into /mail/'uid'/Maildir
From main.cf:
[..]
alias_maps = hash:/etc/aliases, ldap:/etc/postfix/ldap-aliases.cf
[..]
From ldap-aliases.cf:
[..]
search_base = dc=example, dc=com
query_filter = mail=%s
[..]
An example ldap record:
[..]
mail = [EMAIL PROTECTED]
uid = tommaso
[..]
The postmap command:
~$ postmap -q [EMAIL PROTECTED]
ldap:/etc/postfix/ldap-aliases.cf
returns:
tommaso
So it seems to work. But if i send an email to
[EMAIL PROTECTED] postfix's log reports:
Sep 6 14:56:26 pippo postfix/local[2594]: 0E37C53528:
to=<[EMAIL PROTECTED]>, relay=local, delay=0.45,
delays=0.25/0.06/0/0.14, dsn=5.1.1, status=bounced (unknown user:
"tommaso.visconti")
Changing ldap-aliases.cf as:
[..]
query_filter = [EMAIL PROTECTED]
[..]
postmap command fails, but the email arrives correctly. so it seems that
the search key %s in ldap-aliases.cf is '[EMAIL PROTECTED]'
while using postmap and only 'tommaso.visconti' while receiving an email.
I'd like to change this second behaviour because the postmap way is that
i'm looking for... :)
thanks,
Tommaso