aboutsummaryrefslogtreecommitdiffstats
path: root/lists.sr.ht/installation.md
blob: 66f83fcdbcafa0aede5c640e41febdc259794c36 (plain) (blame)
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
57
58
59
60
61
62
63
64
65
66
67
68
---
title: lists.sr.ht installation
---

lists.sr.ht is the mailing list service for lists.sr.ht. There are a number of
important components:

- The **LMTP daemon**, which receives incoming email from a separate mail
  server (e.g. postfix), does minimal processing & validation, and
  dispatches it to the **celery worker**.
- The **celery worker** is distributed on as many cores and/or servers as you
  like and can take its time processing emails. It's responsible for forwarwding
  and archiving emails.
- The **web interface** displays the archive, manages subscriptions, etc, on the
  web.

# LMTP daemon installation

The LMTP daemon is available in the `lists.sr.ht` package, at the binary
`lists-srht-lmtp`. It needs to run on your mail server, and you need to
configure your MTA to forward emails to it.

The LMTP daemon uses the same config file as the others, and there are some
options there specifically catered to it. The most important is the Unix socket
path for the LMTP socket - and the user/group it should be assigned to. Make
sure that this is readable and writable by your MTA.

Enable the `lists.sr.ht-lmtp` service and configure your MTA to forward emails
to the socket.

## Mail server setup

The precise configuration of your mail server is a very subjective matter, and
we don't have a one-size-fits-all solution to give you. Here's an example of
forwarding to lists.sr.ht with postfix:

    # main.cf
    local_transport = local:$myhostname
    transport_maps = hash:/etc/postfix/transport

    # /etc/postfix/transport
    lists.sr.ht lmtp:unix:/tmp/lists.sr.ht-lmtp.sock
    sr.ht local:sr.ht

This forwards mail to @lists.sr.ht to the LMTP socket, and processes mail to
@sr.ht to local mailboxes. This is just one part of your setup, however, and the
remainder of your postfix (or other mail server) configuration is left as an
exercise to the reader.

# Celery worker installation

On servers which should process forwarding and archival, install the
`lists.sr.ht` package and enable the `lists.sr.ht-worker` service. Make sure you
review the config file for worker-specific options as well. The Redis instance
you use here should be shared with the LMTP daemon and other worker nodes to
ensure that messages can be distributed correctly.

# Web service installation

The lists.sr.ht web service is a standard sr.ht web service and can be installed
through the [standard procedure](/installation.md).

# Hacking on lists.sr.ht

A minimal local mail server setup which can be used to work on lists.sr.ht is
described [in this article][article].

[article]: https://drewdevault.com/2018/08/05/Local-mail-server.html