SmartList Frequently Asked Questions

August 02, 2000
Revision: 1.15

Table Of Contents

1: General

    1.1: Introduction:
    1.2: History of this document:
    1.3: What is SmartList?
    1.4: Is there more documentation available?
    1.5: How does SmartList work?
    1.6: Where can I get SmartList?
    1.7: Is there a SmartList Support mailing list?
    1.8: Is there an archive of the mailing list?
    1.9: What's the purpose of the rc.local.* files?
    1.10: How can I see what's going on (diagnostics)?

2: Basic List Administration

    2.1: What does "uncomment" mean?
    2.2: How do I make the list Open/Closed?
    2.3: How can I disable automatic unsubscription?
    2.4: How can I prevent certain people from automatic unsubscription?
    2.5: How do people subscribe/unsubscribe to the list?
    2.6: How do I change the admin password for my list?
    2.7: How do I enable 'auto help'?
    2.8: How can I tell smartlist to notify me when someone subscribes/unsubscribes?
    2.9: How can I automatically subscribe people who post to the list?
    2.10: How can I add a short message file to the top or the bottom of all the mailing list messages?
    2.11: How can I keep the automatically added messages from multiplying when people quote them all the time?
    2.12: How can I automatically send files to new subscribers?
    2.13: Can I add comments to the addresses in the dist file?
    2.14: How does someone access the archive server?
    2.15: What does "delink" mean?
    2.16: How do I add another list of accept addresses?

3: Remote Administration

    3.1: How do I use X-Command for remote administration?
    3.2: How do I subscribe/unsubscribe people to my list?
    3.3: How do I get a list of the subscribers?
    3.4: How can I prevent the accidental multiple subscription of an address with x_command?
    3.5: Is there a web interface for administering SmartList?
    3.6: Why isn't SmartList adding/removing names even though it says it is?

4: Restrictions and Security

    4.1: How can I restrict who can subscribe to my list?
    4.2: How can I restrict who can post to my list?
    4.3: How can I prevent that someone (un)subscribes someone else without their knowledge?
    4.4: Is their a possibility to authenticate postings with SmartList?
    4.5: How can I restrict who can access the archive server?
    4.6: Can SmartList confirm (un)subscriptions?
    4.7: How can I allow posts only from a certain domain, without using the accept file?
    4.8: How to bounce messages with a certain word in the subject?
    4.9: How to automatically notify posters of messages bounced for being too large?

5: Digests

    5.1: How do I turn a non-digest list into a digest?
    5.2: How often do digests get sent out?
    5.3: Can I force a digest to be sent every day, even if it is small?
    5.4: How can I add a message to the beginning of every digest?

6: Interaction of SmartList with Message Transfer Agents (MTAs)

    6.1: Does SmartList run with Postfix?
    6.2: Does SmartList run with qmail?
    6.3: Sendmail can't run flist. Why? (smrsh)

7: Addons and enhancements for SmartList

    7.1: Is it possible to have more than one list maintainer?
    7.2: Can I remotely update files used by SmartList like help.txt?
    7.3: How can a subscriber temporarily suspend subscription?
    7.4: Where can I find more SmartList information and utilities?

8: Miscellaneous

    8.1: How can I make my list moderated?
    8.2: How can I change the messages that smartlist sends to people?
    8.3: How can I add "[listname]" to all of the mailing list messages for easy filtering?
    8.4: How can I add a custom header to all of the mailing list messages?
    8.5: How can I remove some headers from all of the mailing list messages?
    8.6: Is there an easy way to remove duplicates from the dist file?
    8.7: How can I keep people from sending HTML/attachments/other junk to the list?
    8.8: How do I make replies go to the list instead of to the sender?
    8.9: How can I make replies go to the original sender?
    8.10: How can I include the number of subscribers in the footer I'm attaching to each list mail?
    8.11: Can I issue X-Commands from the message body?

SmartList Frequently Asked Questions


1: General


1.1: Introduction:

Welcome to the SmartList FAQ.

You are strongly advised to read the official SmartList Manual in advance. Many questions in this FAQ are only pointing to the appropriate chapter in the Manual.

This document is a collection of helpful hints and tips for getting the most out of SmartList. The sources for this information are numerous.

