Autor: Ferenc Engard Data: A: exim-users Assumpte: [Exim] full LDAP control of mail handling?
Hello,
I am trying to set up a virtualmail system where the whole mail
handling logic is in an LDAP database. I want to handle mail with many
domains, and want to use later with pop3 user names such as
'user1@???'. I use exim 3.3x.
I have two ideas; I describe here with (not tested) pseudo-configs.
Here are my planned directors:
1. I store the name of transport in LDAP, too
virtualuser:
driver = smartuser
transport = ${lookup ldap {...query for the transport, e.g. user, alias, pipe...} {$value} fail}
new_address = ${lookup ldap {...query for the new address...} {$value} fail}
user = virtmail
group = mail
no_rewrite
2. I set up all possible transports, and decide on the value of the
new_address as which one to choose:
virtualuser:
driver = smartuser
file_transport = ...
directory_transport = ...
pipe_transport = ...
new_address = ${lookup ldap {...query for the new address...} {$value} fail}
user = virtmail
group = mail
no_rewrite
I would prefer this 2nd solution, as this looks cleaner for me. The
problem is, how exim decides whether a new address is a path name or
an alias? Here I will have file names like 'user1@???', and I
suspect that exim will handle it as an alias. In fact, the best would
be if I could explicitly tell if the new address is an alias (possibly
many aliases separated with {':',',' ...}, can I do this?) or not. Or
should I stick with the 1st solution? If yes, then can I do just one
ldap query? Just for the beuty, as the server will not have _so_ heavy
mail traffic... :)