Re: [EXIM] address_file and user rights

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Marc Haber
CC: exim-users
Subject: Re: [EXIM] address_file and user rights
On Mon, 24 Aug 1998, Marc Haber wrote:

> I see. While my current problem was solved by using archive2.pl,
> it would be a good idea to allow specifying modes and uid/gids for
> files. Otherwise you would clutter up your configuration with special
> alias files and special drivers that only serve for _one_ delivery.


The problem is, how to do this other than by special configurations for
each case? The syntax of alias files is fixed, so there is no way one
can add uid information to them.

You don't in fact have to clutter your configuration with lots of alias
drivers. Just one would do:

special_aliases:
driver = aliasfile
file = /what/ever
file_transport = special_file_transport

with the transport like this

special_file_transport:
driver = appendfile
user = ${lookup{$local_part}lsearch{/list/of/uids}{exim}}

You can, of course, base the lookup on the domain as well as or instead
of the local part.

Hmm. I see that the manual is missing something. When a delivery to a
pipe or file is happening, $local_part is not set to the name of the
file or pipe; it is set to the parent local part, which is exactly what
you want. I've made a note to fix the manual.


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



--
*** Exim information can be found at http://www.exim.org/ ***