public-inbox.git  about / heads / tags
an "archives first" approach to mailing lists
blob a68e6e81858fe51afd9c629e29e6592ff82aa186 1268 bytes (raw)
$ git show HEAD:examples/unsubscribe-milter@.service	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
# ==> /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

# UNIQUE_MAILTO makes the List-Unsubscribe mailto: header unique
# so unsubcribing becomes one-step (requires MDA/MTA configuration,
# see the bottom of examples/unsubscribe.milter
# Environment = UNIQUE_MAILTO=1

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
# they both need to read /home/mlmmj/.unsubscribe.key
User = mlmmj

# only kill the parent process when using the default Sendmail::PMilter
# postfork dispatcher, children will die naturally when they're done
# with a given message.
KillMode = process

[Install]
WantedBy = multi-user.target

git clone https://public-inbox.org/public-inbox.git
git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/public-inbox.git