From 37e3759b855f6e816663aa1e7673052532d15393 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 25 Oct 2002 12:33:11 +0000 Subject: [PATCH] deblist-action: New script to subscribe to or unsubscribe from Debian mailing lists. --- deblist-action | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 deblist-action diff --git a/deblist-action b/deblist-action new file mode 100755 index 0000000..a07ca36 --- /dev/null +++ b/deblist-action @@ -0,0 +1,28 @@ +#! /bin/sh +set -e + +if ([ "$1" != subscribe ] && [ "$1" != unsubscribe ]) || \ + [ -z "$2" ] || [ -z "$3" ]; then + echo "Usage: $0 subscribe|unsubscribe list address" 2>&1 + exit 1 +fi + +ACTION="$1" +LIST="${2%%@*}" +ADDRESS="$3" + +DRAFT=`tempfile` +trap 'rm -f "$DRAFT"' EXIT ERR HUP INT QUIT TERM + +cat >"$DRAFT" < +To: $LIST-request@lists.debian.org +Subject: $ACTION $ADDRESS +Fcc: =debian/lists + +$ACTION $ADDRESS +EOF + +mutt -H "$DRAFT" + +exit 0 -- 2.30.2