maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

  1# SMTP & LMTP transparent forwarding
  2
  3Module that implements transparent forwarding of messages over SMTP.
  4
  5Use in pipeline configuration:
  6
  7```
  8deliver_to smtp tcp://127.0.0.1:5353
  9# or
 10deliver_to smtp tcp://127.0.0.1:5353 {
 11  # Other settings, see below.
 12}
 13```
 14
 15target.lmtp can be used instead of target.smtp to
 16use LMTP protocol.
 17
 18Endpoint addresses use format described in [Configuration files syntax / Address definitions](/reference/config-syntax/#address-definitions).
 19
 20## Configuration directives
 21
 22```
 23target.smtp {
 24    debug no
 25    tls_client {
 26        ...
 27    }
 28    attempt_starttls yes
 29    require_tls no
 30    auth off
 31    targets tcp://127.0.0.1:2525
 32    connect_timeout 5m
 33    command_timeout 5m
 34    submission_timeout 12m
 35}
 36```
 37
 38### debug _boolean_
 39Default: global directive value
 40
 41Enable verbose logging.
 42
 43---
 44
 45### tls_client { ... }
 46Default: not specified
 47
 48Advanced TLS client configuration options. See [TLS configuration / Client](/reference/tls/#client) for details.
 49
 50---
 51
 52### starttls _boolean_
 53Default: `yes` (`no` for `target.lmtp`)
 54
 55Use STARTTLS to enable TLS encryption. If STARTTLS is not supported
 56by the remote server - connection will fail.
 57
 58maddy will use `localhost` as HELO hostname before STARTTLS
 59and will only send its actual hostname after STARTTLS.
 60
 61### attempt_starttls _boolean_
 62Default: `yes` (`no` for `target.lmtp`)
 63
 64DEPRECATED: Equivalent to `starttls`. Plaintext fallback is no longer
 65supported.
 66
 67---
 68
 69### require_tls _boolean_
 70Default: `no`
 71
 72DEPRECATED: Ignored. Set `starttls yes` to use STARTLS.
 73
 74---
 75
 76### auth `off` | `plain` _username_ _password_ | `forward`  | `external`
 77Default: `off`
 78
 79Specify the way to authenticate to the remote server.
 80Valid values:
 81
 82- `off` – No authentication.
 83- `plain` – Authenticate using specified username-password pair.
 84  **Don't use** this without enforced TLS (`require_tls`).
 85- `forward` – Forward credentials specified by the client.
 86  **Don't use** this without enforced TLS (`require_tls`).
 87- `external` – Request "external" SASL authentication. This is usually used for
 88  authentication using TLS client certificates. See [TLS configuration / Client](/reference/tls/#client) for details.
 89
 90---
 91
 92### targets _endpoints..._
 93**Required.**<br>
 94Default: not specified
 95
 96List of remote server addresses to use. See [Address definitions](/reference/config-syntax/#address-definitions)
 97for syntax to use.  Basically, it is `tcp://ADDRESS:PORT`
 98for plain SMTP and `tls://ADDRESS:PORT` for SMTPS (aka SMTP with Implicit
 99TLS).
100
101Multiple addresses can be specified, they will be tried in order until connection to
102one succeeds (including TLS handshake if TLS is required).
103
104---
105
106### connect_timeout _duration_
107Default: `5m`
108
109Same as for target.remote.
110
111---
112
113### command_timeout _duration_
114Default: `5m`
115
116Same as for target.remote.
117
118---
119
120### submission_timeout _duration_
121Default: `12m`
122
123Same as for target.remote.