Re: [Exim] Using /etc/group as additional alias file?

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Martin Buck
Data:  
Para: Nigel Metheringham
CC: exim-users
Assunto: Re: [Exim] Using /etc/group as additional alias file?
Nigel Metheringham wrote:
> You probably can use some hackery in a smartuser director (in general


Oooh, I must have been blind (smartuser only has 3 options, so it's easy
to miss in the specs :-)

> anything you can do with an alias and almost any other director can be
> done in a smartuser with some degree of pain) to expand the list of
> additional users in a group.


OK, I'm using this now:

group_aliases:
driver = smartuser
new_address =
${lookup{$local_part}lsearch{/etc/group}{${extract{3}{:}{$value@$domain}}}fail}

This works fine for groups that have only one member. However, if
there's a comma-separated list of users in /etc/group (the usual case),
the new address looks like user1,user2,user3@domain which obviously
doesn't work:

buck@rigi:~$ /usr/local/sbin/exim -bt tty
tty@??? cannot be resolved at this time:
<root,tty,adm@???> - bad address generated by
group_aliases director: missing or malformed local part (expected word
or "<")

If I leave out the domain and return only comma-separated user names, I
get the same error.

Somehow, I need a way to tell exim that the lookup returned a list of
addresses in the same format as entries in /etc/aliases, but how?

Martin
--
Martin Buck
Ascom Systec AG
Applicable Research & Technology
Phone: +41-62-889-5292, Fax: -5290