Re: [Exim] nobody_user?

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Toralf Lund
CC: exim-users
Subject: Re: [Exim] nobody_user?
On Thu, 18 Mar 2004, Toralf Lund wrote:

> scu-archive: "|/usr/bin/mhonarc -outdir
> /u/project/ServoKortScanner/email -quiet -add"
> ks: "|/usr/bin/mhonarc -outdir /usr/local/www/htdocs/mail/ks -quiet -add"
>
> in /etc/aliases (this is based on our actual setup.)
>
> There is a local user account with login name "ks", but none called
> "scu-archive".
>
> For the 1st alias I want the pipe to run as user "guest". For the 2nd I
> want "ks" - i.e. the login-name matching LHS of the alias. Setting
> user=guest for the pipe transport would cause both aliases to be run as
> "guest", which is not what I want.


Two possibilities come immediately to mind:

1. If you can easily test for a local user in a string expansion (e.g.
search /etc/passwd), you can put something like this on the transport

user = ${lookup{$local_part}lsearch{/etc/passwd}{$local_part}{guest}}

This will be particularly easy if all your non-users take a particular
form, e.g. contain hyphens (as in your example).

2. Otherwise, you may have to have two different redirect routers, one
with only local users in the alias file, and one without. Then you can
use two different transports.


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book