[Exim] passing query result between director and transport?

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Ferenc Engard
日付:  
To: exim-users
題目: [Exim] passing query result between director and transport?
Hi all!

I am trying to put together an LDAP-authenticated virtual mail server
with exim.

Here is my director and transport config:

virtualmail_directory:
driver = appendfile
no_from_hack
prefix = ""
suffix = ""
directory=/var/spool/virtualmail/${original_local_part}@${original_domain}
maildir_format


virtualuser:
driver = smartuser
condition = ${lookup ldap {ldap:///mail=${quote_ldap:${original_local_part}@${original_domain}},ou=MailAccounts,dc=circum,dc=hu?homeDir
user = virtmail
group = mail
no_rewrite
transport = virtualmail_directory

For the basic work, this is enough for me, as it checks whether the
user exists. Now, I would like to store the location of the maildir in
LDAP, i.e., in the attribute 'homeDir' instead of wiring in the
<local_part@domain> value. For this, I suppose, I can query the LDAP
database again in the transport. The better is that maybe I use the
new_address option in the directory, and then figure out from the
(new) value of local_part/domain that is the query succeeded or not.
Is the local_part will take a new value immediately after the query
row?

The more general solution would be to store the query's result into a
variable which I can use later, in the director or in the transport.
How can I do something like that?

Thanks:
Circum