Commit Graph

68 Commits

Author SHA1 Message Date
Guillaume Girol
5248dce1ea tests: increase memory limit for indexer process
otherwise fts-xapian with recent versions (1.4.9 at least) prints a
warning and the test fails
2021-04-24 17:01:52 +02:00
Symphorien Gibol
06b989c1e7 add full text search support 2021-03-04 22:17:25 +01:00
Antoine Eiche
5f431207b3 postfix: forwarding emails of login accounts with keeping local copy
When a local account address is forwarded, the mails were not locally
kept. This was due to the way lookup tables were internally managed.

Instead of using lists to represent Postfix lookup tables, we now use
attribute sets: they can then be easily merged.

A regression test for
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/
has been added: it sets a forward on a local address and ensure an
email sent to this address is locally kept.

Fixes #205
2021-02-06 08:17:43 +00:00
Henri Menke
89bd89c706 Recommend bcrypt passwords everywhere 2020-11-29 20:19:46 +01:00
Antoine Eiche
7d2020cb36 Move clamav database to the blobs repository
This database is huge and can be fetched at build time.

Fixes #197
2020-11-11 20:27:59 +01:00
Antoine Eiche
99f843de47 Release nixos-20.09 branch 2020-10-31 08:34:36 +01:00
Antoine Eiche
4818b57a92 test.dovecot: ensure port 143 is closed when enableImap is not set
The test also checks the connection on the imap port 993 is a SSL
connection.
2020-10-05 21:18:36 +02:00
Milan Pässler
e272a2755b remove support for 20.03 2020-10-05 20:54:46 +02:00
Antoine Eiche
c813f1205f Add multiple.nix test
This test is used to test feature requiring several mail domains, such
as the `forwards` option.
2020-09-28 20:51:32 +02:00
Antoine Eiche
4008d0cb53 Move tests to the Python framework 2020-07-27 23:11:54 +02:00
Xavier Vello
45f80def41 Setup rspamd controller to serve web UI assets 2020-07-06 23:14:33 +02:00
Antoine Eiche
b8e4ed00c3 Remove 19.09 support
Note there is still the 19.09 branch.
2020-05-11 21:46:01 +00:00
Antoine Eiche
9b5779de16 tests/intern: set memorySize to 1G
There is an OOM when running this test.
2020-05-08 20:43:46 +02:00
Antoine Eiche
abe3c4aedc Add send-only test
In the intern test, we send a mail to a send-only account and check
the reject message is correcly returned.
2020-05-08 20:43:46 +02:00
Symphorien Gibol
8e95d4e456 tests/extern.nix: increase memory
got oom several time with rspamd 2.5 update
2020-05-05 19:07:46 +00:00
Symphorien Gibol
7ccf35cb5f tests/clamav.nix: relax expected error message
with rspamd 2.5 it only says Spam message rejected
2020-05-05 19:07:46 +00:00
Antoine Eiche
b0647c95c9 Remove the GitLab runner related code 2020-04-22 23:35:48 +02:00
Antoine Eiche
09ca79801b tests: no ssl cert check for fetchmail
Since the certificate is autosigned, an SSL error was emitted by
dovecot.
2020-04-19 10:01:57 +02:00
Antoine Eiche
a53aa5ac9a Use Niv to pin nixpkgs releases
Before using Niv, we were following channels meaning we can not
reproduce CI jobs easily.

In this change, we use Niv to pin these dependencies. We are also
addding a tests/default.nix to be able to run these tests locally.

For instance, to run the test extern.nix on the nixpkgs-19.09 release:

    nix-build tests/default.nix -A extern.nixpkgs_19_09

Fixes #178
2020-04-19 10:01:57 +02:00
Xavier Vello
d7b62bbb93 Update clamav test fixtures 2019-12-15 11:53:27 +01:00
Xavier Vello
5c6b6287d6 Fix extern test on 19.09
The openssl output format changed, breaking the
"dkim has user-specified size" test
2019-12-14 22:22:23 +01:00
Xavier Vello
43df84e1a0 Fix dovecot in 19.09+
Dovecot now requires at least 1024bits of dh params.
Test duration seems is not significantly increased.
2019-12-14 22:22:23 +01:00
Xavier Vello
5fb707e61a Update clamav test to use local fixtures
The current version fetches clamav-db-files from gitlab,
in the master branch. This is currently broken as the files
were removed, and does not allow to ensure a fixture update
does not break the test
2019-12-14 22:22:23 +01:00
Xavier Vello
81e4a49708 Restore tests and script deleted in b8661825 2019-12-14 22:22:10 +01:00
JosephTheEngineer
b866182532 Remove use of the deprecated string type 2019-09-22 13:32:37 +00:00
Joey Hewitt
f789f7a80c add dkimKeyBits configuration 2019-07-09 21:59:28 -06:00
Joey Hewitt
93660eabcd fixes to tests
- restructure rspamd config. It's nicer now, and it was getting
overridden the old way.
- "scan_mime_parts = false" apparently must be used in rspamd for ClamAV
to work
- refactor the clamav test a bit for cleanliness
- wait for rspamd and clamd sockets to open, before testing
- use clamdscan for speed, and verify that the virus was found
- verify msmtp returns virus scan result
2019-07-07 21:47:09 -06:00
Joey Hewitt
0e6bb4e898 workaround GitLab CI KVM issue
Their CI environment currently doesn't have KVM.  This commit should be
reverted when/if they do, for much better CI speed.

