mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-21 19:45:58 +00:00
WIP: Add smarthost support
WORK IN PROGRESS -- WORK IN PROGRESS -- WORK IN PROGRESS This patch adds support for delivering mail via a smarthost. In this mode, all accepted mail gets delivered through an SMTP connection to a specific host, statically configured.
This commit is contained in:
@@ -122,6 +122,17 @@ This allows deploying chasquid behind a HAProxy server, as the address
|
||||
information is preserved, and SPF checks can be performed properly.
|
||||
Default: C<false>.
|
||||
|
||||
=item B<smarthost_url> (string):
|
||||
|
||||
Smarthost URL. If set, we will send all received email to this location,
|
||||
including local mail.
|
||||
|
||||
It is of the form C<smtp://user:password@host:port> for SMTP (and STARTTLS
|
||||
will be forcefully negotiated), or C<tls://user:password@host:port> for SMTP
|
||||
over TLS (usually port 465).
|
||||
|
||||
B<EXPERIMENTAL> for now, can change in backwards-incompatible ways.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
@@ -76,6 +76,12 @@ List of exported variables:
|
||||
count of STS security checks on outgoing connections, by result (pass/fail).
|
||||
- **chasquid/smtpOut/tlsCount** (status -> counter)
|
||||
count of TLS status (insecure TLS/secure TLS/plain) on outgoing connections.
|
||||
- **chasquid/smarthostOut/attempts** (counter)
|
||||
count of attempts to deliver via smarthost.
|
||||
- **chasquid/smarthostOut/errors** (reason -> counter)
|
||||
count of smarthost delivery errors, per reason.
|
||||
- **chasquid/smarthostOut/success** (counter)
|
||||
count of successful delivering via smarthost.
|
||||
- **chasquid/sourceDateStr** (string)
|
||||
timestamp when the binary was built, in human readable format.
|
||||
- **chasquid/sourceDateTimestamp** (int)
|
||||
|
||||
41
docs/smarthost.md
Normal file
41
docs/smarthost.md
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
# Smarthost client mode
|
||||
|
||||
As of version 1.6 (2020-XX), [chasquid] supports operating as a [smarthost]
|
||||
client.
|
||||
|
||||
In this mode, chasquid will deliver all accepted mail (both local and remote)
|
||||
to a single specific host (the *smarthost* server).
|
||||
|
||||
## Status
|
||||
|
||||
It is **EXPERIMENTAL** for now. The configuration options and behaviour can
|
||||
change in backwards-incompatible ways.
|
||||
|
||||
|
||||
## Security
|
||||
|
||||
chasquid will always negotiate TLS on the connection to the smarthost, and
|
||||
expects a valid certificate.
|
||||
|
||||
If TLS is not available, or the certificate is not valid, the mail will remain
|
||||
in the queue and will not be delivered.
|
||||
|
||||
|
||||
## Configuring
|
||||
|
||||
Add the following line to `/etc/chasquid/chasquid.conf`:
|
||||
|
||||
```
|
||||
smarthost_url: "smtp://user:password@server:587"
|
||||
```
|
||||
|
||||
Replace `user` and `password` with the credentials used to authenticate to the
|
||||
smarthost server, and `server:587` with the server address, including port.
|
||||
|
||||
You can also use the `tls` scheme for direct TLS connections (usually on port
|
||||
465).
|
||||
|
||||
|
||||
[chasquid]: https://blitiri.com.ar/p/chasquid
|
||||
[smarthost]: https://en.wikipedia.org/wiki/Smart_host
|
||||
Reference in New Issue
Block a user