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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
[Unit]
Description=Mailweb IMAP web interface (mail@profpatsch.de)
After=network.target
[Service]
Type=simple
# One mailweb process serves one account. A second account is a second unit
# beside this one (see mailweb-qualle.service), with its own database and its
# own port — messages are keyed (mailbox, uid, uidvalidity), which two accounts
# both satisfy for INBOX/1, so a shared database would lose mail rather than
# merge it. See `man ./mailweb.1`, "Running several accounts".
#
# mailweb has NO authentication and no CSRF protection: whoever can reach this
# address can send mail, unsubscribe and file spam reports as you. Bind to
# loopback only, never 0.0.0.0.
#
# The binary comes from the nix profile, so what runs is always a build of
# committed sources:
# nix profile upgrade mailweb && systemctl --user restart mailweb-profpatsch
#
# GNUPGHOME is set because --imap-pass-cmd shells out to pass(1), which needs
# the gpg agent; the password never appears in the process table this way.
#
# --my-address names this account, and names nothing else. It decides two
# things: which address is left out of the contacts listing, and which is
# subtracted from the recipients of a reply. Naming an address that is not this
# account is therefore not a harmless extra — it hides a real correspondent from
# /contacts and silently drops them from reply-all, which is a message that
# quietly fails to reach somebody it was addressed to.
#
# It previously also listed team@ and orga@ of augsburg.one, which are not this
# account: they are addresses this mailbox receives mail *about*, appearing as
# recipients on 414 and 6 messages respectively and as the sender of none.
Environment="GNUPGHOME=%h/.gnupg"
ExecStart=%h/.nix-profile/bin/mailweb \
--imap-host=imap.mailbox.org \
--imap-user=mail@profpatsch.de \
"--imap-pass-cmd=pass email/mailbox.org" \
--smtp-host=smtp.mailbox.org \
"--smtp-pass-cmd=pass email/mailbox.org" \
--account-name=profpatsch \
--my-address=mail@profpatsch.de \
--listen=127.0.0.1:8776 \
--db=%h/.local/share/mailweb/profpatsch.db \
--mailbox=INBOX \
--mailbox=Archive \
--mailbox=Archive/2020 \
--mailbox=IfBored \
--mailbox=Scroll \
--mailbox=MustRead \
--mailbox=Sent
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
|