Hi, Can anyone please give me a pointer or example: I would like my non-technical list-subscribers to be able to easily switch between a normal and a digested list. So that when they subscribe to one, while already subscribed to the other, the original subscription is (silently) removed. I didn't find a reference on how to do this in the manual or faq. Is there a reason that I shouldn't want to do this? Next-best solution would be to implement an extra "switch" command, may be... Is there a way to do this, without a lot of editing of the sources? Gyelt -- http://www.xs4all.nl/~gyelt/ergo/index.html about Dutch occupational therapy
On Sat, Apr 27, 2002 at 01:30:27PM +0200, Gyelt Tuinstra wrote:
I would like my non-technical list-subscribers to be able to easily switch between a normal and a digested list. So that when they subscribe to one, while already subscribed to the other, the original subscription is (silently) removed. I didn't find a reference on how to do this in the manual or faq. ... Is there a way to do this, without a lot of editing of the sources?
I've been intending to impliment this on my list; I'm sure it can be done with just the rc.custom files and maybe a small shell script, things I can do without much root access on my ISP. (They're very cooperative about adding a script or alias to the system when it does need root access.) But somehow, it's never bubbled to the top of my priority stack; I put my list-hacking time into spam filtering and quotation removal. And I thought by now digest switching must be implimented in a newer version of SmartList (we run the ancient 3.10 at Eskimo, for some reason :), or that at least it must be a FAQ. Not so? Jim
Jim -- Not a FAQ -- I don't remember the topic coming up before, actually. I agree, it doesn't sound like it'd be a big deal to whomp up. Gyelt -- Don't be afraid to tweak the code -- after all, the transparency of SmartList is one of it's biggest benefits -- it's infinitely customizable, and grokking procmail is certainly worth the effort. -ph On Sat, 27 Apr 2002, JimO wrote:
On Sat, Apr 27, 2002 at 01:30:27PM +0200, Gyelt Tuinstra wrote:
I would like my non-technical list-subscribers to be able to easily switch between a normal and a digested list. So that when they subscribe to one, while already subscribed to the other, the original subscription is (silently) removed. I didn't find a reference on how to do this in the manual or faq. ... Is there a way to do this, without a lot of editing of the sources?
I've been intending to impliment this on my list; I'm sure it can be done with just the rc.custom files and maybe a small shell script, things I can do without much root access on my ISP. (They're very cooperative about adding a script or alias to the system when it does need root access.)
But somehow, it's never bubbled to the top of my priority stack; I put my list-hacking time into spam filtering and quotation removal. And I thought by now digest switching must be implimented in a newer version of SmartList (we run the ancient 3.10 at Eskimo, for some reason :), or that at least it must be a FAQ. Not so?
Jim _______________________________________________ Smartlist mailing list Smartlist@lists.RWTH-Aachen.DE http://MailMan.RWTH-Aachen.DE/mailman/listinfo/smartlist
On Sat, Apr 27, 2002 at 01:30:27PM +0200, Gyelt Tuinstra wrote:
Hi,
Can anyone please give me a pointer or example: I would like my non-technical list-subscribers to be able to easily switch between a normal and a digested list. So that when they subscribe to one, while already subscribed to the other, the original subscription is (silently) removed.
Thanks for the responses. This is what I did: I edited .bin/subscribe (#$Id: subscribe,v 1.36) and added line 132 to add a hook: . ~/.bin/switchdigest.sh switchdigest.sh is a quick _bash_ script (see below) that works on my system, but probably not for everyone. It's just that I'm more used to bash and don't need more compatibility than this. I'd like your comments, though, on how it could fit beter into the rest of smartlist. Gyelt -------------------------- # 20020430 Gyelt Tuinstra gyelt@xs4all.nl # # status: experimental # # This bash-script is called from smartlists .bin/subscribe # It will delete the subscriber from the list/dist and list/accept file if # he subscribes to the list-digest and v.v. # # It is assumed that the list and its digest exist. # This script expects to be started from the subscribe-script (line 132) # The name of the digested list should be the listname with # something appended (variable DIGESTSUBSTRING) # # See the manual to make sure that one subscribed to the digest can also # post. # # todo: # if someone unsubscribes it may be to the wrong list # respect the "above this line" line in dist and accept files # be verbose to sender # # variables uppercase, as smartlist uses lowercase # ( # to debug #set #set -xv DIGESTSUBSTRING="-digest" WHO=$subscraddr if [ -z "$list" ] then # simple sanity check echo Environment not right, not started from .bin/subscribe? exit 1 fi if [ -z "$undigested_list" ] then # if $undigested_list doesn't exist, user wants normal # list EDITLIST="${list}${DIGESTSUBSTRING}" else # meaning: substract de length of the digestsubstring # from the digest-listname EDITLIST=${list:0:${#list}-${#DIGESTSUBSTRING}} fi grep -q $WHO ~lijst/$EDITLIST/dist if [ $? -eq 0 ] then ed ~lijst/$EDITLIST/dist <<-EOF /^$WHO$ d w q EOF grep -q $WHO ~lijst/$EDITLIST/accept if [ $? -eq 0 ] then ed ~lijst/$EDITLIST/accept <<-EOF /^$WHO$ d w q EOF fi fi ) >/tmp/swd.log 2>&1 --------------------------------------------
participants (3)
-
Gyelt Tuinstra
-
JimO
-
Peter Hartzler