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
[Unit]
Description=Mailweb IMAP web interface (info@qualleaugsburg.de)
After=network.target

[Service]
Type=simple
# The second account, beside mailweb-profpatsch.service. Everything that
# separates the two instances is on this command line: its own database, its
# own port and its own label. Nothing is shared, so no query here can reach the
# other account's mail. See `man ./mailweb.1`, "Running several accounts".
#
# mailweb has NO authentication: whoever can reach this address has full read
# access to a shared organisational mailbox. Loopback only.
#
#   nix profile upgrade mailweb && systemctl --user restart mailweb-qualle
#
# --sent-mailbox is not the default here. strato calls the folder "Sent Items",
# and the name is what the contact view uses to tell outgoing mail from
# incoming; with the default "Sent" every message this account sent renders as
# one the correspondent sent to it. Confirmed against the server with
# --list-mailboxes, which is also why only these two folders are watched: of
# the 58 mailboxes on strato the rest are filed project archives, and each
# watched mailbox costs a persistent IMAP connection held in IDLE.
Environment="GNUPGHOME=%h/.gnupg"
ExecStart=%h/.nix-profile/bin/mailweb \
  --imap-host=imap.strato.de \
  --imap-user=info@qualleaugsburg.de \
  "--imap-pass-cmd=pass offline/qualle/mail-pass" \
  --smtp-host=smtp.strato.de \
  "--smtp-pass-cmd=pass offline/qualle/mail-pass" \
  --account-name=qualle \
  "--sent-mailbox=Sent Items" \
  --listen=127.0.0.1:8777 \
  --db=%h/.local/share/mailweb/qualle.db \
  --mailbox=INBOX \
  "--mailbox=Sent Items"
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target