diff options
author | Eric Wong <e@80x24.org> | 2016-05-18 01:23:05 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-05-20 21:33:56 +0000 |
commit | 1f29b33d3f71b8a40f5ae76bf20b95618b518654 (patch) | |
tree | 974ac5d70d601a454b92bf824e03e8f23b6c6daa /examples/unsubscribe-milter@.service | |
parent | d6cdb106f27abed5d05da035c95e106939fbe3b2 (diff) | |
download | public-inbox-1f29b33d3f71b8a40f5ae76bf20b95618b518654.tar.gz |
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.
Diffstat (limited to 'examples/unsubscribe-milter@.service')
-rw-r--r-- | examples/unsubscribe-milter@.service | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/unsubscribe-milter@.service b/examples/unsubscribe-milter@.service new file mode 100644 index 00000000..98e3d478 --- /dev/null +++ b/examples/unsubscribe-milter@.service @@ -0,0 +1,24 @@ +# ==> /etc/systemd/system/unsubscribe-milter@.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 milter %i +Wants = unsubscribe-milter.socket +After = unsubscribe-milter.socket + +[Service] +# First 8 bytes is for the key, next 8 bytes is for the IV +# using Blowfish. We want as short URLs as possible to avoid +# copy+paste errors +# umask 077 && dd if=/dev/urandom bs=16 count=1 of=.unsubscribe.key +ExecStart = /usr/local/sbin/unsubscribe.milter /home/mlmmj/.unsubscribe.key +Sockets = unsubscribe-milter.socket + +# the corresponding PSGI app needs permissions to modify the +# mlmmj spool, so we might as well use the same user since +User = mlmmj + +[Install] +WantedBy = multi-user.target |