Skip to Content.
Sympa Menu

en - Re: [sympa-users] Creating automatic lists

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: David Verdin <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-users] Creating automatic lists
  • Date: Fri, 29 Mar 2013 14:00:36 +0100

Hi all,

Le 20/03/13 21:56, Steve Shipway a écrit :
My question is this - what should I put into the .xml file when I
instantiate the list family - I seem to be in a position where it
requires an explicit value for the listname in the .xml (which
subsequently clashes with the value in the template) - where am I going
wrong?
I'm also have a go at setting up something like this.

I may be wrong (the documentation is woefully inadequate) but I think you do not use the .xml file to instatiate the family at all.
Indeed. The XML file is not used for automatic lists.

When managing list families (not auto-create lists) you use the XML and build the family.  That works for us here.

When doing autocreate, you use the family mechanism, but do not instantiate the family.  Instead, you set up in postfix a special transport that instantiates the list as the request comes in.

In master.cf, you define the new transport:

sympaauto    unix  -       n       n       -       -       pipe
  flags=R user=sympa argv=/usr/libexec/sympa/familyqueue ${recipient} myfamily

Then, you use your transport regexp map to send the list names to this transport:

/^auto-.*\@domain.com$/       sympaauto:

A similar effect can be done with regexp alias maps if you prefer.

The familyqueue handler takes care of instantiating the new list using the 'myfamily' definition.  I'm not sure how this works when you have multiple robots defined and how it chooses which robot to use for the family.  Probably it just takes it from the recipient email address.

I've not yet managed to make this work correctly either, so there are likely omissions or errors in the above.  Any Sympa wizards are welcome to correct me...
The thing is: the only information that is passed from the familyqueue to the config.tt2 is the listname. The full listname, including the "auto-prefix".
So you need to prefix your config.tt2 file with that kind of code:

[%
nemes = listname.split('auto-');
THROW autofamily "SYNTAX ERROR: listname must begin with 'auto-'" IF (nemes.size != 2 || nemes.0 != 'auto-');
%]

then, instead of using [% listname %], you will use [% nemes.1 %] (the non-prefixed part of the listname.

Try it again like this and, if it's not working, please send us some logs or actual error outputs.

Best regards,

David

Steve


Steve Shipway
ITS Unix Services Design Lead
University of Auckland, New Zealand
Floor 1, 58 Symonds Street, Auckland
Phone: +64 (0)9 3737599 ext 86487
DDI: +64 (0)9 924 6487
Mobile: +64 (0)21 753 189
Email: address@concealed
 Please consider the environment before printing this e-mail : 打印本邮件,将减少一棵树存活的机会


--
A bug in Sympa? Quick! To the bug tracker!

 
David Verdin
Infrastructure pour les Services Informatiques
 

Tél : +33 2 23 23 69 71
Fax : +33 2 23 23 71 21
 

www.renater.fr
RENATER
263 Avenue du Gal Leclerc
35042 Rennes Cedex



PNG image

Attachment: smime.p7s
Description: Signature cryptographique S/MIME




Archive powered by MHonArc 2.6.19+.

Top of Page