~evilham/cdist-evilham

cdist-evilham/type/__evilham_discourse_mail_receiver/man.rst -rw-r--r-- 2.4 KiB
6a546171 — Evilham [__report_running_process] Add manual, fix shellcheck a month ago
                                                                                
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
cdist-type__evilham_discourse_mail_receiver(7)
==============================================


NAME
----
cdist-type__evilham_discourse_mail_receiver - Setup Discourse incoming mail


DESCRIPTION
-----------
This (singleton) type installs and configures incoming mail for discourse.

It does so with `discourse_docker`, which is the officially supported way.

By default it sets up Let's Encrypt certificates, but that can be disabled if,
e.g. you are behind a reverse proxy.

This type assumes that you have already setup discourse using docker, e.g.
with `__discourse(7)`.

Note that this type requires a system API key with `receive_email` scope to
have been generated, that step is currently not automated because we didn't
see a way to do that with discourse.
So, create your admin user and in the administration settings, under API
create the necessary API key.


It is necessary to change following on the Discourse web interface in the
admin configuration / email section:

- Set "reply by email address" to something like
  `reply+%{reply_key}@example.com`
- Activate "manual polling enabled" (we send emails via the API)
- Activate "reply by email enabled"


REQUIRED PARAMETERS
-------------------
system-api-key
    The API key for the system user, it needs the `receive_email` key scope.


BOOLEAN PARAMETERS
------------------
disable-letsencrypt
    If passed, this will disable the automatic management of Let's Encrypt
    certificates.
    This must match what you used in `__discourse(7)`.


OPTIONAL PARAMETERS
-------------------
hostname
    If present, this is the domain name that will be used by Discourse.
    Defaults to `${__target_host}`.

system-user
    The username associated with the API key.
    You probably don't want to change this.
    Defaults to "system".


EXAMPLES
--------

.. code-block:: sh

    # Setup Discourse on this host
    __evilham_discourse \
        --admin-email 'info@exo.cat' \
        --smtp-host 'smtp.exo.cat' \
        --smtp-user 'discourse@exo.cat' \
        --smtp-pass 'WeNeedGoodSecurity'
    # Manually register admin user, generate API key, write it down

    # Now setup the mail receiver
    __evilham_discourse_mail_receiver \
        --system-api-key "WeNeedGoodSecurity"


SEE ALSO
--------
- https://meta.discourse.org/t/straightforward-direct-delivery-incoming-mail/49487


AUTHORS
-------
Evilham <contact@evilham.com>


COPYING
-------
Copyright \(C) 2021 Evilham.