4 Commits

Author SHA1 Message Date
Alberto Bertogli
5eded4edc3 test: Unify (most) SMTP client calls
To send mails, today some tests use msmtp and others our internal smtpc.py.

This works, but msmtp slows down the tests significantly, and smtpc.py
is also not particularly fast, and also has some limitations.

This patch introduces a new SMTP client tool written in Go, and makes
almost all the tests use it.

Some tests still remain on msmtp, mainly for client-check compatibility.
It's likely that this will be moved in later patches to a separate
special-purpose test.

With this patch, integration tests take ~20% less time than before.
2024-03-12 20:43:21 +00:00
Alberto Bertogli
f5949a79f1 test: Update expected DSN to accept headers set by latest msmtp
Newer versions of msmtp now set In-Reply-To and References header,
causing t-16-spf test to fail because we expect them to be empty (for no
particular reason).

So this patch changes our expected DSN used for testing to ignore their
values.
2022-11-12 18:21:13 +00:00
Alberto Bertogli
d3c18aa471 modules: Update spf to 1.3.0
This patch updates the dependency on blitiri.com.ar/go/spf from v1.2.0
to v1.3.0, which includes a few bug fixes.

There are no code changes needed, just some minor adjustment to the
tests due to error strings changing.

The go.mod "go" keyword is also bumped up to 1.15 since it's the minimum
supported version since commit e444fe1f (2021-10-05).
2022-02-27 11:30:34 +00:00
Alberto Bertogli
28cb9169cc test: Add SPF integration test
This patch adds a new integration test to cover SPF checks. The main
goal is not to cover the SPF parsing, since that's handled by the
library already, but the higher level aspects: that the mails are indeed
rejected, that the DSN looks reasonable, etc.
2019-12-01 22:13:31 +00:00