aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-12-05 16:42:46 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-12-05 16:42:46 -0500
commit825769cafdcdd410981855dc74f41d75d7a064d9 (patch)
tree21beba08645a1aad04300361bdf35d0e150a8f22
parent58e1143b03f6ad2184b2a33c8f63fd8272d764f4 (diff)
downloadlistadmin-825769cafdcdd410981855dc74f41d75d7a064d9.tar.bz2
listadmin-825769cafdcdd410981855dc74f41d75d7a064d9.tar.xz
listadmin-825769cafdcdd410981855dc74f41d75d7a064d9.tar.zst
New upstream version 2.71upstream/2.71upstream
-rw-r--r--ChangeLog37
-rw-r--r--INSTALL16
-rw-r--r--Makefile14
-rw-r--r--changelog.txt11
-rw-r--r--listadmin.118
-rwxr-xr-xlistadmin.pl59
-rw-r--r--listadmin.txt531
-rw-r--r--sample-session.txt106
8 files changed, 510 insertions, 282 deletions
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..a10908a
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,37 @@
+2.71 2018-11-07 Johnny A. Solbu <johnny@solbu.net>
+
+ * Patch from C. Michael Pilato
+ - Replace line break characters in Subject header values
+ with a single space character. (Bug #2)
+
+2.70 2018-08-08 Johnny A. Solbu <johnny@solbu.net>
+
+ * Patch from Jörg Sommer
+ - Add support for XDG Base Directory Specification.
+ If ~/.listadmin.ini doesnt exist, look for ~/.config/listadmin.ini
+ (Bug #1)
+
+2.60 2018-06-25 Johnny A. Solbu <johnny@solbu.net>
+
+ * Patch from C. Michael Pilato
+ - Add --dry-run and --discard-all modes
+
+2.50 2018-04-11 Johnny A. Solbu <johnny@solbu.net>
+
+ * Add whitelist option.
+ Adding approve_if_from in the config file
+ now let you automatically approve senders.
+
+2.42 2016-12-23 Johnny A. Solbu <johnny@solbu.net>
+
+ * Fix Parsing of undecoded UTF-8 error.
+ * Add IPv6 support (Debian bug #699768).
+ * Use proper filename for manpage (listadmin.man > listadmin.1).
+
+2.41 2016-12-22 Johnny A. Solbu <johnny@solbu.net>
+
+ * Applied Debian pathces
+ - Add support for discarding subscription requests.
+ - Add translations.
+ - Add option to disable certificate checking (Debian bug #707787).
+ - Add option to configure which CA certificate file to use.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..2547e9d
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,16 @@
+In order to install listadmin, you need these perl modules:
+
+HTML::TokeParser
+LWP::UserAgent
+MIME::Base64
+MIME::QuotedPrint
+Data::Dumper
+Term::ReadLine
+Getopt::Long
+Text::Reform
+I18N::Langinfo
+Encode
+strict
+English
+IO::Socket::SSL
+Net::INET6Glue::INET_is_INET6
diff --git a/Makefile b/Makefile
index 45a2eac..732a40b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,14 +2,14 @@ SHELL = /bin/sh
# a BSD or GNU style install is required, e.g., /usr/ucb/install on Solaris
INSTALL = install
-VERSION = 2.42
+VERSION = $(shell perl listadmin.pl --version|cut -f3 -d ' ')
PREFIX = /usr/local
prefix = $(PREFIX)
bindir = $(prefix)/bin
mandir = $(prefix)/share/man
-SRCFILES = Makefile listadmin.pl listadmin.1 changelog.txt
+SRCFILES = Makefile listadmin.pl listadmin.1 ChangeLog sample-session.txt INSTALL
all:
@echo Nothing needs to be done
@@ -20,16 +20,14 @@ install:
$(INSTALL) -m 644 listadmin.1 $(DESTDIR)$(mandir)/man1/listadmin.1
listadmin.txt: listadmin.1
-# Note the verbatim backspace in the sed command
- env TERM=dumb nroff -man $< | sed -e '/^XXX/d' -e 's/.//g' | uniq > $@.tmp
- mv $@.tmp $@
+ man ./$< | col -b > $@
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)
+ tar acf $(TARFILE) listadmin-$(VERSION)
rm -rf listadmin-$(VERSION)
dist: $(TARFILE)
@@ -39,4 +37,6 @@ distclean:
# for my use only
upload:
- rsync -avh --progress $(TARFILE) solbu@frs.sourceforge.net:/home/frs/project/listadmin/$(VERSION)/ \ No newline at end of file
+ rsync -avh --progress $(TARFILE) solbu@frs.sourceforge.net:/home/frs/project/listadmin/$(VERSION)/
+
+.PHONY: listadmin.txt
diff --git a/changelog.txt b/changelog.txt
deleted file mode 100644
index 538c473..0000000
--- a/changelog.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-2.42
-- Fix Parsing of undecoded UTF-8 error
-- Add IPv6 support (Debian bug #699768)
-- Use proper filename for manpage (listadmin.man > listadmin.1)
-
-2.41
-Applied Debian pathces
-- Add support for discarding subscription requests
-- Add translations
-- Add option to disable certificate checking (Debian bug #707787)
-- Add option to configure which CA certificate file to use
diff --git a/listadmin.1 b/listadmin.1
index 9c8672b..15bcaa8 100644
--- a/listadmin.1
+++ b/listadmin.1
@@ -1,4 +1,4 @@
-.TH LISTADMIN 1 "2016-12-21"
+.TH LISTADMIN 1 "2018-08-08"
.\" turn off hyphenation
.hy 0
.\" turn on ragged right if run through nroff
@@ -16,7 +16,7 @@ mailing lists.
.SH OPTIONS
.IP "-f \fIconfigfile\fP"
Fetch list of mailing lists from \fIconfigfile\fP rather than the
-default (\fB~/.listadmin.ini\fP).
+default (\fB~/.listadmin.ini\fP or \fB~/.config/listadmin.ini\fP).
.IP "-t \fIminutes\fP"
Stop processing after \fIminutes\fP has passed. Mostly useful for
completely automated configurations of \fBlistadmin\fP.
@@ -24,6 +24,10 @@ completely automated configurations of \fBlistadmin\fP.
Addresses added as subscribers will have \fInomail\fP turned off.
.IP "--nomail"
Addresses added as subscribers will have \fInomail\fP turned on.
+.IP "--dry-run"
+Acts as if the user responded with (S)kip to message handling queries.
+.IP "--discard-all"
+Acts as if the user responded with (D)iscard. Dry-run takes precedence.
.IP "-a \fIfile\fP"
Add e-mail addresses listed in \fIfile\fP (one address per line) to
the subscriber list. The welcome message is suppressed.
@@ -127,6 +131,9 @@ As above, but matches against the Subject header.
.IP "discard_if_reason \fIpattern\fP"
As above, but matches against Mailman's reason for holding the message
for approval.
+.IP "approve_if_from \fIpattern\fP"
+If the message's From header matches the pattern, it will be approved
+automatically.
.IP "subscription_default \fIaction\fP"
Specifies the action to take when the user presses just Return while
processing subscriptions. Available actions are:
@@ -281,6 +288,9 @@ An example configuration file:
discard_if_reason "Message has implicit|Too many recipients"
discard_if_from ^(postmaster|mailer(-daemon)?|listproc|no-reply)@
+ # These senders are automatically approved
+ approve_if_from "good-sender@example.com|another-one@example.net"
+
foo-devel@example.net
# No one should ever send e-mail to the next list, so throw it
@@ -300,6 +310,8 @@ The character set support is deduced from this variable.
.SH FILES
\fB$HOME/.listadmin.ini\fP
+.br
+\fB$HOME/.config/listadmin.ini\fP
.PP
The default configuration file.
@@ -312,6 +324,6 @@ double width characters (e.g. Chinese). This is probably a bug in
Text::Reform.
.SH AUTHOR
Kjetil T. Homme <kjetilho+listadmin@ifi.uio.no>
-
+.br
Project manager: Johnny A. Solbu <johnny@solbu.net>
.br
diff --git a/listadmin.pl b/listadmin.pl
index 36514c4..c16c782 100755
--- a/listadmin.pl
+++ b/listadmin.pl
@@ -4,14 +4,14 @@
# Written 2003 - 2007 by
# Kjetil Torgrim Homme <kjetilho+listadmin@ifi.uio.no>
#
-# 2016: Johnny A. Solbu <johnny@solbu.net>
+# 2016 - 2018: Johnny A. Solbu <johnny@solbu.net>
#
# Thank you, Sam Watkins and Bernie Hoeneisen, for contributions and
# feedback.
#
# Released into public domain.
-my $version = "2.42";
+my $version = "2.71";
my $maintainer = "johnny\@solbu.net";
use HTML::TokeParser;
@@ -31,6 +31,13 @@ use IO::Socket::SSL;
use Net::INET6Glue::INET_is_INET6;
my $rc = $ENV{"HOME"}."/.listadmin.ini";
+unless (-r $rc) {
+ eval(q{
+ use File::BaseDir;
+ $rc = (File::BaseDir::config_files 'listadmin.ini')[0]
+ || (File::BaseDir::config_home 'listadmin.ini')[0];
+ });
+}
sub usage {
my ($exit_val) = @_;
@@ -49,6 +56,8 @@ Usage: $0 [-f CONFIGFILE] [-t MINUTES] [{-a|-r} FILE] [-l] [LISTNAME]
--remove-member ADDRESS
Remove ADDRESS from member list
-l List subscribers
+ --dry-run Automatically (S)kip all held messages
+ --discard-all Automatically (D)iscard all held messages
LISTNAME Only process lists with name matching LISTNAME.
If options which modify members are used, LISTNAME must match exactly
@@ -58,7 +67,8 @@ _end_
}
my ($opt_help, $opt_version, $opt_f, $opt_t, $opt_a, $opt_r,
- @opt_add_member, @opt_remove_member, $opt_l);
+ @opt_add_member, @opt_remove_member, $opt_l, $opt_dryrun,
+ $opt_discardall);
my $opt_mail = 1;
GetOptions("help|?" => \$opt_help,
@@ -70,6 +80,8 @@ GetOptions("help|?" => \$opt_help,
"r=s" => \$opt_r,
"add-member=s" => \@opt_add_member,
"remove-member=s" => \@opt_remove_member,
+ "dry-run!" => \$opt_dryrun,
+ "discard-all!" => \$opt_discardall,
"l" => \$opt_l)
or usage();
@@ -341,6 +353,7 @@ sub approve_messages {
my $dis_from = $config->{"discard_if_from"};
my $dis_subj = $config->{"discard_if_subject"};
my $dis_reas = $config->{"discard_if_reason"};
+ my $apr_from = $config->{"approve_if_from"};
$count = keys (%{$info}) - 1; # subtract 1 for globals
my $search_pattern = "";
@@ -410,18 +423,38 @@ _end_
}
$ans = "d";
}
+ # Whitelist senders
+ my $match2 = "";
+ $ans ||= $config->{"action"};
+ $match2 = "From_allow" if got_match ($from, $apr_from);
+ $ans ||= "a" if $match2;
+ if ($ans && $match2) {
+ if ($match2 eq "From_allow") {
+ print "Automatically appoved due to matching $match2\n";
+ }
+ $ans = "a";
+ }
my $def = $listdef;
$def = $change->{$id}->[0]
if defined $change->{$id};
my $pr = $prompt;
$pr .= " [" . uc($def) . "]" if $def;
$pr .= " ? ";
- $ans ||= prompt ($pr);
- $ans = "q" unless defined $ans;
- $ans =~ s/^\s+//;
- $ans =~ s/\s+$//;
- $ans = $def if $ans eq "" && defined $def;
- $ans = lc $ans;
+ if ($opt_dryrun) {
+ # In dry-run mode, we (S)kip everything.
+ $ans = "s";
+ } elsif ($opt_discardall) {
+ # In discard-all mode, we (D)iscard everything.
+ $ans = "d";
+ } else {
+ # Otherwise, we prompt the user for action.
+ $ans ||= prompt ($pr);
+ $ans = "q" unless defined $ans;
+ $ans =~ s/^\s+//;
+ $ans =~ s/\s+$//;
+ $ans = $def if $ans eq "" && defined $def;
+ $ans = lc $ans;
+ }
if ($ans eq "q") {
last msgloop;
} elsif ($ans eq "s") {
@@ -1387,7 +1420,12 @@ sub parse_approval {
$subject .= " [unencoded]";
}
- $data->{$id}->{"subject"} = decode_rfc2047($subject, $config);
+ $subject = decode_rfc2047($subject, $config);
+
+ # Replace line breaks with a single space character.
+ $subject =~ s/[\n\r]/ /g;
+
+ $data->{$id}->{"subject"} = $subject;
$body .= "\n" unless $body =~ /\n$/;
$data->{$id}->{"body"} = $body;
@@ -1422,6 +1460,7 @@ sub read_config {
my %cur = map { $_ => undef; }
qw (not_spam_if_from
not_spam_if_subject
+ approve_if_from
discard_if_from
discard_if_subject
discard_if_reason);
diff --git a/listadmin.txt b/listadmin.txt
index 8d38e40..7412f1e 100644
--- a/listadmin.txt
+++ b/listadmin.txt
@@ -1,58 +1,68 @@
-LISTADMIN(1) General Commands Manual LISTADMIN(1)
+LISTADMIN(1) General Commands Manual LISTADMIN(1)
-NAME
+
+
+NAME
listadmin - process messages held by Mailman for approval
-SYNOPSIS
- listadmin [-?] [-V] [-f configfile] [-t minutes] [--mail] [--nomail]
- [{-a|-r} file] [--add-member address] [--remove-member address] [-l]
- [listname]
+SYNOPSIS
+ listadmin [-?] [-V] [-f configfile] [-t minutes] [--mail] [--nomail]
+ [{-a|-r} file] [--add-member address] [--remove-member address] [-l]
+ [listname]
-DESCRIPTION
- listadmin is a textual alternative to Mailman's WWW interface for
+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).
+OPTIONS
+ -f configfile
+ Fetch list of mailing lists from configfile rather than the
+ default (~/.listadmin.ini or ~/.config/listadmin.ini).
- -t minutes
- Stop processing after minutes has passed. Mostly useful for
- completely automated configurations of listadmin.
+ -t minutes
+ Stop processing after minutes has passed. Mostly useful for
+ completely automated configurations of listadmin.
- --mail Addresses added as subscribers will have nomail turned off.
+ --mail Addresses added as subscribers will have nomail turned off.
--nomail
- Addresses added as subscribers will have nomail turned on.
+ Addresses added as subscribers will have nomail turned on.
+
+ --dry-run
+ Acts as if the user responded with (S)kip to message handling
+ queries.
- -a file
- Add e-mail addresses listed in file (one address per line) to
- the subscriber list. The welcome message is suppressed.
+ --discard-all
+ Acts as if the user responded with (D)iscard. Dry-run takes
+ precedence.
- --add-member address
- Add address to the subscriber list, works as above.
+ -a file
+ Add e-mail addresses listed in file (one address per line) to
+ the subscriber list. The welcome message is suppressed.
- -r file
- Remove e-mail addresses listed in file (one address per line)
- from the subscriber list.
+ --add-member address
+ Add address to the subscriber list, works as above.
- --remove-member address
- Remove address from the subscriber list.
+ -r file
+ Remove e-mail addresses listed in file (one address per line)
+ from the subscriber list.
+
+ --remove-member address
+ Remove address from the subscriber list.
-l Display the subscriber list.
- listname
- Only process the lists matching listname. Specify a complete
- address, a substring or a regular expression.
+ listname
+ Only process the lists matching listname. Specify a complete
+ address, a substring or a regular expression.
-? or --help
- Display short usage description.
+ Display short usage description.
-V or --version
- Output version number.
+ Output version number.
-CONFIGURATION SYNTAX
+CONFIGURATION SYNTAX
The configuration file contains lines which can contain either a
comment, a directive, or a mailing list address.
@@ -66,283 +76,302 @@ LISTADMIN(1) General Commands Manual LISTADMIN(1)
space characters. Inside double quotes, \" can be used to include a
literal double quote, and \\ for a literal backslash.
-DIRECTIVES
+
+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. (Not
- all Mailman servers require a username.)
+ username username
+ Specifies the username to use for authentication. (Not
+ all Mailman servers require a username.)
+
+ 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.
+
+ spamheader header-name
+ The name of the header which contains the spam score. It
+ is assumed that the score is encoded as a sequence of
+ characters, like "*****" for the value 5. By default it
+ will look for all headers with names containing "spam"
+ and "score" or "level", and pick the highest score if
+ there is more than one. Setting the header-name to
+ default will restore this behaviour.
+
+ 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.
+
+ approve_if_from pattern
+ If the message's From header matches the pattern, it will
+ be approved automatically.
+
+ 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.
- password password
- Specifies the password to use for authentication.
+ skip Don't decide now, leave it for later.
- adminurl url
- The URL for maintaining Mailman requests. Some
- substitutions are performed: (examples below refer to the
- hypothetical list foo-devel@example.net)
+ none Reset to no default action.
- {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.
+ 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.
- 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.
-
- spamheader header-name
- The name of the header which contains the spam score. It
- is assumed that the score is encoded as a sequence of
- characters, like "*****" for the value 5. By default it
- will look for all headers with names containing "spam"
- and "score" or "level", and pick the highest score if
- there is more than one. Setting the header-name to
- default will restore this behaviour.
-
- 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".
-
- unprintable questionmark|unicode
- If the subject or sender address contains characters the
- terminal can't display, they will be replaced by either
- "<?>" (in questionmark mode, the default) or something
- like "<U+86a8>" (in unicode mode).
-
- 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 is terminated by a line saying
- changes sent to server.
-
- The same substitutions are performed on filename as on
- the argument to adminurl. Tilde syntax can be used to
- refer to home directories. The filename none turns off
- logging.
-
- meta_member_support yes|no
- Meta members are an experimental feature at the
- University of Oslo. This option is enabled by default
- for lists in uio.no, and is needed to avoid clearing the
- list of meta members when manipulating the list of
- ordinary members. Note: Requires additional Perl module
- WWW::Mechanize
-
- cafile /path/to/CAcertificate
- Specify which CA certificate to use for all lists
- following. Setting cafile to NONE will use the default
- cafile.
-
- verify_peer yes|no
- If set to no SSL certificate verification will be
- disabled for all lists following.
-
-INTERACTIVE USE
- The user interface to listadmin is line oriented with single letter
+ confirm yes|no
+ Before submitting changes, ask for confirmation. Default
+ is "yes".
+
+ unprintable questionmark|unicode
+ If the subject or sender address contains characters the
+ terminal can't display, they will be replaced by either
+ "<?>" (in questionmark mode, the default) or something
+ like "<U+86a8>" (in unicode mode).
+
+ 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 is terminated by a line saying
+ changes sent to server.
+
+ The same substitutions are performed on filename as on
+ the argument to adminurl. Tilde syntax can be used to
+ refer to home directories. The filename none turns off
+ logging.
+
+ meta_member_support yes|no
+ Meta members are an experimental feature at the
+ University of Oslo. This option is enabled by default
+ for lists in uio.no, and is needed to avoid clearing the
+ list of meta members when manipulating the list of
+ ordinary members. Note: Requires additional Perl module
+ WWW::Mechanize
+
+ cafile /path/to/CAcertificate
+ Specify which CA certificate to use for all lists
+ following. Setting cafile to NONE will use the default
+ cafile.
+
+ verify_peer yes|no
+ If set to no SSL certificate verification will be
+ disabled for all lists following.
+
+
+
+
+
+INTERACTIVE USE
+ The user interface to listadmin is line oriented with single letter
commands. By pressing Return, the default action is chosen. The
default action is printed in brackets in the prompt. The available
actions are:
- a Approve sending the message to all members of the list.
- r Reject the message and notify sender of the decision.
+ a Approve sending the message to all members of the list.
+
+ r Reject the message and notify sender of the decision.
- d Discard the message silently, don't notify sender.
+ d Discard the message silently, don't notify sender.
- s Skip the message, leave its status as pending unchanged.
+ s Skip the message, leave its status as pending unchanged.
- b View Body, display the first 20 lines of the message.
+ b View Body, display the first 20 lines of the message.
- f View Full, display the complete message, including
- headers.
+ f View Full, display the complete message, including
+ headers.
- t View Time, display the Date header from the message.
+ t View Time, display the Date header from the message.
- number Jump forward or backward to message number.
+ number Jump forward or backward to message number.
- u Go back to the previous message and undo the last
- approve, discard or reject action.
+ u Go back to the previous message and undo the last
+ approve, discard or reject action.
- /pattern
- Search (case-insensitively) for the next message with
- matching From or Subject. If pattern is left out, the
- previous value will be used.
+ /pattern
+ Search (case-insensitively) for the next message with
+ matching From or Subject. If pattern is left out, the
+ previous value will be used.
- ?pattern
- As above, but backwards.
+ ?pattern
+ As above, but backwards.
- . Redisplay information about current message.
+ . Redisplay information about current message.
- add Add address as subscriber to the list. If address is
- left out, use the sender of the current message.
+ add Add address as subscriber to the list. If address is
+ left out, use the sender of the current message.
- nomail As add, but adds address with "nomail" enabled.
+ nomail As add, but adds address with "nomail" enabled.
- list List subscriber addresses matching pattern, or the full
- list if no pattern is specified.
+ list List subscriber addresses matching pattern, or the full
+ list if no pattern is specified.
- rem Remove address from the subscriber list. Note: there is
- no undo for this action.
+ rem Remove address from the subscriber list. Note: there is
+ no undo for this action.
- q Quit processing this list and go on to the next.
+ q Quit processing this list and go on to the next.
Changes will not take effect until the end of the list has been
- reached. At that time, the user will be prompted whether the changes
+ reached. At that time, the user will be prompted whether the changes
should be submitted to Mailman (see also "confirm" directive above).
-EXAMPLES
+
+EXAMPLES
To process only the lists of a single domain, specify the domain as the
pattern:
- listadmin example.com
+ listadmin example.com
To disable the printing of characters outside US-ASCII, set the locale
appropriately:
- env LC_CTYPE=C listadmin
+ env LC_CTYPE=C listadmin
An example configuration file:
- # A comment, it must appear on a line by itself.
- #
- # Settings affect all lists being listed after it.
+ # A comment, it must appear on a line by itself.
+ #
+ # Settings affect all lists being listed after it.
+
+ username jdoe@example.com
+ password Geheim
+ default discard
+ # This one works for Sourceforge:
+ adminurl http://{domain}/lists/admindb/{list}
+
+ slartibartfast@lists.sourceforge.net
- username jdoe@example.com
- password Geheim
- default discard
- # This one works for Sourceforge:
- adminurl http://{domain}/lists/admindb/{list}
+ # This is how the default Mailman URLs look:
+ adminurl http://{domain}/mailman/admindb/{list}
- slartibartfast@lists.sourceforge.net
+ # If the password contains quotes or spaces, you may need
+ # to put it in quotes. A complex example:
+ password "\"lise\\ "
- # This is how the default Mailman URLs look:
- adminurl http://{domain}/mailman/admindb/{list}
+ # These lists will still use the username [jdoe], but the
+ # password is now ["lise\ ].
- # If the password contains quotes or spaces, you may need
- # to put it in quotes. A complex example:
- password "\"lise\\ "
+ default approve
+ discard_if_reason "Message has implicit|Too many recipients"
+ discard_if_from ^(postmaster|mailer(-daemon)?|listproc|no-reply)@
- # These lists will still use the username [jdoe], but the
- # password is now ["lise\ ].
+ # These senders are automatically approved
+ approve_if_from "good-sender@example.com|another-one@example.net"
- default approve
- discard_if_reason "Message has implicit|Too many recipients"
- discard_if_from ^(postmaster|mailer(-daemon)?|listproc|no-reply)@
+ foo-devel@example.net
- 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
- # 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
-ENVIRONMENT
- http_proxy or HTTP_PROXY
- Specifies a proxy to use for HTTP.
+ENVIRONMENT
+ http_proxy or HTTP_PROXY
+ Specifies a proxy to use for HTTP.
- https_proxy or HTTPS_PROXY
- Specifies a proxy to use for HTTPS.
+ https_proxy or HTTPS_PROXY
+ Specifies a proxy to use for HTTPS.
- LC_CTYPE
- The character set support is deduced from this variable.
+ LC_CTYPE
+ The character set support is deduced from this variable.
-FILES
- $HOME/.listadmin.ini
+
+FILES
+ $HOME/.listadmin.ini
+ $HOME/.config/listadmin.ini
The default configuration file.
-BUGS
+
+BUGS
The HTML parser is quite fragile and depends on Mailman not to change
the format of its generated code.
An extra blank line is sometimes added to the subject when it contains
- double width characters (e.g. Chinese). This is probably a bug in
+ double width characters (e.g. Chinese). This is probably a bug in
Text::Reform.
-AUTHOR
+AUTHOR
Kjetil T. Homme <kjetilho+listadmin@ifi.uio.no>
-
Project manager: Johnny A. Solbu <johnny@solbu.net>
- 2016-12-21 LISTADMIN(1)
+
+
+ 2018-08-08 LISTADMIN(1)
diff --git a/sample-session.txt b/sample-session.txt
new file mode 100644
index 0000000..e77dc44
--- /dev/null
+++ b/sample-session.txt
@@ -0,0 +1,106 @@
+ A sample listadmin session
+
+: [kjetilho@rovereto ~]; listadmin
+fetching data for i18n-no@lister.hidden.uio.no ...
+
+[1/8] ========== i18n-no@lister.hidden.uio.no ==========
+From: bubulle@example.org
+Subject: Shadow package templates update
+Reason: Too many recipients to the message Spam? 0
+Approve/Reject/Discard/Skip/view Body/view Full/jump #/Help/Quit [D] ? a
+
+ This looks legitimate, so I type «a» followed by Return.
+[2/8] ========== i18n-no@lister.hidden.uio.no ==========
+From: 243232@msn.com
+Subject: Operating Systems 243232
+Reason: Post by non-member to a members-only list Spam? 10
+Automatically discarded as spam.
+
+[3/8] ========== i18n-no@lister.hidden.uio.no ==========
+From: tsuruoka@quintanaroo.com
+Subject: Advert: i18n-no@lister.hidden.uio.no - Brand-models from $900.
+Reason: Post by non-member to a members-only list Spam? 6
+Automatically discarded as spam.
+
+[4/8] ========== i18n-no@lister.hidden.uio.no ==========
+From: bubulle@example.org
+Subject: Debian Installer : new string to translate
+Reason: Too many recipients to the message Spam? 0
+Approve/Reject/Discard/Skip/view Body/view Full/jump #/Help/Quit [D] ? a
+
+[5/8] ========== i18n-no@lister.hidden.uio.no ==========
+From: petter.reinholdtsen@hidden.uio.no
+Subject: Sjekk .po-filene fr de sendes videre
+Reason: Post by non-member to a members-only list Spam? 0
+Approve/Reject/Discard/Skip/view Body/view Full/jump #/Help/Quit [D] ? a
+
+ Messages 2 and 3 are discarded automatically due to the score given to
+ them by SpamAssassin, then I have to type a little to approve 4 and 5.
+[6/8] ========== i18n-no@lister.hidden.uio.no ==========
+From: rev_donald@doramail.com
+Subject: GLOBAL EMANCIPATION FOR WORLD PEACE!
+Reason: Post by non-member to a members-only list Spam? 8
+Automatically discarded as spam.
+
+[7/8] ========== i18n-no@lister.hidden.uio.no ==========
+From: rev_donald@doramail.com
+Subject: GLOBAL EMANCIPATION FOR WORLD PEACE!
+Reason: Post by non-member to a members-only list Spam? 0
+Approve/Reject/Discard/Skip/view Body/view Full/jump #/Help/Quit [D] ?
+
+ SpamAssassin strikes again, but misses on message 7. I have to press
+ Return to discard it.
+[8/8] ========== i18n-no@lister.hidden.uio.no ==========
+From: hidden@example.pl
+Subject: Re: Debian Installer : Yet another string change..:-)
+Reason: Post by non-member to a members-only list Spam? 0
+Approve/Reject/Discard/Skip/view Body/view Full/jump #/Help/Quit [D] ? b
+
+ This is an unknown contributor, so I ask to look at the first 20 lines
+ of the body of the message.
+--HcAYCG3uE/tztfnV
+Content-Type: text/plain; charset=iso-8859-2
+Content-Disposition: inline
+Content-Transfer-Encoding: quoted-printable
+
+On Sun, Apr 04, 2004 at 08:11:32AM +0200, Christian P wrote:
+> Have a nice week-end.
+
+I thought that someone told that we will use -i18n list for these
+purposes... am I right?
+
+I know that this is very important to reach as many translators as
+possible, but I don't want private mails!
+
+I have some SMS sending procmail scripts and daily limit for SMSes from
+net. So please do not send me private mails... I read l10n & i18n lists
+so I can check what's new there. I can also check it on seppy's webpage,
+so I really don't need any additional info.
+
+Approve/Reject/Discard/Skip/view Body/view Full/jump #/Help/Quit [D] ?
+
+ It's an off-topic rant, so I discard it.
+Submit changes? [yes]
+
+ Send off my choices to the web interface, then go on to the other lists
+ I admin:
+fetching data for iml@hidden.uio.no ... nothing in queue
+fetching data for dewy-fields@hidden.uio.no ... nothing in queue
+fetching data for is@hidden.uio.no ... nothing in queue
+fetching data for alle-ansatte@hidden.uio.no ... nothing in queue
+fetching data for blab-drift@hidden.uio.no ... nothing in queue
+fetching data for cim-bug@hidden.uio.no ...
+
+[1/1] ========== cim-bug@hidden.uio.no ==========
+From: kdxuyws@hotmail.com
+Subject: You can give your pa.rtn.er more p.lea.sur.e
+Reason: Message has implicit destination Spam? 8
+Automatically discarded as spam.
+Submit changes? [yes]
+
+fetching data for drift@hidden.uio.no ... nothing in queue
+fetching data for usenet@hidden.uio.no ... nothing in queue
+fetching data for timekeeper@hidden.uio.no ... nothing in queue
+: [kjetilho@rovereto ~];
+
+ All done!