If you have a comment or suggestion regarding this FAQ, please forward it to sl-faq@hartzler.net. Note: Please do not direct requests for assistance with SmartList to this address, or they will be ignored. There are public lists dedicated to that purpose (see below), and you are much more likely to get satisfaction there.

Disclaimer: All information in this FAQ is provided AS IS and without any warranty of any kind. No person involved in this document assumes any liability for damages which may occur as a result of using this information. USE THIS INFORMATION ONLY AT YOUR OWN RISK.

It is suggested that you create a test list, and try changes on that test list before you place them into production.


1.2: History of this document:

This document was originally written by jason@mindwell.com.

It was then picked up and modified/enhanced by Werner Reisberger; <werner@pure.ch>.

This FAQ is currently maintained by Peter Hartzler, and is officially located at http://www.hartzler.net/smartlist.
You may also find it mirrored at http://www.pure.ch/doc/smartlist/faq.html


1.3: What is SmartList?

SmartList is an email list management system based on procmail.

The current "best" version of SmartList is 1.13.


1.4: Is there more documentation available?

The best documentation is the SmartList manual contained within the SmartList sources. Every list maintainer should first read this manual to understand how SmartList works and to save a lot of time if problems occurs later.

The SmartList manual is available at ftp://ftp.pure.ch/pub/smartlist/SmartList-Manual as well as in the .doc directory of a normal SmartList install.

Next, the distribution comes with considerable amounts of example code, which is to be found in the .examples directory of your installation.

There are actually several FAQs that people have put together, and you might very well find some useful bits in the others. There appears to be a considerable overlap in these documents, but what the heck. :) Check out:

You can also search in the list archive(s) (see question "Is there an archive of the mailing list?")

Finally, SmartList is heavily based on procmail, and in fact many questions about how to do specialized things in SmartList end up being mainly procmail questions. You might want to check out:


1.5: How does SmartList work?

SmartList is based on a set of procmail scripts to process emails suitable for the purpose of a mailing list. If you want to know how the emails will be processed take a look into the SmartList manual (section "Schematic overview of what goes on behind the scenes")


1.6: Where can I get SmartList?

SmartList needs also Procmail.

The latest version of Procmail can be found at: http://www.procmail.org or ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/procmail.tar.gz

The latest version of Smartlist can be found at: ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/SmartList.tar.gz


1.7: Is there a SmartList Support mailing list?

Yes. for more information, see http://MailMan.RWTH-Aachen.DE/mailman/listinfo/smartlist

Another mailing list, for developers is

smartlist-dev-request@cuci.nl


1.8: Is there an archive of the mailing list?

Yes, at

http://www.cnr.berkeley.edu/~casterln/smartlist-arc/maillist.html

Another view of that archive is available at

http://www.cnr.berkeley.edu/~casterln/smartlist-arc/threads.html

You can also access the archive via email. To learn how to, send an email to smartlist-request@informatik.rwth-aachen.de with the subject "archive help".


1.9: What's the purpose of the rc.local.* files?

They let you enhance or alter the function of SmartList by calling procmail scripts at different states of email processing.


1.10: How can I see what's going on (diagnostics)?

If SmartList sends out messages to the maintainer or the list, it adds message headers beginning with "X-Diagnostics:". Every maintainer should read these header lines to recognize problems with the list.

SmartList usually creates by default in every list a log file called "log". If you want to trace a problem with a list you can set the variable VERBOSE in rc.custom to "on". Subsequently, every processed message will create a lot of debugging information in the log file.

Don't forget to turn it off later.


2: Basic List Administration


2.1: What does "uncomment" mean?

This question seems very trivial but experience showed that many people have problems understanding how to (de)activate a variable in the rc.custom file.

