Re: [exim] Counting how many addresses a redirect router gen…

Pàgina inicial
Delete this message
Reply to this message
Autor: Chris Siebenmann
Data:  
A: Jeremy Harris
CC: exim-users, cks
Assumpte: Re: [exim] Counting how many addresses a redirect router generates?
> On 02/11/16 16:42, Chris Siebenmann wrote:
> > We have a mail system facility where we allow users to place files in
> > a special 'lists' directory
>
> > We have recently wound up wanting to be able to tell the difference
> > between the two sorts of 'mailing lists', so we can treat email passing
> > through them somewhat differently. So, is there any good way to do
> > something like count the number of addresses generated from a redirect
> > expansion? Alternately, can people think of clever other ways to do this?
>
> You didn't say what format the files are.
>
> Read the file, feed it to ${listcount } (recent Exim; mind the choice
> of list-sep)
> or just look for a separator with ${sg }


My lack of being explicit. The files are in the standard format
accepted by the redirect router as 'file = ...' arguments, which I
believe in practice for our users is one address per non-commented line.

(I can't remember if the redirect router also accepts 'addr1, addr2,
addr3' on a single line in 'file = ' files, but if it does I don't think
people use it very much in these files.)

Files *must* be read as the user that owns them, however; the main
Exim user does not necessarily have the necessary privileges to do
so. (Nor does root; these files are accessed over NFS.)

    - cks