At 12:58 17/06/2003, Jonas Meurer wrote:

*** PGP Signature Status: unknown
*** Signer: Unknown, Key ID xE25F2102
*** Signed: 17/06/2003 12:58:35
*** Verified: 17/06/2003 14:21:59
*** BEGIN PGP VERIFIED MESSAGE ***

On 17/06/2003 Richard Barrett wrote:
> >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'

ok, some explanation: i'm the debian maintainer of lurker and i wrote
a little wrapper for lurker-index that automaticly uses the config file.
so only 'lurker-index -l fred-list -m' is needed.

> 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
> short-lurker-listname.


doesn't look so. when i set in mm_cfg.py:
PUBLIC_EXTERNAL_ARCHIVER = "echo foobar"
mailman still grumbles:
==> /var/log/mailman/error <==
Jun 17 13:26:59 2003 (1464) external archiver non-zero exit status: 1

so that seems not to be a problem of lurker.

I do not want to get into a contest but for me the following work fine when added to mm_cfg.py on my MM 2.1.2 backup/test server:


PUBLIC_EXTERNAL_ARCHIVER = 'echo "got called for %(listname)s" | cat >> /tmp/teststuff'
PRIVATE_EXTERNAL_ARCHIVER = 'echo "got called for %(listname)s" | cat >> /tmp/teststuff'


appends a line containing the target listname to the file for each archived message, while:

PUBLIC_EXTERNAL_ARCHIVER = 'cat >> /tmp/teststuff'
PRIVATE_EXTERNAL_ARCHIVER = 'cat >> /tmp/teststuff'

appends each archived message to the file.

As I said before, it is far from clear to me that your problem is a Mailman problem per se.

I'm inclined to think that getting these test cases to work would be a useful first objective.

Is the failure to execute the external archiver command correctly some execution environment issue which I do not see (running Suse Linux 7.3 with Python 2.2.2 and MM 2.1.2 installed from source) but you do see when running, presumably, Debian?

Maybe it is an enviroment problem when the extranl command
> 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.


mh, i don't like this workaround either. but it has to be: lurker
supports only 32 chars per listname, and max 16 is recommented. that is,
because lurker is using these names in urls, and long urls suck.
so, mailman itself has no listname limitation. how to get these two
paradoxes working together? only with an acronym of mailman listname for
lurker. so i create a (hopefully) unique acronym at creating lurker.conf
now every mail has to be imported to the list with it's acronym.
that's why i have to use this ugly workaround. a better solution would
be to add a function to lurker-list that gives the listname where title
= 'bla'. like
lurker-list -c /etc/lurker/lurker.conf -t fred-list -i

but that is not supported by lurker-list at the moment. don't know if
upstream would add this function.

still, the hole workaround is not the best solution. the lists i
maintain are all in the style 'part1-part2-part3-...'. some without any
-, some with many. so i split the list in the parts, n=number of parts.
then i do 16/n, and every part gets as many chars as the result gives.
now the first run of a loop fills the acronym until 1*(16/n), the second
until 2*(16/n). so there will always result an acronym without the - but
with at least 16/n chars per part, if the part is long enough. here is
the algoritm script:
actual_list_lc=`echo $actual_list | awk '{print tolower($0)}'`
actual_list_id=`echo $actual_list_lc | awk'{s="";n=split($0,a,/-/);c=16/n;for(i=1;i<=n;i++){s=s""substr(a[i],1,c*i-length(s))};print tolower(s)}'


if $actual_list has value "Argentina-Communicados" for example,
$actual_list_lc will be "argentina-communicados", and $actual_list_id
will have value "argentincommunic".

if anyone has a better solution for a workaround, please contact me. i'm
really unhappy with the stuff above.

> 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.

see above (the config is not needed as i use the wrapper).

> 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.

once mailman runs without any problems with lurker as archiver, i'll
surely add an entry to the mailman faq ;)

bye
 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


*** END PGP VERIFIED MESSAGE ***

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


------------------------------------------------------ Mailman-Users mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to