Re: [Exim] Forwarding Director Help

Etusivu
Poista viesti
Vastaa
Lähettäjä: Gordon McKee
Päiväys:  
Vastaanottaja: William Thompson
Kopio: exim-users
Aihe: Re: [Exim] Forwarding Director Help
Hi

Sorry to be a pain - I have now modified my config to the following, but I
still get the following error (at the bottom). I can see why I get the
spool error because the files doesn't exist but exim seems to be truncating
the $domain that is the pointer to the file name.

#localuser:
# driver = accept
# check_local_user
# transport = local_delivery

### Modified localusers check ###
localuser:
driver = accept
# condition =
{lookup{$local_part}lsearch{/usr/local/etc/exim/aliases/$domain}{
yes}{no}}
condition =
${lookup{$local_part@$domain}lsearch{/usr/local/etc/exim/aliases/$
domain}{yes}{no}}
check_local_user
transport = local_delivery

### Relay Certain Domains to internal NT Server - GDM 23/03/2003 ###
special:
driver = manualroute
transport = remote_smtp
route_list = optimalprofit.com nt-opro-h0.gdmckee.home : themckees.co.uk
nt-op
ro-h0.gdmckee.home


### Virtual Domains Router - GDM ###
virtual:
driver = redirect
domains = dbm;/usr/local/etc/exim/domains.db
no_more
#file = /usr/local/etc/exim/aliases/$domain
data = ${lookup{$local_part}lsearch{/usr/local/etc/exim/aliases/$domain}}

kursk# exim -bp gordon@???
      gordon@optimalpr
    *** spool read error: No such file or directory ***


kursk#

Many thanks for your help

Gordon


----- Original Message -----
From: "William Thompson" <wt@???>
To: "Gordon McKee" <eximlist@???>
Sent: Monday, May 19, 2003 6:01 PM
Subject: Re: [Exim] Forwarding Director Help


> > Basically I have home email on one domain and work email on another

domain.
> > I want the work messages to go to the nt box and the home messages to go

to
> > the local Unix mailbox. So it will be common to have gordon@....

needing to
> > go to different places, .co.uk to Unix and the .com to the nt-box, if

that
> > makes scene!!
>
> CWD = /usr/local/etc/exim/aliases
> file: gdmckee.co.uk
> Contains:
> gordon
>
> file: gdmckee.com
> Contains nothing (0 byte)
>
> Using the condition below, this happens:
> Email to gordon@??? comes in, exim sees the lookup query. It
> looksup $local_part (gordon) in file gdmckee.co.uk and finds it, thus the
> value is 'yes' which is true. The transport on that router saves to the
> localuser gordon.
>
> Email to gordon@??? comes in, exim sees the lookup query. It
> looksup $local_part (gordon) in file gdmckee.com and is unable to find it.
> This causes the lookup to fail and puts in the default value of 'no' which
> is false and this router declines.
>
> > > > > > I am still not sure how this will work or what the alias files
> > should
> > > > look
> > > > > > like? I presumable need to add other domains to the special:
> > section?
> > > > >
> > > > > If you're using this:
> > > > >
> > > >
> >

${lookup{$local_part}lsearch{/usr/local/etc/exim/aliases/$domain}{yes}{no}}
> > > > >
> > > > > And you have some domains. their.com and my.com
> > > > >
> > > > > You'd have:
> > > > > /usr/local/etc/exim/aliases/their.com and
> > > > > /usr/local/etc/exim/aliases/my.com
> > > > >
> > > > > Inside of their.com, you'd say like:
> > > > > bob
> > > > > someuser
> > > > > ...
> > > > >
> > > > > Inside of my.com, you say like:
> > > > > joe
> > > > > anotheruser
> > > > > ...
> > > > >
> > > > > if an email goes to bob@???, then it will use
> > > > > /usr/local/etc/exim/aliases/their.com and find that the local_part

bob
> > is
> > > > > listed and will act accordingly.
> > > > >
> > > > > if an email goes to bob@???, then it will use
> > > > > /usr/local/etc/exim/aliases/their.com and find that the local_part

