Re: [EXIM] removing recipients

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: Vadim Vygonets
Kopio: Bradley Dunn, exim-users
Aihe: Re: [EXIM] removing recipients
On Wed, 10 Dec 1997, Vadim Vygonets wrote:

> Nice. But here my (related) question comes: is there any way to
> restrict mail delivery only to people whose home directory contains
> some particular string, or whose _primary_ gid is A, B or C (but not
> Z, even if they have C as a secondary gid)? Our site needs one of
> those.


The match_directory option of the localuser directory allows control by
home directory.

Checking by uid/gid is not directly possible, but you could do an
lsearch lookup on /etc/passwd and extract the values using a regular
expression. This would not be efficient if there were a lot of users,
since a linear search is slow on long lists. You could make some kind of
copy of /etc/passwd into a DBM file and use the sub-key lookup features,
on data like

username: uid=xxxx gid=yyyy home=/z/username

if you really wanted to. But since you say "or" above, you should be
able to use the match_directory feature easily enough.

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



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