Knowledge
Base
- HOME:
Mailing Lists / Smartlist
The Smartlist mailing list manager
|
-
-
- 10. SmartList Support
SmartList Archives: http://www.cnr.berkeley.edu/~casterln/smartlist-arc/maillist.html
The FAQ is available in html and text format at http://www.hartzler.net/smartlist/
To subscribe to the Newsgroup: Send a blank e-mail to "smartlist-request@informatik.rwth-aachen.de" with the word "subscribe" in the subject line.
Miscellaneous Info: ***Whenever editing a file in SmartList, it is important to use led as the editor of choice rather than vi so that the files are locked during editing***
To find out if a file is hard linked: in list directory: ../.bin/showlink filename or generally: find -links 2
To edit rc.custom effectively: There are two lines commented(#) for every option. One line has a comment that says to do such and such, uncomment this line. This is the line to uncomment. Donot uncomment the other line as it is a duplication of the default that rc.init is set to. If you uncomment it, then you are resetting to the default. If all fails and editing rc.custom does not have the desired effect(of course you have tested it:-)), then delink the rc.init file for this list and edit it. To delink this file cd /home/user/domain-mail/list ../.bin/delink rc.init Delinking is necessary because all the rc.init files are hard linked to all the other rc.init files for a domain, so that what you change for one list is changed for all lists in the domain.
SmartList: To reply to list rather than to user: This is strongly not recommended as it tends to violate privacy uncomment (ie xx the #'s) ##reply_to field in rc.custom: cd /home/username/domainname-mail/listname ../.bin/led rc.custom reply_to = Reply_To = $listname@fulldomainname :wq answer yes if asked if you want to unlock file now.
Moving e-mail list from majordome, etc. to SmartList: have customer copy contents of old files on old server and upload to our server on our server: cd /home/username/domain-mail/ less filename select all addresses ctrl-insert q cd listname ../.bin/led dist paste contents i shift insert esc :wq
Edit accept file to limit who can post to a list in SmartList: on server cd /home/username/domainame-mail/listname ../.bin/delink accept (if you aren't sure if a file is linked ../.bin/showlink filename or find -links 2) vi accept dd at beginning of line of address not wanted ndd where n is the number of lines you want to delete :wq
Using SmartList for a Newsletter: cd /home/username/domainname-mail/listname ../.bin/led +/foreign_submit rc.custom uncomment (xx the #'s) ## foreign_submit to prevent submissions to list foreign_submit :wq delink the accept file ../.bin/delink accept ../.bin/led accept ndd all addresses except the owner/maintainer :wq
When the above steps are completed, owner may send to the list by e-mailing to listname@fulldomainname. If anyone else attempts to mail to the list, it will be sent to the owner rather than the list. (The program looks at the return address to compare to the accept file, therefore this must be an address in the accept file to be authorized to post to the list.)
Making a SmartList Moderated List: cd /home/username/domainname-mail/listname make a file called moderators that contains the addresses of all moderators cat > moderators type full e-mail addresses one per line xxx@yyy.com ttt@nnn.net etc ctrl-d to end entry ../.bin/led +/moderated_flag rc.custom uncommented the ##moderated_flag by x'ing the ##'s moderated_flag :wq
To Get an Approved Field in e-mail sent by a Moderator: (For e-mail clients that do not support adding additional headers) In rc.custom file for the list, uncomment the rc_local_submit_10 line as follows (use led, see above)
#RC_LOCAL_SUBMIT_00 = rc.local.s00 # Uncomment (and change) these to RC_LOCAL_SUBMIT_10 = rc.local.s10 # call up customised local scripts #RC_LOCAL_SUBMIT_20 = rc.local.s20 # at predefined points. #RC_LOCAL_REQUEST_00 = rc.local.r00 #RC_LOCAL_REQUEST_10 = rc.local.r10 #RC_LOCAL_REQUEST_20 = rc.local.r20 #RC_LOCAL_REQUEST_30 = rc.local.r30
Then, create the file rc.local.s10 in the list directory where the rc.custom file is. Here's the code, it can be copied and pasted after a cat > rc.local.s10:
# if there is no "Approved" header, and there is one in the # first part of the body (before any subsequent blank lines) # then move it to the header
0 * !^Approved * B ?? ^Approved { # Extract the first "Approve" from the body APPROVE="`grep '^Approved' | head -1`"
# Filter it from the body, and add it to the header 0 fw | grep -v "^Approved" | formail -I"$APPROVE" }
ctrl-d
Next make sure you have a file named moderators with your moderators email address in it
When you send a message to your Smartlist it will go to the moderators email inbox. To pass it on to the list for distribution simply type
Approved moderatorsusername@domain.com
begin message here
SmartList: editing message sent upon subscription/unsubscription: this, the user can do if inclined upon subscription: cd /home/username/domainname-mail/listname ../.bin/led subscribe.txt upon unsubscription: led /home/username/domainname-mail/listname/unsubscribe.txt
SmartList: editing lines sent out by program upon subscription/unsubscription: this, we do; don't let the user fiddle with it! upon subscription: cd /home/username/domainname-mail/.bin ./led subscribe find and edit the line :wq upon unsubscription: cd /home/username/domainname-mail/.bin ./led subscribe find and edit the line :wq
Helpful code that can be added for the user: when they talk about adding something to your rc.local.s20 or other rc.file, you have to make one as they do not already exist. Examples can be found in .examples file of domain-mail. I like to use cat as you can just start typing and it goes into the file. for example: cat > filename type entry ctrl-d to end entries
Taken from the archive: How can I add a message to the beginning of every digest? If you create a file named digest.admin in either the main directory of the digested list or in the archive/latest directory belonging to it, it will be picked up by the next flush_digests and included up front to the actual digest under the heading "Administrivia". The archive/latest/digest.admin file digested list will be automatically removed after the digest has been pushed out. The digest.admin file in the main directory of the digested list will not be removed and is included in every digest.
How can I add a short message file to the top of all of the mailing list messages? Uncomment the line "RC_LOCAL_SUBMIT_20 = rc.local.s20" from your rc.custom file, and add the following to your rc.local.s20 file:
# # Adding a disclaimer in front of every mail: #
:0 fhw | cat - header.txt
You will also need to create a file called header.txt, which contains the text to add to the message (this file can be empty though, so you can create the files, but only fill them in when you need to add something)
How can I add a short message file to the bottom of all of the mailing list messages? Uncomment the line "RC_LOCAL_SUBMIT_20 = rc.local.s20" from your rc.custom file, and add the following to your rc.local.s20 file:
# # Appending a disclaimer to every outgoing mail: #
:0 fbw | cat - footer.txt
You will also need to create a file called footer.txt, which contains the text to add to the message (this file can be empty though, so you can create the files, but only fill them in when you need to add something)
How can I keep the automatically added messages from multiplying when people quote them all the time? A small refinement here: if you add something like this:
# # Appending a disclaimer to every outgoing mail: #
:0 fbBw * ! to unsubscribe | cat - footer.txt
then (assuming that the phrase "to unsubscribe" appears in your footer.txt file), the footer won't be repeated if some bozo list member quotes an entire message without trimming the footer. (Answer submitted by Doug Landauer)
Is there an easy way to remove duplicates from the dist file? This script was contributed to the SmartList mailing list by mark david mcCreary, you can run this from your list directory (where the dist file is located), and it will remove the duplicates and sort the entries that appear below the "(Only addresses below this line can be automatically removed)" line.
#! /bin/sh : # # rc.dedup.list # # mdm 11/5/97 borrow code from David W. Tamkin, with additional # suggestions from Martin Konold and Hal Wine # # # This script will sort and remove duplicates from a Smartlist # distribution file. Smartlist dist files contain a comment line # that looks like this # # (Only addresses below this line can be automatically removed) # # Addresses above and including this line will not be sorted. #
lockfile=lockfile # /usr/bin/lockfile cat=cat # /bin/cat rm=rm # /bin/rm sed=sed # /bin/sed
# create lock file to discourage smartlist running a job
$lockfile -10 -l3600 -r11 -s30 rc.lock
$sed -e "1,/(Only addresses below this line can be automatically removed)/{ ;w slabove.$$ ;d; } " dist | sort -fu -o slbelow.$$
$cat sl?????.$$ > dist $rm -f sl?????.$$
$rm -rf rc.lock
Updated: January 4, 2001
-
-
|
|
|
|