[Mailman-Users] external archiver second time

Richard Barrett r.barrett at openinfo.co.uk
Tue Jun 17 01:07:38 CEST 2003

At 18:29 16/06/2003, Jonas Meurer wrote:
>*** PGP Signature Status: unknown
>*** Signer: Unknown, Key ID xE25F2102
>*** Signed: 16/06/2003 18:29:16
>*** Verified: 16/06/2003 22:14:37
>i still have in my mm_cfg.py:
>PUBLIC_EXTERNAL_ARCHIVER = 'lurker-index -l `lurker-list -c 
>/etc/lurker/lurker.conf | grep -B2 "^%(listname)s$"| head -n1` -m'

 From a quick glance at the documentation files accompanying the lurker 
release 0.90 on sourceforge I would have thought that the following line 
would do it:

PUBLIC_EXTERNAL_ARCHIVER = 'lurker-index -l %(listname}s -c 
/etc/lurker/lurker.conf -m'

For example, with a MM list called fred-list this would lead to MM 
executing the following command and piping the message text to STDIN for 
the subprocess:

     'lurker-index -l fred-list -c /etc/lurker/lurker.conf -m'

This seems fairly straightforward.

It seems your trouble is with the fancy footwork you are trying to perform 
with lurker-list, grep and head to translate a mailman-proper-listname to a 

The efficiency of this seems to me to be fairly questionable, particularly 
when you consider the use of the short 'list' names is supposed to be an 
efficiency measure.

Personally, if I thought it was worth the effort to have these abbrieviated 
list names I'd find a better method of doing that mapping than using grep.

But if you insist on doing it the grep way, I think you may need to say:

PUBLIC_EXTERNAL_ARCHIVER = 'lurker-index -c /etc/lurker/lurker.conf -l 
`lurker-list -c /etc/lurker/lurker.conf | grep -B2 "^%(listname)s$"| head 
-n1` -m'

that is assuming the output from lurker-list without any other parameters 
consists of groups three lines, the first being the short-lurker-listname 
and the third the mailman-proper-listname.

I'll now leave you to persuade the grepping and such to work.

This is definitely not a Mailman problem but feel free to add an entry to 
the Mailman FAQ when you get it working.

>that doesn't work.
>how can i do this (showed in shell prompt) for every message mailman
>listlurker=`lurker-list -c /etc/lurker/lurker.conf | grep -B2 
>"^${listname}$" | head -n1`
>lurker-import -l $listlurker -m
>where ${listname} has to have the value of the listname. to explain the
>regex: 'lurker-list -c /etc/lurker/lurker.conf' gives some output
>(lists, and their configs). 'grep -B2 "^${listname}$"' greps for a line
>that has [linestart]${listname}[linend]. [linestart] is ^ and [linend]
>$. grep fetches this and the two lines under it and outputs that. 'head
>-n1' gives the last line of the output.
>'lurker-import -l $listlurker -m' really is the prompt that needs the
>message through stdin.
>do you have and idea how to patch mailman doing the above?
>  mejo
>Efficiency and progess is ours one more
>Now that we have the Neutron bomb
>It's nice and quick and clean and gets things done
>Kill kill kill kill kill the poor tonight

Richard Barrett                                      http://www.openinfo.co.uk

More information about the Mailman-Users mailing list