To uncomment a line in the file, remove all hashmarks (#) from the front of the line (if there is more than one, be sure and remove them all), and change the value if necessary. For example, the moderate section in the standard distribution looks like this:

#moderated_flag
##moderated_flag=       yes             # uncomment this to make the list
                                        # moderated (you must create a

For example, to turn your list into a moderated list, remove the two hash marks from the line that says "moderated_flag = yes", so the section now looks like this:

#moderated_flag
moderated_flag=       yes               # uncomment this to make the list
                                        # moderated (you must create a

In other words, anything after a hashmark on a line is considered a comment, and anything before any hashmarks (if any) is uncommented. So, you can uncomment a feature setting, and still have a comment on that line, out towards the end.

NOTE Be sure the text editor you use saves text in "UNIX" text format, with only a newline character at the end of each line, and not a carriage-return newline pair. Many windows based text editors insert that carriage-return, and this can break your configuration files.

If you end up with carriage returns in your text files, you can remove them with perl, like this: (this particular example assumes the file you want to clean is rc.local.s20, change this file to be the one that needs cleaning):

perl -p -i -e 's/\r//' rc.local.s20

2.2: How do I make the list Open/Closed?

To make the list closed subscription (i.e. the maintainer has to approve subscriptions), uncomment the auto_subscribe line in rc.custom, and set it to read:

auto_subscribe = no
To make the list closed for unsubscriptions, do the same thing with the auto_unsubscribe line.

2.3: How can I disable automatic unsubscription?

  1. Set the variable auto_unsubscribe in rc.custom to an empty value.
  2. Remove the line '(Only addresses below this line can be automatically removed)' from the dist file.

2.4: How can I prevent certain people from automatic unsubscription?

Everything in the dist file preceding the line containing: '(Only addresses below this line can be automatically removed)' is write protected from changes by multigram (i.e. these addresses can never be automatically/accidentally unsubscribed).


2.5: How do people subscribe/unsubscribe to the list?

By sending a message to the listname-request address with the message 'subscribe' or 'unsubscribe' in the body or the subject of the mail, if the list is open, they will be added to it, if it is a closed list the request will be forwarded to the list maintainer.


2.6: How do I change the admin password for my list?

The password is stored in the rc.custom file.


2.7: How do I enable 'auto help'?

By uncommenting the appropriate "auto_help" line in the rc.custom file the list will respond to every undecipherable request message as if it requested help. Messages that will still get through to the maintainer are those:


2.8: How can I tell smartlist to notify me when someone subscribes/unsubscribes?

By setting the cc_requests or cc_unsubrequests variables in the rc.custom file to yes (making sure to uncomment it).


2.9: How can I automatically subscribe people who post to the list?

Instead of rejecting submissions by people not on the accept (dist) list, you can enable "force_subscribe". This will cause people submitting mails to the list to be autosubscribed to the list if they were not in the dist file.


2.10: How can I add a short message file to the top or the bottom of all 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

# # Appending a footer to every outgoing mail: #

:0 fbw | cat - footer.txt

You will also need to create a file called header.txt or one 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)


2.11: 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)

An even cleaner solution, developed by Paul Thomas and Era Eriksson is to pull in content from your actual footer.txt to check and see if that text already exists in the message. This has the advantage of tending to automatically track changes you might make to your footer.txt file...

TEXT=`sed -n '2 p' <footer.txt`
:0 fbBw
* $ ! $\TEXT
| cat - footer.txt
What this does is load the variable TEXT with a line of text from your footer.txt file (the second line, in this example), and use that data for it's test. Note that you need two $'s -- one to say "here's the variable I want to interpolate" ($TEXT) and one in front of the condition to say "interpolate variables in this condition". Also note that $\TEXT is a special form of $TEXT where regex specials will be escaped in the interpolated value. So if the second line of the footer says "*** cut here ***" then that is not a valid regular expression, but "\*\*\* cut here \*\*\*" is.

2.12: How can I automatically send files to new subscribers?

You can create a file named "subscribe.files" in the list directory. It can contain any number of archive-server commands. The results (i.e. the files requested) will be sent to the new subscriber.


2.13: Can I add comments to the addresses in the dist file?

Yes. See Chapter 5 of the SmartList manual for the exact format and limitations.

However, according to Paul Thomas:

"Perhaps it should be noted that comments in the dist file confuse multigram and those addresses have to be removed by hand should they desired to be unsubsribed, start bouncing, etc."

2.14: How does someone access the archive server?

See Chapter 4 of the SmartList manual.

Additionally, there are web interfaces to allow searching archives. A combination of Mhonarc, Wilma and Glimpse is reported to work well, and more information is available on the Mhonarc site.


2.15: What does "delink" mean?

delink is a shell script in the .bin directory of your SmartList installation which lets you remove the hard link from a file. This is important for list files like rc.init which are by default hard linked across all lists.

Usage:
delink filename

A set of files which are hard linked together have the quality that a change made to any of those files will be reflected in all of them. In other words, all files in a hard linked set are always identical. If you want to make one file in a hard linked set different from the others, perhaps to customize one list differently from the others, then you must first remove that file from the hard linked set, using delink or the equivalent.

