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: lastn...@mydomain.com
mail: lastn...@mydomain.eu
mail: firstname.lastn...@mydomain.com
mail: firstname.lastn...@mydomain.eu
mailRoutingAddress: lastn...@mydomain.com

I can send mail to lastn...@mydomain.com and lastn...@mydomain.eu, but
when I try to send a mail to firstname.lastn...@mydomain.com or
firstname.lastn...@mydomain.eu my mail is bounced with the error
message: unknown user: "firstname.lastname".

When I use postmap it works fine:

# postmap -q "firstname.lastn...@mydomain.eu"
ldap:/etc/postfix/ldap-aliases.cf
lastn...@mydomain.com

Another weird thing is that when I use this:

query_filter = mail...@mydomain.com

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