Re: [Exim] dynamically selecting transport

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Hans-Peter Zahno
Datum:  
To: Philip Hazel
CC: exim-users
Betreff: Re: [Exim] dynamically selecting transport
Hello,

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>'

# some of the transports...
tr_g_user:
    driver = smtp
    hosts = g-user.unifr.ch
    gethostbyname

    
tr_l_user:
    driver = smtp
    hosts = l-user.unifr.ch
    gethostbyname


# 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}


Actually, the transport should never expand to some none defined transport,
if the integrity of the LDAP directory is guaranteed. But it would be
nice to find an easy way to prevent exim to panic.
Some more explanation: Exim is our MX and transports mainly locally to different
Exchange-Servers.

Regards
Hans-Peter Zahno

> On Tue, 10 Apr 2001, Hans-Peter Zahno wrote:
>
> > I'm setting up exim 3.22 on Solaris 8 and experimenting with
> > a director which selects the transport dynamically. I'm doing
> > this by doing an LDAP-query for 'transport' attribute, which
> > works fine!
> > In case my LDAP-Server returns me some bad data, which expands
> > in a transport name which is not defined, then exim panics with
> > the following message in the paniclog:
> >
> > 2001-04-10 11:03:28 Exim configuration error
> > tr_g_user transport, referred to in line 621, was not found
> >
> > Is there a mechanism which allows me to trap this event and let's
> > say instead of panic to simply freeze the message and continue
> > working. Or to define some sort of "panic_transport" ?
>
> If Exim cannot find a dynamic transport, it should just defer delivery.
>
> That error message happens when Exim reads the configuration file,
> before it does any LDAP lookups or anything. You can tell that because
> it says "Exim configuration error". So the problem is not exactly as you
> described it. What are the lines around 621 in your configuration?
>
> -- 
> Philip Hazel            University of Cambridge Computing Service,
> ph10@???      Cambridge, England. Phone: +44 1223 334714.

>
>
>