Re: [Exim] Virtual users and `prefixed lookups'

Top Page
Delete this message
Reply to this message
Author: Colin Harford
Date:  
To: exim-users
Subject: Re: [Exim] Virtual users and `prefixed lookups'
Hi Adam,

I never tried the way you wanted to.

I do like the following:

system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/mail/$domain}}
#data = ${lookup{$local_part}lsearch{/etc/mail/aliases}}
# user = exim
qualify_preserve_domain
file_transport = address_file
pipe_transport = address_pipe


HTH

CH
On 29-Dec-03, at 4:56 AM, Adam D. Barratt wrote:

> Hi,
>
> I suspect there's something obvious staring me in the face here, but
> it's
> the first day back after Christmas and I haven't had enough coffee
> yet. ;-)
> Our Exim 4.30 setup is configured to deliver mail as either a local
> user, or
> as the unprivileged account `mailuser' (to avoid having to create real
> local
> users for everyone with a POP account). The decision as to which user
> to run
> the delivery process as is controlled by a router of the form:
>
> localuser_adamb:
> driver = accept
> domains = adam-barratt.org.uk
> local_parts = "lsearch;/etc/exim/mailusers.adam-barratt"
> retry_use_local_part
> transport = local_delivery
> user = ${lookup {$local_part} lsearch
> {/etc/exim/mailusers.adam-barratt}
> {$value} }
>
> where /etc/exim/mailusers.adam-barratt contains entries such as:
>
> adam: adam
> usenet: mailuser
>
> and so on. There are a number of other such routers for other domains,
> each
> with their own `mailusers' file. We're now trying to combine all of the
> mailusers files into one, by adding prefixes to the local parts (mainly
> because that's the way the POP server likes it). The theory is that we
> then
> end up with a single `mailusers' file that contains entries such as:
>
> ab-adam: adam
> ab-usenet: mailuser
>
> The problem we've got is making the `local_parts' clause work.
> Basically,
> given a mailusers file containing:
>
> fish-foo: mailuser
> ab-adam: adam
> ab-usenet: mailuser
> tree-fir: mailuser
> ab-foo: mailuser
>
> we need the local_parts list to contain `adam : usenet : foo' (i.e.
> each
> entry in the file beginning with the string `ab-', but with that string
> removed).
>
> Any suggestions gratefully accepted, especially if they don't involve
> abandoning the whole idea. :-)
>
> Seasons greetings,
>
> Adam
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users
> Exim details at http://www.exim.org/ ##
>
>