bob
> > is
> > > > > not listed and the router will pass to the next one..
> > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "William Thompson" <wt@???>
> > > > > > To: "Gordon McKee" <eximlist@???>
> > > > > > Sent: Friday, May 16, 2003 7:48 PM
> > > > > > Subject: Re: [Exim] Forwarding Director Help
> > > > > >
> > > > > >
> > > > > > > > Many thanks for the help so far, I have written the
> > modifications,
> > > > is
> > > > > > this
> > > > > > > > what you meant it to look like:
> > > > > > > >
> > > > > > > >
> > > > > > > > ### Modified localusers check ###
> > > > > > > > localusers:
> > > > > > > > # local_parts = bob : other : users : who : are : local
> > > > > > > > # domains = gdmckee.co.uk
> > > > > > > > condition =
> > > > > > > >
> > > > > >
> > > >
> >

${lookup{$local_part@$domain}lsearch{/usr/local/etc/exim/aliases/$domain}{ye
> > > > > > > > s}{no}}
> > > > > > >
> > > > > > > This isn't necessary.
> > > > > > > use:
> > > > > > > condition =
> > > > > > >
> > > > > >
> > > >
> >

${lookup{$local_part}lsearch{/usr/local/etc/exim/aliases/$domain}{yes}{no}}
> > > > > > >
> > > > > > > I removed the @$domain since you're already using it here

^^^^^
> > > > > > >
> > > > > > > This will keep down on redundant data.
> > > > > > >
> > > > > > > > check_local_user
> > > > > > > > transport = local_delivery
> > > > > > > >
> > > > > > > > ### Relay Certain Domains to internal NT Server - GDM

23/03/2003
> > ###
> > > > > > > > special:
> > > > > > > > driver = manualroute
> > > > > > > > transport = remote_smtp
> > > > > > > > route_list = gdmckee.co.uk nt-opro-h0.gdmckee.home
> > > > > > > >
> > > > > > > > ### Virtual Domains Router - GDM ###
> > > > > > > > virtual:
> > > > > > > > driver = redirect
> > > > > > > > domains = dbm;/usr/local/etc/exim/domains.db
> > > > > > > > no_more
> > > > > > > > data =>
> > > > > >

${lookup{$local_part}lsearch{/usr/local/etc/exim/aliases/$domain}}
> > > > > > > >
> > > > > > > > As for the alias files they currently look as follows:
> > > > > > > >
> > > > > > > > david:          dwm
> > > > > > > > barbara:        bim
> > > > > > > > gordon:         gdm

> > > > > > > >
> > > > > > > > Do I now need to change these to
> > > > > > > >
> > > > > > > > david@???: dwm
> > > > > > > > etc . . .
> > > > > > > >
> > > > > > > >
> > > > > > > > Many thanks
> > > > > > > >
> > > > > > > > Gordon
> > > > > > > > ----- Original Message -----
> > > > > > > > From: "William Thompson" <wt@???>
> > > > > > > > To: "Gordon McKee" <eximlist@???>
> > > > > > > > Cc: <exim-users@???>
> > > > > > > > Sent: Friday, May 16, 2003 7:28 PM
> > > > > > > > Subject: Re: [Exim] Forwarding Director Help
> > > > > > > >
> > > > > > > >
> > > > > > > > > > I don't just host the one domain, so virtual is used. I
> > have
> > > > other
> > > > > > > > domains
> > > > > > > > > > like gdmckee.com as well. what I want to be able to do

is
> > mix
> > > > and
> > > > > > > > match, so
> > > > > > > > > > gdm@??? goes to a different location to
> > > > gdm@???.
> > > > > > > > >
> > > > > > > > > Ok, so about the users you want dropped locally, are they

all
> > in a
> > > > > > single
> > > > > > > > > domain or are they in multiple domains?
> > > > > > > > >
> > > > > > > > > If you modify what I gave you to add your other domains

that
> > you
> > > > want
> > > > > > > > > dropped locally, any combination of local_parts and

domains
> > will
> > > > be
> > > > > > > > dropped
> > > > > > > > > locally. If you don't want that, remove local_parts and
> > domains
> > > > and
> > > > > > > > replace
> > > > > > > > > with:
> > > > > > > > >
> > > > > > > > > condition =
> > > > ${lookup{$local_part@$domain}lsearch{/some/file}{yes}{no}}
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>