Re: [Exim] dynamically selecting transport

Góra strony
Delete this message
Reply to this message
Autor: Hans-Peter Zahno
Data:  
Dla: Philip Hazel
CC: exim-users
Temat: Re: [Exim] dynamically selecting transport
> On Wed, 11 Apr 2001, Hans-Peter Zahno wrote:
>
> > Here an extract of my config file. It is the transport line in the director
> > domain1_aliases which should always expand to a transport named 'tr_<unqualified hostname>'
>
> Fine. That looks ok, but it does not tally with the error you reported!
> You reported a configuration error, which will happen before the
> expansion is done.
>


Of course, I'm sorry! For testing I commented my tr_g_user transport,
but I didn't pay attention that I had another director referencing
tr_g_user..
So I verified that the exim behaves correctly (deferring the mail),
which is ok for me.

> Please run "exim -d9 -bt xxxx" where xxxx is an address that should
> resolve to that transport so we can get more information.
>
> > # my director
> > domain1_aliases:
> >   driver = aliasfile
> >   file_transport = address_file
> >   pipe_transport = address_pipe
> >   domains = "unifr.ch"
> >   search_type = ldap
> >   query = ldap:///ou=persons,ou=ufdir,dc=unifr,dc=ch?mailroutingaddress?sub?(mail=$local_part@???)
> >   transport = ${lookup ldap \
> >        {ldap:///ou=persons,ou=ufdir,dc=unifr,dc=ch?mailhost?sub?(mail=$local_part@???)} \
> >        {tr_${tr{${lc:${extract{1}{.}{$value}}}}{-}{_}}}fail}

>
> Hmm. You are using "aliasfile" with a transport. Are you sure you really
> want to do this? Do you understand what happens if aliasfile is used
> with a transport? It is not the normal way to do aliasing.


I'm aware of that, but a little confused now and I'm thinking if I would
better use a domainlist router?
I'm not quite sure, what is the best way for routing mails to our Exchange-Servers:
To know to which host to route the mail I want to lookup our LDAP-directory,
field 'mailhost', but the method for host lookup should be 'byname'.

I did some tests using the following domainlist router, but I still have
problems with correctly using route_query and setting the option 'byname':

exchange_route:
driver = domainlist
domains = unifr.ch
transport = remote_smtp
search_type = ldap
route_query = ldap:///ou=persons,ou=ufdir,dc=unifr,dc=ch?mailhost?sub?(mail=$local_part@???)

this is part of debug output:
..
LDAP search: returning: g-user.unifr.ch
lookup yielded: g-user.unifr.ch
original hostlist=g-user.unifr.ch options=
expanded hostlist="g-user.unifr.ch" options=
exchange_route router passed; "more" overridden
domain unifr.ch rewritten as g-user.unifr.ch
..

I would like to set the 'byname' option.
If you could point me in the right direction, Thanks
Hans-Peter Zahno

> -- 
> Philip Hazel            University of Cambridge Computing Service,
> ph10@???      Cambridge, England. Phone: +44 1223 334714.

>
>