You can use the showlink tool to get some idea of what a file is hard linked to.


2.16: How do I add another list of accept addresses?

By default, the accept list (those who can submit to the list even if foreign_submit is off) is linked to the dist list. You may want to add another list of valid submitters, such as to allow both list and digest recipients to post to a list.

Additionally, you may want to add yet another accept list, which could include the list owner, or other valid senders:

  1. Unlink rc.submit.
  2. Find the line that ends with:
     -x$listaddr -x$listreq accept accept2
    
  3. Change it to:
     -x$listaddr -x$listreq accept accept2 accept3
    

(Tip o' the hat to Paul Thomas)

Here is another hint, submitted by Scott Pallack:

I use 3accept instaad of accept3. My list has both normal (dist linked to accept) and digest (dist linked to accept2) subscribers and I can put additional addresses, such as the listowner, alternative addresses for list members, etc., into the 3accept and still be abole to do things like:

grep -i user@domain.net acc*
cat acc*|grep @|sort|uniq|wc
cat acc*|grep @|sort|uniq -d
etc.

3: Remote Administration


3.1: How do I use X-Command for remote administration?

See chapter 2 of the SmartList manual.

It should be noted that it is possible to put multiple commands in one message. Combined with the example in .examples/rc.local.r00 this makes it easy to work with X-Commands by allowing you to place multiple commands within the body of your messages.

And no, you can't just put X-Commands in the Subject line of the header.


3.2: How do I subscribe/unsubscribe people to my list?

See chapter 2 of the SmartList manual.


3.3: How do I get a list of the subscribers?

See chapter 2 of the SmartList manual.


3.4: How can I prevent the accidental multiple subscription of an address with x_command?

Modify the x_command script with the following patch:

51,66c51,60
<          $echo $2 | $multigram -c -l32000 dist >/dev/null
<          if test $? -ne 0; then
< 	   $echo "From $2 " >$tmprequest
< 	   $echo "From: request ($listreq)" >>$tmprequest
< 	   $echo "Reply-To: $2" >>$tmprequest
< 	   $echo "To: $listreq" >>$tmprequest
< 	   $echo "Subject: subscribe $2" >>$tmprequest
< 	   $echo "$2" >$tmpfrom
< 	   $test -z "$subscribe_log" ||
< 	    $echo "x_command: subscribe" >>$subscribe_log
< 	    $subscribe <$tmprequest ||
<    	   $echo "X-Diagnostic: Unscreened, not subscribed"
<      else
<        $echo ""
<        $echo "$2 is already subscribed!"
<      fi
---
> 	 $echo "From $2 " >$tmprequest
> 	 $echo "From: request ($listreq)" >>$tmprequest
> 	 $echo "Reply-To: $2" >>$tmprequest
> 	 $echo "To: $listreq" >>$tmprequest
> 	 $echo "Subject: subscribe $2" >>$tmprequest
> 	 $echo "$2" >$tmpfrom
> 	 $test -z "$subscribe_log" ||
> 	  $echo "x_command: subscribe" >>$subscribe_log
> 	 $subscribe <$tmprequest ||
> 	  $echo "X-Diagnostic: Unscreened, not subscribed"


3.5: Is there a web interface for administering SmartList?

There is a perl cgi script which let's you send all X-Commands via the web. It's called x_command and is available at

ftp://www.pure.ch/pub/smartlist/

You can also use Matt Wright's "Formmail" script to provide a web based sign-up form. You can get the script at http://www.cgi-resources.com

See http://www.mplsrc.com/mailinglist.shtml for the form.

Thanks to Irwin Lazar for the Formmail suggestion.


3.6: Why isn't SmartList adding/removing names even though it says it is?

There are several possible reasons why SmartList might fail to update the dist list. The two most common reasons seem to be:

  1. An incorrect installation (possibly from a faulty package), or
  2. Incorrect file permissions.

Assuming your installation is OK, check the file permissions of your dist file. The 's' (setuid/setgid) permissions of the flist binary determine what rights it has when it runs. The dist file must be writable by a process with those permissions.


4: Restrictions and Security


4.1: How can I restrict who can subscribe to my list?

See chapter 3b of the SmartList manual.

In addition you can use the confirm addon to forward all subscription requests at first to the maintainer who has to confirm the request before the new address will be added to the list.


4.2: How can I restrict who can post to my list?

See chapter 3c of the SmartList manual.


4.3: How can I prevent that someone (un)subscribes someone else without their knowledge?

Disable the variable auto_unsubscribe in rc.custom or use the confirm addon.


4.4: Is their a possibility to authenticate postings with SmartList?

No. email is an insecure tool and messages are easy to fake. SmartList cannot make it more secure. Each message could be faked on a list. To make email more secure use PGP or other encryption packages for email usage.


4.5: How can I restrict who can access the archive server?

See chapter 4b of the SmartList manual.


4.6: Can SmartList confirm (un)subscriptions?

Yes, You need an addon to SmartList to confirm subscriptions and/or unsubscriptions. The addon is called confirm and is available at:

ftp://www.pure.ch/pub/smartlist/

Also check out:

ftp://gen.free.de/smartlist/confirm-1.2.tar.gz

Confirmation of subscriptions is very useful to prevent the initial subscription of invalid addresses or the unwittingly subscription of addresses by a malicious person.


4.7: How can I allow posts only from a certain domain, without using the accept file?

You need to apply the patch below to rc.submit (delink first) and copy the subcreen script within the .examples directory to yourlist_dir/postscreen.

E. g. if you want to allow all postings from anyuser@friendly.dom and reject all other addresses which are not in the accept file, the lines

case "$1" in
*@friendly.dom            exit 0 ;;       # This one is ok
esac

exit 1 # reject everything else

will be sufficient.

Patch to rc.submit:

102a103,107
>   * 2^0 ? if test -f postscreen; then \
>           screenadress=`formail -xFrom: | sed -e 's/.*<\(.*\)>/\1/' \
>           -e 's/\(.*\) (.*)/\1/'`; \
>           postscreen $screenadress;\
>           fi


4.8: How to bounce messages with a certain word in the subject?

If the string you're filtering agains is "foobar", then put something like this in rc.local.s00

    :0
    * ^Subject:[ ]*.*foobar.*
    | formail -rtk -I "Subject: Posting of followup rejected (was: $MATCH)"

4.9: How to automatically notify posters of messages bounced for being too large?

"By default, posts that are too long are forwarded to the list owner, who has to write the person manually to explain what's happened. It would be more convenient if SmartList would send them an automated notice..."

Try this in rc.local.00:

:0 wfbh
* !< $size_limit
|formail -rk -I "X-Loop: $listreq" -I "From: $listreq" \
 -I "Subject: Sorry, message size for $list is max.: $size_limit bytes!" |\
 $SENDMAIL -t

It should bounce the whole message, mentioning the max. message size in the subject.

Tip 'o the hat to Werner Reisberger for this solution.


5: Digests


5.1: How do I turn a non-digest list into a digest?

See chapter 3a of the SmartList manual.


5.2: How often do digests get sent out?

See chapter 3a of the SmartList manual.


5.3: Can I force a digest to be sent every day, even if it is small?

See chapter 3a of the SmartList manual.


5.4: How can I add a message to the beginning of every digest?

See chapter 3a of the SmartList manual.


6: Interaction of SmartList with Message Transfer Agents (MTAs)


6.1: Does SmartList run with Postfix?

Yes. If you use the sendmail replacement of postfix you don't need to change anything. Just make sure that SmartList can find the sendmail wrapper.

For large lists it may be advantageous to replace choplist with the direct sendmail wrapper call because postfix doesn't need a helper program for the load balancing.


6.2: Does SmartList run with qmail?

Yes. If you use the sendmail replacement of qmail you don't need to change anything within SmartList.

For large lists Tracy R Reed <treed@freeside.ultraviolet.org> suggested the following:

To: djb-qmail@koobera.math.uic.edu, SmartList@Informatik.RWTH-Aachen.DE
Subject: smartlist and qmail
Date: Mon, 29 Sep 1997 14:10:42 -0700 (PDT)

I have noticed that using choplist to feed qmail's sendmail clone (because choplist expects sendmail) to distribute mail to my large mailing list was incurring massive amounts of overhead and really slowing things down. If I could just get smartlist to call qmail-inject directly, it would greatly speed things up. To this end, I modified my rc.init file:

alt_sendmail="smart-qmail dist $listreq"

And put this perl script in ~list/.bin/smart-qmail

#!/usr/bin/perl
$from = $ARGV[1];
$addyfile = $ARGV[0];
while() {
  $message .= $_;
  }

open(BLAH,"<$addyfile") || die "Doh! No address file!\n"; $x = 0; while () { if(/Only addresses below this line can be automatically removed/) { next; } chop; $addy .= " ". $_; $x++;

# 30 is kinda arbitrary, I just don't want to run into any ugly command # line length limits.

if ($x == 30) { open(INJECT,"|/var/qmail/bin/qmail-inject -f$from $addy"); print INJECT $message; close INJECT; $x = 0; $addy = ""; } } open(INJECT,"|/var/qmail/bin/qmail-inject -f$from $addy"); print INJECT $message; close INJECT;

Another note -- Paul Thomas points out that

"Qmail bounces email differently than sendmail. It does a 'local' bounce and a 'remote' bounce. SmartList will process to the best of it's ability a 'remote' bounce, but 'local' bounces are written to a qmail "Mailbox' file and overlooked by SmartList. In short, qmail will work with SmartList but to make everything work right one is looking at a major hack of SmartList."

6.3: Sendmail can't run flist. Why? (smrsh)

If you log an error message something like

554 "|exec /path/to/flist listname"... Service unavailable
the reason is most probably that sendmail is using the smrsh "Sendmail Restricted SHell" environment for shell calls.

The way a message initially gets to the SmartList system is through a sendmail alias which pipes the email to the program. The alias probably looks something like:

listname: "|exec /path/to/flist listname"
However, some configurations of sendmail attempt to increase security by restricting allowable programs to those in a certain directory. In this case, you need to create a symlink to the flist binary in the smrsh directory.

Try these steps:

  1. Find the correct location of your smrsh directory. You may have to examine your smrsh source, or use the strings command to examine your smrsh binary.

  2. Create a symlink to your flist binary in the smrsh directory:
    ln -s /path/to/flist /location/of/smrsh/flist
  3. Change the alias for the list to simply be
    listname: "|flist listname"
    You don't need the path to flist now, since sendmail is only going to look in one place (your smrsh directory). You don't need the exec either.

Don't forget to run newaliases after you modify your aliases file to effect your changes.


7: Addons and enhancements for SmartList


7.1: Is it possible to have more than one list maintainer?

Yes apply the following patch (from Alan Stebbens) to your rc.request file (don't forget to remove the hard link before). After applying the patch you can use several maintainer addresses in rc.custom separated by a comma (don't include blanks between the addresses).

--- installed/rc.request        Thu Oct 31 00:02:23 1996
+++ rc.request  Fri Oct 18 09:11:58 1996
@@ -291,20 +264,20 @@
#

# is there more than one maintainer? -maintainer_re=$maintainer -maintainers=$maintainer +maintainer_re="$maintainer" +maintainers="$maintainer" Maintainer=Maintainer

:0 * maintainer ?? , -{ maintainer_re=`echo "$maintainer" | sed -e 's/,/|/g' -e 's/\./\\\./g'` - maintainers=`echo "$maintainer" | sed -e 's/,/ /g'` +{ maintainer_re="`echo $maintainer | sed -e 's/,/|/g' -e 's/\./\\\./g'`" + maintainers="`echo $maintainer | sed -e 's/,/ /g'`" Maintainer=Maintainers }

:0 wf:dist.lock -* $^$X_COMMAND:.*$maintainer_re[ ]+$X_COMMAND_PASSWORD

If you have access to your aliases file, another approach is to set the maintainer in rc.request to a "role address" defined in the aliases file to expand to all maintainers, for example "mylist-owner". Maintainers would then use the "mylist-owner" address to issue list commands, and any email generated for the maintainer will be delivered to all maintainers defined in the aliases file.


7.2: Can I remotely update files used by SmartList like help.txt?

There is an addon to SmartList which enables you to do this via email or a web interface. You should only use this package called rconfig if you know how SmartList works. Otherwise you could completely destroy a list. rconfig is available at

ftp://www.pure.ch/pub/smartlist/


7.3: How can a subscriber temporarily suspend subscription?

There is an addon to SmartList which enables subscribers to suspend their subscription for a given number of days. It's called suspend and is available at ftp://www.pure.ch/pub/smartlist/


7.4: Where can I find more SmartList information and utilities?

SmartList Utilities and Patches - send email to alan.stebbens@software.com with the subject

"send smartlist library".


8: Miscellaneous


8.1: How can I make my list moderated?

See chapter 3f in the SmartList manual.

There is also this package:

http://www.mjolner.com/~lbr/moderate/


8.2: How can I change the messages that smartlist sends to people?

The messages that smartlist sends out are in the ~slist/listname directory, and can be edited using any available file editor. The files that it sends and their uses are:


8.3: How can I add "[listname]" to all of the mailing list messages for easy filtering?

In your rc.custom file, uncomment the line that reads "RC_LOCAL_SUBMIT_10 = rc.local.s10", and make a file called "rc.local.s10" in your list directory, in that file put this:

SUBJ=`formail -zx Subject:`   # extract the subject
:0fw
* !  Subject:.*\[listname\]
* !  Subject:.Re: *
| formail -I "Subject: [listname] $SUBJ"
Be sure to replace "[listname]" with what you would like to be at the beginning of the subject line. (Posted to SmartList@Informatik.RWTH-Aachen.DE by Leigh Wolenczak ).

Another approach, courtesy of Tim Pierce:

:0f
* !digest_flag ?? y
* $!^Subject:.*\\[listname\\].*
* ^Subject:\/.*
| formail -I "Subject: [listname]$MATCH"

8.4: How can I add a custom header to 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 some custom headers (although it will work, this is not
# needed for Reply-To related headers, see the reply_to variable in
# rc.custom):
#

:0 fhw | formail -i "X-Subliminal-Message: SmartList is great" \ -I "X-Mailer: procmail, which is great too :-)"


8.5: How can I remove some headers from 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 if you want :

# # To get rid of some headers: #

:0 fhw | formail -I X-Mailing-List: -I X-Mailer:

# # To get rid of all X- fields: #

:0 fhw | formail -I X-


8.6: 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


8.7: How can I keep people from sending HTML/attachments/other junk to the list?

Several good recipes for this have been posted to the smartlist mailing list.


8.8: How do I make replies go to the list instead of to the sender?

The "Reply-To:" header element is designed to allow you to do this, and the reply_to variable within your rc.custom file gives you the ability to control this header element in list processed email.

There are several approaches. Arguably the simplest is, in the rc.custom file, uncomment the line:

reply_to = $listaddr

and set it to something like this:

reply_to = "Reply-To: $listaddr"

Paul Thomas notes that:

"The 'Reply-To: ' rule in rc.custom is overwritten if a post to the list already contains a 'Reply-To: ' with a different address. Putting somthing like:
        :0 fhw
        | formail -I "Reply-To: test@somedomain.com"
in rc.local.s20 might be better."

8.9: How can I make replies go to the original sender?

If you run "announcement" style lists, where you want to discourage list discussion by having replies go to the original author, then in the rc.custom file, uncomment the line:

reply_to = $listaddr

and set it to something like this:

reply_to = "Reply-To: `formail -xFrom:`"

Note that the formail -xFrom: command is enclosed in backticks (`), which cause procmail to run the formail command in a subshell and return that command's results.


8.10: How can I include the number of subscribers in the footer I'm attaching to each list mail?

The idea is to keep the footer text in a file called footer.template. In that file you embed $COUNT wherever you want the list population inserted. Then you cause your subscription and unsubscription processing to count the list members, and interpolate footer.template to produce a footer.txt file.

Perhaps your footer.template file might look like this:

---
To unsubscribe, blah blah blah.
This list has $COUNT subscribers.

For this to work, you need to uncomment

RC_LOCAL_REQUEST_20  = rc.local.r20
from either your rc.init or your rc.custom. You also need to have cc_unsubrequests and cc_requests set to yes. Then, add this recipe to the end of normal sub/unsub processing; rc.local.r20:
# Count list members, and update footer.txt using footer.template.
:0
* ^X-Diagnostic: (Processed|Added to the subscriber list)
{
    COUNT=`grep -cv '^(' dist`
    :0cWi
    | sed 's/\$COUNT/'"$COUNT"/g footer.template >footer.txt
}

8.11: Can I issue X-Commands from the message body?

Yes. There is a recipe you can find in .examples/rc.local.r00 which has the effect of causing SmartList to look in the beginning of the message body as well as within the message header for commands. This trick is helpful if you have a MUA which makes it difficult or impossible to send custom headers.