aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-12-05 16:34:58 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-12-05 16:34:58 -0500
commitd2833a3cc487a3ee17ccfe995fd16a5f9fd587e9 (patch)
treec9cdb63b76eae10f63cd8b5abe792ae150422b4f
parent2e8ae7e0b8f5a0e034d049ead63a60a3572e81b0 (diff)
downloadlistadmin-d2833a3cc487a3ee17ccfe995fd16a5f9fd587e9.tar.bz2
listadmin-d2833a3cc487a3ee17ccfe995fd16a5f9fd587e9.tar.xz
listadmin-d2833a3cc487a3ee17ccfe995fd16a5f9fd587e9.tar.zst
Import Upstream version 2.24upstream/2.24
-rw-r--r--Makefile42
-rw-r--r--listadmin.man (renamed from listadmin.1)14
-rwxr-xr-x[-rw-r--r--]listadmin.pl (renamed from listadmin)23
-rw-r--r--listadmin.txt251
4 files changed, 316 insertions, 14 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bc59854
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,42 @@
+SHELL = /bin/sh
+INSTALL = install -c
+
+VERSION = 2.24
+
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/share/man
+
+SRCFILES = Makefile listadmin.pl listadmin.man
+
+all:
+ @echo Nothing needs to be done
+
+install:
+ $(INSTALL) listadmin.pl $(bindir)/listadmin
+ $(INSTALL) -m 644 listadmin.man $(mandir)/man1/listadmin.1
+
+listadmin.txt: listadmin.man
+# Note the verbatim backspace in the sed command
+ env TERM=dumb nroff -man $< | sed 's/.//g' | uniq > $@.tmp
+ mv $@.tmp $@
+
+TARFILE = listadmin-$(VERSION).tar.gz
+$(TARFILE): $(SRCFILES) listadmin.txt
+ @rm -rf listadmin-$(VERSION)
+ mkdir listadmin-$(VERSION)
+ cp $(SRCFILES) listadmin.txt listadmin-$(VERSION)/
+ tar cf - listadmin-$(VERSION) | gzip -9 > $(TARFILE)
+ rm -rf listadmin-$(VERSION)
+
+dist: $(TARFILE)
+
+distclean:
+ rm -rf $(TARFILE) listadmin.txt listadmin-$(VERSION)
+
+# for my use only
+WWW_DOCS = /hom/kjetilho/www_docs/hacks
+publish: dist
+ cp listadmin.txt $(WWW_DOCS)/listadmin.txt
+ cp $(TARFILE) $(WWW_DOCS)/
+ perl -pi -e 's/listadmin-\d+\.\d+/listadmin-'$(VERSION)'/g' $(WWW_DOCS)/index.html
diff --git a/listadmin.1 b/listadmin.man
index 21eb788..8d29623 100644
--- a/listadmin.1
+++ b/listadmin.man
@@ -1,11 +1,13 @@
-.TH LISTADMIN 1 "20 Feb 2004"
+.TH LISTADMIN 1 "24 Feb 2005"
.\" turn off hyphenation
.hy 0
+.\" turn on ragged right if run through nroff
+.if n .na
.SH NAME
listadmin \- process messages held by Mailman for approval
.SH SYNOPSIS
-.B "listadmin [-f \fIconfigfile\fP] [-f \fIminutes\fP] [\fIlistname\fP]"
+.B "listadmin [-f \fIconfigfile\fP] [-t \fIminutes\fP] [\fIlistname\fP]"
.SH DESCRIPTION
.I listadmin
@@ -161,7 +163,7 @@ An example configuration file:
default approve
discard_if_reason "Message has implicit|Too many recipients"
- discard_if_from ^(postmaster|mailer(-daemon)?|listproc|no-reply)@
+ discard_if_from ^(postmaster|mailer(-daemon)?|listproc|no-reply)@
foo-devel@example.net
@@ -173,7 +175,6 @@ An example configuration file:
.fi
.SH FILES
-.IP
\fB$HOME/.listadmin.ini\fP
.PP
The default configuration file.
@@ -191,8 +192,11 @@ in ideas on how to best make this configurable.
.PP
The HTML parser is quite fragile and depends on Mailman not to change
the format of its generated code.
+.PP
+Mailman 2.1 is not supported.
+.PP
+ISO 8859-1 environment is assumed.
.SH AUTHOR
Kjetil T. Homme <kjetilho+listadmin@ifi.uio.no>
.br
-Send bug reports or feature requests to postmaster@uio.no
diff --git a/listadmin b/listadmin.pl
index 585cd1b..ade12ae 100644..100755
--- a/listadmin
+++ b/listadmin.pl
@@ -1,6 +1,6 @@
#! /usr/bin/perl -w
#
-# listadmin version 2.23
+# listadmin version 2.24
# Written 2003 - 2005 by
# Kjetil Torgrim Homme <kjetilho+listadmin@ifi.uio.no>
# Released into public domain.
@@ -149,9 +149,12 @@ sub process_subscriptions {
$ans =~ s/\s+//g;
$ans = $def if $ans eq "";
$ans = lc ($ans);
- last subscr_loop if $ans eq "q";
- next subscr_loop if $ans eq "s";
- if ($ans eq "a") {
+ if ($ans eq "q") {
+ last subscr_loop;
+ } elsif ($ans eq "s") {
+ delete $change->{$id};
+ next subscr_loop;
+ } elsif ($ans eq "a") {
$change->{$id} = [ "sa" ];
last;
} elsif ($ans eq "r") {
@@ -238,13 +241,15 @@ sub approve_messages {
$ans =~ s/\s+//g;
$ans = $def if $ans eq "" && defined $def;
$ans = lc $ans;
- last msgloop if $ans eq "q";
- next msgloop if $ans eq "s";
- if ($ans =~ /^\d+$/ && $ans > 0 && $ans <= $count) {
+ if ($ans eq "q") {
+ last msgloop;
+ } elsif ($ans eq "s") {
+ delete $change->{$id};
+ next msgloop;
+ } elsif ($ans =~ /^\d+$/ && $ans > 0 && $ans <= $count) {
$num = $ans - 1;
next msgloop;
- }
- if ($ans eq "a" || $ans eq "d") {
+ } elsif ($ans eq "a" || $ans eq "d") {
$change->{$id} = [ $ans ];
last;
} elsif ($ans eq "r") {
diff --git a/listadmin.txt b/listadmin.txt
new file mode 100644
index 0000000..56d9108
--- /dev/null
+++ b/listadmin.txt
@@ -0,0 +1,251 @@
+
+User Commands LISTADMIN(1)
+
+NAME
+ listadmin - process messages held by Mailman for approval
+
+SYNOPSIS
+ listadmin [-f configfile] [-t minutes] [listname]
+
+DESCRIPTION
+ listadmin is a textual alternative to Mailman's WWW
+ interface for administering mailing lists.
+
+OPTIONS
+ -f configfile
+ Fetch list of mailing lists from configfile rather than
+ the default (~/.listadmin.ini).
+
+ -t minutes
+ Stop processing after minutes has passed. Mostly
+ useful for completely automated configurations of
+ listadmin.
+
+ listname
+ Only process the lists matching listname. Specify a
+ complete address, a substring or a regular expression.
+
+CONFIGURATION SYNTAX
+ The configuration file contains lines which can contain
+ either a comment, a directive, or a mailing list address.
+
+ A line can be continued by putting a backslash character at
+ the end of the line. Any leading whitespace on the
+ following line is removed.
+
+ Comments begin with the character # and extend to the end of
+ line. Backslash continuation is not applied to comments.
+
+ The argument to the directive can be put in double quotes to
+ protect space characters. Inside double quotes, \" can be
+ used to include a literal double quote, and \\ for a literal
+ backslash.
+
+DIRECTIVES
+ A directive affects all the mailing lists addresses which
+ follow after it in the configuration file. The directives
+ are:
+
+ username username
+ Specifies the username to use for authentication.
+
+SunOS 5.8 Last change: 24 Feb 2005 1
+
+User Commands LISTADMIN(1)
+
+ password password
+ Specifies the password to use for authentication.
+
+ adminurl url
+ The URL for maintaining Mailman requests. Some
+ substitutions are performed: (examples below refer
+ to the hypothetical list foo-devel@example.net)
+
+ {list}
+ The local part of the list name, e.g., "foo-
+ devel".
+
+ {domain}
+ The domain part of the list name, e.g.,
+ "example.net".
+
+ {subdomain}
+ The first component of the domain part, e.g.,
+ "example".
+
+ default action
+ Specifies the action to take when the user presses
+ just Return. Available actions are:
+
+ approve
+ The message will be sent to all member of the
+ list.
+
+ reject
+ Notify sender that the message was rejected.
+
+ discard
+ Throw message away, don't notify sender.
+
+ skip Don't decide now, leave it for later.
+
+ none Reset to no default action.
+
+ action action
+ This action will be taken for all messages where
+ none of the other rules apply (e.g., spamlevel,
+ discard_if_from etc.), ie., whenever the user
+ would have been asked what to do. The same
+ actions as for default are available, although
+ reject isn't very useful.
+
+ spamlevel number
+ This specifies the threshold for automatic discard
+ of suspected spam messages. 12 is unlikely to
+ have false positives. No user confirmation is
+ needed, so it is best to play it safe. Less than
+ 5 is not recommended.
+
+SunOS 5.8 Last change: 24 Feb 2005 2
+
+User Commands LISTADMIN(1)
+
+ not_spam_if_from pattern
+ If the message's From header matches the pattern,
+ all automatic actions will be cancelled and you
+ will be asked what action to take explicitly. The
+ pattern can use Perl regexp syntax. If enclosed
+ in slashes, some modifiers can be added, a typical
+ example being /pattern/i to match case-
+ insensitively.
+
+ not_spam_if_subject pattern
+ As above, but matches against the Subject header.
+
+ discard_if_from pattern
+ If the message's From header matches the pattern,
+ it will be discarded automatically.
+
+ discard_if_subject pattern
+ As above, but matches against the Subject header.
+
+ discard_if_reason pattern
+ As above, but matches against Mailman's reason for
+ holding the message for approval.
+
+ subscription_default action
+ Specifies the action to take when the user presses
+ just Return while processing subscriptions.
+ Available actions are:
+
+ accept
+ The new subscriber will be added.
+
+ reject
+ Notify sender that s/he was not allowed to
+ join the list.
+
+ skip Don't decide now, leave it for later.
+
+ none Reset to no default action.
+
+ subscription_action action
+ This action will be taken always for all new
+ subscribers in the relevant lists, no user
+ interaction will take place. The same actions as
+ for subscription_default are available, although
+ only skip is very useful. It is better to get
+ automatic accept and reject behaviour by changing
+ the Mailman configuration.
+
+ confirm yes|no
+ Before submitting changes, ask for confirmation.
+ Default is "yes".
+
+SunOS 5.8 Last change: 24 Feb 2005 3
+
+User Commands LISTADMIN(1)
+
+ log filename
+ Changes submitted to the web interface are logged.
+ All the changes for one list are sent in batches
+ at the end of processing. The format in the log
+ is first a line containing the list name and a
+ time stamp in local time. Then one line for each
+ message, in the format
+
+ action D:[date] F:[sender] S:[subject]
+
+ This batch of lines are terminated by a line
+ saying changes sent to server.
+
+ The filename none turns off logging.
+
+EXAMPLE
+ An example configuration file:
+ # A comment, it must appear on a line by itself.
+ #
+ # Settings affect all lists being listed after it.
+
+ username jdoe
+ password Geheim
+ default discard
+ # This one works for Sourceforge:
+ adminurl http://{domain}/lists/admindb/{list}
+
+ slartibartfast@lists.sourceforge.net
+
+ # This is how the default Mailman URLs look:
+ adminurl http://{domain}/mailman/admindb/{list}
+
+ # If the password contains quotes or spaces, you may need
+ # to put it in quotes. A complex example:
+ password "\"lise\\ "
+
+ # These lists will still use the username [jdoe], but the
+ # password is now ["lise\ ].
+
+ default approve
+ discard_if_reason "Message has implicit|Too many recipients"
+ discard_if_from ^(postmaster|mailer(-daemon)?|listproc|no-reply)@
+
+ foo-devel@example.net
+
+ # No one should ever send e-mail to the next list, so throw it
+ # all away, without asking any questions
+ action discard
+ confirm no
+ foo-announce@example.net
+
+SunOS 5.8 Last change: 24 Feb 2005 4
+
+User Commands LISTADMIN(1)
+
+FILES
+ $HOME/.listadmin.ini
+
+ The default configuration file.
+
+BUGS
+ The default behaviour with no adminurl specified in the
+ configuration file is only useful at the University of Oslo.
+
+ The SpamAssassin score is fetched from the header X-Spam-
+ Level, the value is the number of asterisks following. It
+ will also check a header specific to the University of Oslo.
+ If this does not match your setup, you will need to change
+ the Perl code. I'd be interested in ideas on how to best
+ make this configurable.
+
+ The HTML parser is quite fragile and depends on Mailman not
+ to change the format of its generated code.
+
+ Mailman 2.1 is not supported.
+
+ ISO 8859-1 environment is assumed.
+
+AUTHOR
+ Kjetil T. Homme <kjetilho+listadmin@ifi.uio.no>
+
+SunOS 5.8 Last change: 24 Feb 2005 5
+