1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00
Commit Graph

64 Commits

Author SHA1 Message Date
Alberto Bertogli
ddcfacccd0 docs: v1.10 release notes 2022-09-02 16:01:43 +01:00
Alberto Bertogli
7fe22ef104 docs: Update URL for Arch binary packages
This patch updates the URL for the Arch binary packages, which has moved.

Thanks to foxcpp for maintaining them and letting me know about the
change.
2022-07-04 09:46:11 +01:00
Alberto Bertogli
f303e43082 aliases: Implement catch-all
This patch implements support for catch-all aliases, where users can add
a `*: destination` alias. Mails sent to unknown users (or other aliases)
will not be rejected, but sent to the indicated destination instead.

Please see https://github.com/albertito/chasquid/issues/23 and
https://github.com/albertito/chasquid/pull/24 for more discussion and
background.

Thanks to Alex Ellwein (aellwein@github) for the alternative patch and
help with testing; and to ThinkChaos (ThinkChaos@github) for help with
testing.
2022-03-11 20:51:06 +00:00
Alberto Bertogli
5878b9d85e docs: v1.9 release notes 2022-03-05 23:26:07 +00:00
Alberto Bertogli
8083e27441 docs: Expand certificate section on the install guide
The install guide mentions that the `certs/` directory can be symlinked,
but doesn't cover permissions much, so it's easy for users to be
confused (like it happened in
https://github.com/albertito/chasquid/issues/26).

This patch adds a bit more details on how to set up certificates, to
hopefully reduce the chances of confusion.
2022-02-27 10:27:23 +00:00
Alberto Bertogli
67d0064f57 aliases: Simplify lookup logic, remove alias-exists hook
This patch simplifies the internal alias lookup logic, unifying it
across Resolve and Exists.

As part of this, the `alias-exists` hook is removed. It was redundant to
begin with, although it enabled a potential optimization, it isn't worth
the complexity. The timeout for execution of both was the same.

This change should be backwards-compatible because `alias-resolve` is
still used, and the semantics haven't changed.
2022-01-21 12:07:34 +00:00
Alberto Bertogli
4f595ce3d2 docs: Document that only haproxy v1 is supported
Document that only haproxy's PROXY protocol v1 is supported. This can
help users configure their instance and avoid trying to set up other
versions.

Thanks to Björn Busse (bbuse@github) for reporting this!
2021-12-06 17:56:07 +00:00
Alberto Bertogli
a3c06b6ee4 docs: v1.8 release notes 2021-07-30 09:40:10 +01:00
Alberto Bertogli
d53c1d2b88 docs: Add DKIM setup instructions
This patch adds some basic instructions to the documentation on how to
set up DKIM, using the tools supported by the example hook.

It's not meant to be a full DKIM how-to, but to help someone who already
knows enough, or who is complementing it with a more general purpose
DKIM guide.
2021-07-25 14:59:37 +01:00
Alberto Bertogli
270a071c1e hooks: Add dkimpy support
This patch adds support in the default hook for using dkimpy for DKIM
signing.

Unfortunately, dkimpy binaries have the same name as driusan/dkim's, so
we need to use --help to disambiguate. It's not pretty but it should
work, and is quite self contained.

Also, for the integration tests, we still need driusan/dkim because
dkimpy lacks the features needed. Specifically, dkimpy's dkimverify
can't be made to use custom DNS, or override the TXT values in any way,
so we can't verify that the generated signature is reasonable.

Thanks to ne9z@github for suggesting this change and providing an
alternative patch in https://github.com/albertito/chasquid/pull/19.
2021-07-21 02:06:20 +01:00
Alberto Bertogli
cfe0e48c0a auth: Allow users without a domain
Some deployments already have users that authenticate without a domain.
Today, we refuse to even consider those, and reject them at parsing time.

However, it is a use-case worth supporting, at least with some
restrictions that make the complexity manageable.

This patch changes the auth package to support authenticating users
without an "@domain" part.

Those requests will always be directly passed on to the fallback
authenticator, if available.

The dovecot fallback authenticator can already handle this case just fine.
2021-06-11 20:09:15 +01:00
Alberto Bertogli
8c8e64dc29 smtpsrv: Reject HTTP commands
To help with defense-in-depth on cross-protocol attacks (e.g.
https://alpaca-attack.com/), this patch makes chasquid reject HTTP
commands.
2021-06-11 10:35:51 +01:00
Alberto Bertogli
a3685439dc docs: v1.7 release notes 2021-05-31 15:03:38 +01:00
Alberto Bertogli
fa651e74e3 dovecot: Retry auto-detect until we find a usable socket pair
Currently, chasquid attempts to auto-detect dovecot sockets when
starting up (if needed). If autodetection fails, chasquid emits an
error, continues serving, and never tries again.

This can be problematic if chasquid starts up before dovecot, and at the
time the dovecot sockets are not present (e.g. after a reboot). In that
case, chasquid will not use dovecot for authentication even after
dovecot has started.

This patch changes the autodetect logic, by doing autodetection at
startup and on each request, until we find a working pair of sockets.
Once we do, they're used consistently.

That way, if dovecot is not ready when chasquid starts, it's not a
problem and chasquid will start using dovecot once it becomes available.

Thanks to Thor77 (thor77@thor77.org) for reporting and helping
troubleshoot this issue.
2021-05-24 10:21:33 +01:00
Alberto Bertogli
84e6c066fa docs: Add known issue about dkimsign and post-data hook
There's a known issue in versions 0.07 to 1.5 where the post-data hook
invocation can fail if the dkimsign binary exists, due to a bug in the
post-data hook check.

This was fixed by commit b6248f3, but it is found on occasion since the
current Debian stable ships 0.07, and Ubuntu 20.04 LTS ships 1.2.

So this patch adds it to the known issues list.
2021-05-24 01:02:43 +01:00
Alberto Bertogli
b1a4b0ce08 docs: Add a page for known issues
It's common that people running old releases (for example, because of
their Linux distribution version) run into issues that have already been
fixed.

It can be convenient to have a list of the most common known issues and,
when available, their workarounds.

This patch creates the documentation page for them, currently empty. It
will be filled in subsequent patches.
2021-05-24 01:01:16 +01:00
Alberto Bertogli
ec7234c0a9 docs: #chasquid has moved to OFTC
The IRC channel has been moved to OFTC, reflect that in the
documentation.
2021-05-23 10:15:44 +01:00
Alberto Bertogli
5f58b942f4 docs: Update how-to with new links and fix mda-lmtp path
This patch adds a new link to the RBL checking suggestion, since the
existing one doesn't work with IPv6, and it's important to get good
coverage.

While at it, it also fixes the path to mda-lmtp, which was wrong before.
2021-03-15 18:32:22 +00:00
Alberto Bertogli
5c09138db8 chasquid-util: Remove dependency on docopt-go
The docopt-go library is quite convenient, but it has been abandoned for
a while :(

Since we only use it for chasquid-util, this patch removes it and
replaces it with a custom small parser, that is a reasonable fit for the
required use cases.

The patch also adds a couple of tests to increase coverage.

NOTE: docopt-go accepted some undocumented behaviour, in particular the
use of "-a b" instead of "-a=b". The new parser does not, so some
user scripts may require updating.

I think this should be rare enough not to be worth the complexity of
adjusting the parser to allow it.
2021-01-16 23:21:35 +00:00
Alberto Bertogli
78df715a02 docs: v1.6 release notes 2020-11-22 09:35:08 +00:00
Alberto Bertogli
e79586a014 Implement HAProxy protocol support
This patch implements support for incoming connections wrapped in the
HAProxy protocol v1.

This is useful when running chasquid behind a HAProxy server, as it
needs the original source IP to perform SPF checks.

This patch is a reimplementation of one originally provided by Denys
Vitali in pull request #15, except the logic for the protocol handling
is moved to a new package, and the smtpsrv.Conn handling of the source
IP is simplified.

It is marked as experimental for now, since we want to give it a bit
more exposure just in case the option/api needs adjustment.

Thanks a lot to Denys Vitali (@denysvitali in github) for sending the
original patch for this, and helping test it!
2020-11-13 20:49:42 +00:00
Alberto Bertogli
1cc7b9a864 smtpsrv: Pass EHLO/HELO domain to the post-data hook
Some utilities might want to access the EHLO/HELO domain in the
post-data hook (for example, to do additional SPF validations).

This patch implements that support, including sanitizing the EHLO domain
on the environment variable to reduce the risk of problems.
2020-09-17 01:29:49 +01:00
Alberto Bertogli
4c26713f40 docs: Add details about the hook variables
This patch adds some wording to explain each of the hook variables.
2020-09-17 01:29:49 +01:00
Alberto Bertogli
7914590cfa docs: Update and extend links to distribution packages
This patch updates and extends the links to the distribution packages,
referencing them from the README (it's more likely to be what the reader
wants to see), and also extending the Arch packaging with binary package
information.
2020-09-13 11:31:31 +01:00
Alberto Bertogli
9e3c102f34 docs: v1.5 release notes 2020-09-12 12:03:25 +01:00
Alberto Bertogli
a2ce7c7323 docs: Minor style changes to the monitoring documentation
This patch contains minor style and formatting changes to the Monitoring
documentation, to (hopefully) improve readability and consistency.
2020-08-21 12:07:33 +01:00
Alberto Bertogli
7fe42a368a monitoring: Add OpenMetrics exporter
This patch makes chasquid's monitoring server expose an OpenMetrics
metrics endpoint.

It adds a new package "expvarom" which implements an HTTP handler that
exports expvar variables in the OpenMetrics text format.

Then, the handler is registered by the monitoring server at /metrics
(where most things expect it to be).

The existing exported variables are also extended with descriptions,
which is optional, but improves the readability of the metrics.
2020-08-21 12:07:33 +01:00
Alberto Bertogli
d9d56552f3 maillog: Support logging to stdout and stderr
This patch adds support for writing maillog to stdout and stderr, which
can be desirable in certain environments.

Thanks to Denys Vitali <denys@denv.it> who sent an alternative patch for
this functionality.
2020-05-24 02:26:18 +01:00
Alberto Bertogli
bee7a9f193 docs: v1.4 release notes 2020-05-22 12:59:29 +01:00
Alberto Bertogli
4c28efcb20 config: Allow overrides from the command line
This patch allows the configuration values to be overridden from the
command-line, with a new -config_overrides flag.

There is a fairly specific use case for this, when editing the
configuration file is not feasible or convenient (e.g. running an
user-supplied configuration in a managed environment).
2020-05-17 00:10:06 +01:00
Alberto Bertogli
70387207f2 man: Update generated versions
This patch just re-runs the pod generator using a newer version of it,
going from 4.09 to 4.11.

There are no content changes.
2020-05-13 20:42:09 +01:00
Alberto Bertogli
13ee3ba482 courier: Use the hostname in SMTP HELO
The SMTP courier, which handles outgoing connections, uses the domain of
the envelope's from as the domain in the HELO/EHLO greeting.

This works fine in practice, but ideally the domain used in the greeting
should match the reverse DNS record. This used to be more relevant but
nowadays it is not really enforced; however, it sometimes comes up in
self checks, and might cause some confusion when troubleshooting.

So this patch makes it use the configured hostname instead, which is
under the users' control and more likely to be compliant. It also
simplifies the code.

The documentation of the hostname configuration option is also updated
to mention this behaviour.

Thanks to Jonas Seydel (thor77) for bringing this up.
2020-05-13 20:27:17 +01:00
Alberto Bertogli
2b9c2df9d3 docs: v1.3 release notes 2020-04-12 11:42:00 +01:00
Alberto Bertogli
6815cf1d5c docs: Add Arch installation instructions
There is an AUR package for chasquid, so this patch adds references to
it in the documentation.

Thanks to Max Mazurov (fox.cpp@disroot.org) for adding the package.
2020-03-28 17:59:46 +00:00
Alberto Bertogli
fcbd20cd74 docs: Add a section on dovecot auth troubleshooting
This patch adds a section on dovecot authentication troubleshooting,
with common suggestions that can help identify what is going on when
the chasquid-dovecot interaction isn't working as expected.
2020-03-21 16:54:39 +00:00
Alberto Bertogli
65afb02cd5 docs: Document the use of SRS when doing alias forwarding
When an alias has a remote destination, chasquid uses sender rewriting
(also known as SRS [1]) to forward the email without risking being in
violation of SPF policies.

See https://en.wikipedia.org/wiki/Sender_Rewriting_Scheme for more
details.

This, however, wasn't documented anywhere, as noted in
https://github.com/albertito/chasquid/issues/6.

This patch adds a paragraph to the alias documentation explaining this
behaviour.
2020-03-21 14:15:47 +00:00
Alberto Bertogli
0df2e325ed docs: v1.2 release notes 2019-12-06 15:33:07 +00:00
Alberto Bertogli
8f2eba5795 docs: Add release notes, replacing the upgrading notes
This patch replaces the upgrading notes, which focused only on
backwards-incompatible changes, with more detailed release notes.
2019-12-06 15:19:50 +00:00
Alberto Bertogli
0c92fb4937 docs: Add section about monitoring with Prometheus
This patch adds a section to the monitoring docs with an example of how
to use the prometheus-expvar-exporter to monitor chasquid with
Prometheus.
2019-10-31 21:38:34 +00:00
Alberto Bertogli
8b80e9fc2e docs: Add missing monitoring expvar, correct minor wording 2019-10-31 21:36:58 +00:00
Alberto Bertogli
e8511e3f55 docs: Update install/build documentation
This patch updates the installation guide to try to make the
installation section more readable.

It also assumes a modern Go environment is installed, which
simplifies the process of building from source.
2019-10-25 16:00:15 +01:00
Alberto Bertogli
f399fe3e84 aliases: Implement aliases hooks
This patch implements two new hooks: alias-resolve and alias-exists.

They are called during the aliases resolution process, to allow for more
complex integration with other systems, such as storing the aliases in a
database.

See the included documentation for more details.
2019-10-24 21:37:09 +01:00
Alberto Bertogli
5782a7705e hooks: Add rspamd integration to the example hook
Rspamd (https://rspamd.com/) is a popular open-source spam filtering
system.

This patch adds integration with it in the example hook, which uses the
rspamc client to get a veredict, similar to what it does for
Spamassassin.
2019-10-21 13:51:58 +01:00
Alberto Bertogli
0bf8f72c73 docs: Add documentation about tests
This patch replaces test/README, which was becoming a bit outdated, with
a more general description of the different tests at a high level, and
includes it in the documentation index.
2019-10-19 13:06:30 +01:00
Alberto Bertogli
5fa756fddc docs: Clarify how users are identified to dovecot
In authentication requests sent to dovecot, chasquid uses the full
addresses, "user@domain". However this wasn't mentioned in the
documentation, and could cause some confusion.

So this patch adds an explicit clarification about this in the dovecot
integration documentation.
2019-10-19 00:45:18 +01:00
Alberto Bertogli
bb97991a24 docs: Add aliases documentation
The processing of aliases wasn't properly documented in an user-visible
way, so this patch adds a new section for it.
2019-10-19 00:45:18 +01:00
Alberto Bertogli
e98464c424 docker: Add Dockerfile for running chasquid+dovecot+letsencrypt
This patch adds a new docker directory, which contains a Dockerfile plus
some additional configuration for creating a container that runs
chasquid+dovecot+letsencrypt.

It also updates the gitlab CI pipeline to automatically build and
publish an image on each commit.

This is experimental and likely to break.
2019-08-12 01:21:41 +01:00
Alberto Bertogli
c6c9866ae1 docs: Add documentation for security level checks
This patch adds documentation for the security level checks, and
references it (the rendered version, for convenience) from the README
file.
2019-08-06 03:05:43 +01:00
Alberto Bertogli
d348477841 docs: Integrate with readthedocs.org
This patch adds configuration to integrate with readthedocs.org, using
mkdocs as rendering engine.

It also does minor documentation updates, to tidy some things up
(clearer titles, move some documentation from the root into docs/, etc).
2019-08-05 14:30:14 +01:00
Alberto Bertogli
e8ccff749e docs: Add documentation for the monitoring facilities
This patch adds a new document, to cover the monitoring facilities
provided by the daemon.
2019-07-16 01:31:57 +01:00