From feaa407a2a01678ded5ec13faacae5f62739202b Mon Sep 17 00:00:00 2001
From: Matt Taggart <taggart@riseup.net>
Date: Mon, 13 Nov 2017 12:27:05 -0800
Subject: [PATCH] add unsubscribe script

---
 tools/unsubscribe | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100755 tools/unsubscribe

diff --git a/tools/unsubscribe b/tools/unsubscribe
new file mode 100755
index 0000000..5368eb3
--- /dev/null
+++ b/tools/unsubscribe
@@ -0,0 +1,9 @@
+#!/bin/bash
+# unsubscribe - removes an address from a list
+# NOTE: this script requires the current user has read access to the db
+
+echo "removing $1 from $2:"
+
+# remove all list subscriptions
+mysql --batch --database=sympa --execute "delete from subscriber_table where use
+r_subscriber='${1}' AND list_subscriber='${2}'"
-- 
GitLab