From 1f29b33d3f71b8a40f5ae76bf20b95618b518654 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 18 May 2016 01:23:05 +0000 Subject: unsubscribe: get off mah lawn^H^H^Hist While public-inbox is intended primarily for archival, SMTP list subscriptions are still in use in most places and users are likely to want a good unsubscribe mechanism. HTTP (or HTTPS) links in the List-Unsubscribe header are often preferable since some users may use an incorrect email address for mailto: links. Thus, it is useful to provide an example which generates an HTTPS link for users to click on. The default .psgi requires a POST confirmation (as destructive actions with GET are considered bad practice). However, the "confirm" parameter may be disabled for a true "one-click" unsubscribe. The generated URLs are hopefully short enough and both shell and highlighting-friendly to reduce copy+paste errors. --- examples/unsubscribe-psgi@.service | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/unsubscribe-psgi@.service (limited to 'examples/unsubscribe-psgi@.service') diff --git a/examples/unsubscribe-psgi@.service b/examples/unsubscribe-psgi@.service new file mode 100644 index 00000000..f588886b --- /dev/null +++ b/examples/unsubscribe-psgi@.service @@ -0,0 +1,20 @@ +# ==> /etc/systemd/system/unsubscribe-psgi@.service <== +# The '@' is to allow multiple simultaneous services to start +# and share the same socket so new code can be cycled in +# without downtime + +[Unit] +Description = unsubscribe PSGI %i +Wants = unsubscribe-psgi.socket +After = unsubscribe-psgi.socket + +[Service] +# any PSGI server ought to work, +# but public-inbox-httpd supports socket activation like unsubscribe.milter +ExecStart = /usr/local/bin/public-inbox-httpd /etc/unsubscribe.psgi +Sockets = unsubscribe-psgi.socket +# we need to modify the mlmmj spool +User = mlmmj + +[Install] +WantedBy = multi-user.target -- cgit v1.2.3-24-ge0c7