Re: [exim] how can get user group

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Heiko Schlittermann
Datum:  
To: exim-users
Betreff: Re: [exim] how can get user group
Vasiliy G Tolstov <v.tolstov@???> (Di 15 Sep 2009 14:23:49 CEST):
> Hello!
> I'm try to get user group in non_smtp acl by
>
> deny condition = ${if =
> {${extract{4}{:}{${lookup{$local_part}lsearch{/etc/passwd}{$value}fail}}}}{601}{yes}{no}}
>
> (if user group id = 601 deny send e-mail)


I'd check „getent“ output, not /etc/passwd directly:

exim -be '${extract{4}{:}{${run{/usr/bin/getent passwd heiko}{$value}}}}'

If you use the lookup as above, the key (local_part) will not be
returned, thus you need to extract the 3rd field, not the 4th one:

exim -be '${extract{3}{:}{${lookup{heiko}lsearch{/etc/passwd}}}}'

--
Heiko