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

8 Commits

Author SHA1 Message Date
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
4eaf5b38c8 hooks: Use chasquid-rspamd if available
The chasquid-rspamd utility (https://github.com/Thor77/chasquid-rspamd)
provides a better integration with rspamd, by taking envelope and
connection information from the environment variables, and communicating
with rspamd using its protocol.

So if it is available, use it instead of rspamc in the default hook.
2021-07-08 10:18:56 +01:00
Alberto Bertogli
4116c046bc hooks: Ignore rspamd's greylist action
The default hook will use rspamc (the command-line client of rspamd) if
it is installed. rspamc will emit one suggested action, and then the
hook will interpret it and return accordingly.

Because the possible actions returned by rspamc are user-configured,
this patch adds a comment to make it clear that the hook will need
adjustment if the configuration uses non-default actions.

In particular, the greylisting module (which usually handles the
"greylist" action) is not run when using rspamc. This can cause
unnecessary rejections and is quite misleading.

This patch removes the "greylist" action handling; now the default hook
will only reject mail once it reaches rspamd's configured threshold for
direct rejection.

In the future, a more custom integration with rspamd might be added to
allow for rspamd-based greylisting, but until then this is a more
reasonable default.

Thanks to Jonas Seydel (thor77) and Max Mazurov (fox.cpp@disroot.org)
for noticing this issue, helping investigate, and discussing the course
of action.
2020-06-01 21:05:02 +01:00
Thor77
b6248f3089 hooks: Fix output of command -v dkimsign added to message
When checking if the dkimsign command exists, the default hook doesn't
redirect the output to /dev/null, so if the command is present it will
emit unwanted output (interpreted as message headers, as expected).

This patch adds the missing redirection.

Amended-by: Alberto Bertogli <albertito@blitiri.com.ar>
  Extended commit message.
2020-06-01 14:18:11 +01:00
Alberto Bertogli
a1ca50ab57 hooks: Add mising quote in the example post-data hook
The example post-data hook was missing a quote around a sub-shell
execution.

This is harmless because the content itself is admin-provided and not
related to user input, but this commit fixes the quote for defense in
depth and consistency.
2020-02-02 02:07:38 +00: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
4ecc5461d3 Add driusan/dkim integration example and tests
This patch adds DKIM signing using https://github.com/driusan/dkim tools
to the example hook.

It also adds an optional integration test to exercise signing and
verification, and corresponding documentation.
2018-11-30 10:03:48 +00:00
Alberto Bertogli
cf2b8ade65 etc: Add a skeleton configuration structure
This patch adds an "etc" directory, with a basic configuration structure
that can be used for an initial installation.
2016-11-01 23:56:04 +00:00