You can still run tests locally on your KVM-enabled machine as documented
on the wiki.

Workaround on GitLab is several pieces (injected through .gitlab-ci.yml):
- Make a /dev/kvm file so that nix thinks we have "kvm" system feature
and proceeds with executing the tests.
- Inject a QEMU package that replaces qemu-kvm with a full emulator.
- Monkey-patch the test script to wait longer for the VM to boot, since
it's slow on full emulation. 1200 seconds, double the previous value.
The patch method is not bulletproof, but better than maintaining forks of
nixpkgs.
- Set systemd's DefaultTimeoutStartSec=15min, so nix's "backdoor" test
service doesn't time out on the slow boot.
2019-07-07 21:47:09 -06:00
Joey Hewitt
05d963e751 lower dhparam bits, for faster tests
Make a tests/lib/config.nix file that is imported into the configuration
of all testing VMs.
2019-07-06 21:08:26 -06:00
Robin Raymond
72e79e5c38 fix minimal test 2019-05-03 14:13:22 +02:00
Robin Raymond
91ce33f0e0 Merge branch 'eqyiel/nixos-mailserver-clamav-db-in-lfs' 2018-11-10 14:37:53 +01:00
plchldr
fa0541b96b remove Diffie Hillman parameter creation as it is handled by the upstream dovecot2 module as of 18.09 2018-10-30 17:56:25 +01:00
Ruben Maher
9488b6fd43 ci: store Clamav DB in LFS
Fix #136 (stop pulling the files from @griff's poor server), also add a script
to update the files.

The fun thing about this is that due to sourcing the files from
`https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/raw/master/tests/clamav`
during the tests, updates to the `hashes.json` and `*.cvd` files will always
fail CI.  I guess this is a reasonable tradeoff as long as people are aware of
it.
2018-08-18 15:13:25 +09:30
Brian Olsen
61df799036 dovecot: Add spam filter traning using imapsieve 2018-06-29 21:36:34 +09:30
Brian Olsen
1c76e0a119 tests: Add ClamAV test and fix errors in virus scanning 2018-06-29 21:36:34 +09:30
Brian Olsen
7036371f75 Use OpenDKIM instead of rmilter for DKIM
As part of #61 this moves DKIM handling from rmilter to OpenDKIM.
2018-06-29 21:35:16 +09:30
Brian Olsen
0c883d8bcd tests/extern: Fix small errors
1. The lowquota test used the wrong fetchmail username and password
2. When running interactively repeatedly mkdir fails since dir exists
2018-06-29 21:35:16 +09:30
geistesk
386faf960c Fog user's hostname in the Message-ID 2018-04-09 22:14:17 +02:00
Robin Raymond
52b4733f22 log failures 2018-04-08 16:26:15 +02:00
geistesk
c0df22aaae Support for multiple extraVirtualAliases
Should fix #104 by introducing

```
extraVirtualAliases = {
  "single-alias@domain.foobar" = "user1@domain.foobar";
  "multi-alias@domain.foobar" = [
    "user1@domain.foobar" "user2@domain.foobar" ];
};
```
2018-04-03 11:52:03 +02:00
Robert Schütz
23d06c9665 Add test for #94
Ensure that no warnings or errors are in the journal
2018-03-04 23:36:32 +01:00
Robin Raymond
fd3754f43d fix tests 2018-02-18 12:57:06 +01:00
Robin Raymond
436cf0513b add vitual mail users 2018-02-18 12:17:32 +01:00
Robin Raymond
3f6a7d0e0a
Merge pull request #79 from griff/test-cleanup
tests/extern: cleanup and simplification
2018-02-18 11:43:00 +01:00
Brian Olsen
5a93bed70c
tests/extern: cleanup and simplification
The extern test used shell scripting for file writing and ip lookup
which Nix and make-test.nix can do. I have also replaced the 5 second
sleep with the check for completion of queue processing on server.
2018-02-17 15:10:30 +01:00
Ruben Maher
5b570ad5a0 dovecot: read dovecot version into nix variable
This allows determining whether it's OK to use particular configuration
variables that will throw errors when used in older versions.
2018-02-17 22:24:39 +10:30
Robin Raymond
f6546a1a8e fix dovecot 2.3 ssl_dh 2018-02-13 13:18:31 +01:00
Robin Raymond
aca43875dc update copywright 2018-01-29 10:34:27 +01:00
Robin Raymond
3b9b7961d4 remove tests of old userdb; fixes #51 2017-12-25 14:11:39 +01:00
Robin Raymond
6dd51d6e88 add quota test 2017-12-22 16:58:49 +01:00