Commit Graph

46 Commits

Author SHA1 Message Date
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
Ruben Maher 51058db71e tests/extern: assert catchall doesn't steal from existing accounts 2017-12-20 10:48:58 +10:30
Robin Raymond ce7ad83402 add test for explicit catchAlls #49 2017-12-18 12:27:15 +01:00
Robin Raymond bdf93b0ee6 add test for issue #43 2017-11-26 11:57:39 +01:00
Robin Raymond a7396c5b25 add test for valiases 2017-11-21 11:36:04 +01:00
Ruben Maher cd85fd9d2f s/vmailUIDStart/vmailUID/g
The name vmailUIDStart is not consistent with how it is being used (as the UID
of the vmail user).
2017-11-19 07:10:49 +10:30
Robin Raymond 4708654ef9 remove output from fetchmail in test 2017-11-11 16:07:48 +01:00
Robin Raymond db3812c329 add test for multidomain dkim 2017-11-11 16:07:03 +01:00
Robin Raymond f8309d5b76 add second domain to test 2017-11-11 14:12:16 +01:00
John Boehr 16fb41de01 Change domain to fqdn and extraDomains to domains 2017-11-11 09:45:06 +00:00
Robin Raymond 695779926a add test for vmail gid 2017-11-05 11:14:39 +01:00
Matthew Bauer 613f9c8ce0 Switch to nixpkgs-unstable channel.
see travis-ci/travis-ci#8483
2017-09-22 12:50:06 -05:00
Robin Raymond 82cf8db01d add test for sensitive data 2017-09-20 15:31:23 +02:00
Robin Raymond 7c1e153d85 add sending and receiving by imap test 2017-09-14 19:58:57 +02:00
Robin Raymond 561d5e3907 seperate tests into intern and extern
also add extern imap test
2017-09-13 18:25:02 +02:00
Robin Raymond c83143d0c7 add user password test 2017-09-13 10:16:18 +02:00
Robin Raymond ae4a7638ad update stale reference 2017-09-13 10:15:35 +02:00
r-raymond 98c962cab4 remove stale comment 2017-09-01 13:18:17 +02:00
Robin Raymond b22860b65a add testing framework 2017-09-01 13:16:30 +02:00