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/README.unsubscribe | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 examples/README.unsubscribe (limited to 'examples/README.unsubscribe') diff --git a/examples/README.unsubscribe b/examples/README.unsubscribe new file mode 100644 index 00000000..7c41067c --- /dev/null +++ b/examples/README.unsubscribe @@ -0,0 +1,40 @@ +Unsubscribe endpoints for mlmmj users (and possibly Mailman, too) + +* examples/unsubscribe.milter filters outgoing messages + and appends an HTTPS URL to the List-Unsubscribe header. + This List-Unsubscribe header should point to the PSGI + described below. + Currently, this is only active for a whitelist of test + addresses in /etc/unsubscribe-milter.whitelist + with one email address per line. + +* examples/unsubscribe.psgi is a PSGI which needs to run + as the mlmmj user with permission to run mlmmj-unsub. + This depends on the PublicInbox::Unsubscribe module + which may be extracted from the rest of public-inbox. + It is strongly recommended to NOT run the rest of the + public-inbox WWW code in the same process as this PSGI. + (The public-inbox WWW code will never need write + permissions to anything besides stderr). + +* Both the .milter and .psgi examples are bundled with + systemd service and socket activation examples. + AFAIK no other PSGI server besides public-inbox-httpd + supports systemd socket activation. + +To wire up the milter for postfix, I use the following +in /etc/postfix/main.cf: + + # Milter configuration + milter_default_action = accept + milter_protocol = 2 + + # other milters may be chained here (e.g. opendkim) + # chroot users will need to adjust this path + smtpd_milters = local:/var/spool/postfix/unsubscribe/unsubscribe.sock + + # This is not needed for mlmmj since mlmmj uses SMTP: + # non_smtpd_milters = local:/var/spool/postfix/unsubscribe/unsubscribe.sock + +Copyright (C) 2016 all contributors +License: AGPL-3.0+ -- cgit v1.2.3-24-ge0c7