Re: [Exim] Dynamically generated list of local users

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Vadim Vygonets
日付:  
To: Exim Users
題目: Re: [Exim] Dynamically generated list of local users
Quoth Phil Pennock on Fri, May 19, 2000:
> Embedded perl.


Heavy. The problem with this approach is that there is an
overhead in every Exim process, not only those that actually run
the Perl functions. Embedded awk anyone? ;) A better idea,
though, would be half-embedded C. A documented interface to
random text-processing C functions in Exim. Then, just write
them and compile them in.

If I were generating lists of all users on the fly (as opposed to
nightly), I would probably do it with an external program that
takes the message and re-submits it back to Exim with lots of
recipient addresses. I'd write it in Ada just to make a point.

> I started looking at multiple ${if ...} nests but it
> started getting really sick even before I had the 'collect all users'
> logic figured out.


I can't think of any way to generate list of all users from
within Exim. Except embedded Perl, that is.

> I used ${originator_uid} but switched it to _gid for
> the example below.


Which means that you can mail all only if you're of this gid and
submit the message locally? Nice. But you can handle similrar
things with a moderated mailing list. It's true that mailing
list security is not really high, though.

> Set ALLPOSTGID. Does Exim interpolate things like
> LOCALDOM into strings as below?


Not into strings. It adds qualify_domain to the naked local
parts.

> #[ directors section ]
> all_users:
>   driver    = smartuser
>   domains    = localhost
>   condition    = ${if eq {$local_part}{all-users} \
>            {${if ={${originator_gid}}{ALLPOSTGID} {yes}{no}}}  {no}}} \


Replace the condition with:

    local_parts = all-users
    condition = ${if ={${originator_gid}}{ALLPOSTGID}{yes}{no}}


>   rewrite    = true


This is the default.

>   headers_add   = "X-List: all-users.LOCALDOM (private)"
>   new_address    = ${perl{all_users}}


Vadik.

-- 
Prof:    So the American government went to IBM to come up with a data
         encryption standard and they came up with ...
Student: EBCDIC!