[exim] Exim LDAP Domain alias router

Page principale
Supprimer ce message
Répondre à ce message
Auteur: mtrainer
Date:  
À: Exim
Sujet: [exim] Exim LDAP Domain alias router


Hi,

I need to create a domain alias function in exim4 so emails to
user@alias_domain are forwarded to user@primary_domain, I use an LDAP
schema that has a domain attribute domainAliasName.

My exim4.conf gets the domainlist from ldap as follows:

domainlist local_domains = ${tr {${lookup ldap{user=LDAPUSER
pass=LDAPPASS
LDAPS/LDAPBASE?domainName?sub?(&(objectClass=mailDomain)(domainName=$domain))}}}{n}{:}}


I am not sure if adding an "OR domainAliasName=$domain" to the line
above is the correct way to go.

My routers.conf uses the router below for normal mail delivery to
primary domain mailboxes.

# Check for users in LDAP (only users with local mailboxes)

ldapuser:
driver = manualroute
domains = +local_domains
condition = ${if eq {}{${lookup ldap {user=LDAPUSER pass=LDAPPASS
LDAPS/domainName=${domain},LDAPBASE?mail?sub?(&(objectClass=mailUser)(mail=${local_part}@${domain}))}}}{no}{yes}}
route_list = "* mailproxy01:mailproxy02:mailproxy03 randomize byname"
transport = dovecot_lmtp

I need help in creating a domain_alias router or modifying the one
above to support the domain alias functionality. I found some examples
of routers using the redirect driver but none using ldap.

Some assistance on the best way of achieving the required functionality
would be appreciated.

Thanks

Murray