Hi,

I have some trouble trying to validate mail aliases from LDAP.

My users are defined in LDAP with the attribute 'mail' that stores each
mail alias and the attribute mailRoutingAddress that stores the real
mail address (corresponding to uid).

for example:
dn: uid=lastname, ou=people, dc=mydomain, dc=com
mail: [email protected]
mail: [email protected]
mail: [email protected]
mail: [email protected]
mailRoutingAddress: [email protected]

I can send mail to [email protected] and [email protected], but
when I try to send a mail to [email protected] or
[email protected] my mail is bounced with the error
message: unknown user: "firstname.lastname".

When I use postmap it works fine:

# postmap -q "[email protected]"
ldap:/etc/postfix/ldap-aliases.cf
[email protected]

Another weird thing is that when I use this:

query_filter = [email protected]

instead of:

query_filter = mail=%s

it works (but it's ugly) even for mydomain.eu that is really weird...

I tried with mail...@%d which would be less ugly, but it does not work
nether.

Any idea ?

Thanks a lot


Here is my configuration:

$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, ldap:/etc/postfix/ldap-aliases.cf
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
mydomain.eu
mynetworks = 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

$ cat /etc/postfix/ldap-aliases.cf 
server_host = ldap://ldap1.embl.fr ldap://ldap2.embl.fr
search_base = ou=people, dc=embl-grenoble, dc=fr
query_filter = mail=%s
result_attribute = mailRoutingAddress


-- 
Mickaël CANÉVET.
European Molecular Biology Laboratory (EMBL)
Grenoble Outstation. FRANCE

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to