-
Notifications
You must be signed in to change notification settings - Fork 1
/
sut.yml
75 lines (74 loc) · 2.97 KB
/
sut.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
- hosts: sut
become: true
roles:
- common
- use-apparmor
- { role: use-nameserver, with_ip: 192.168.56.2, domain: mydomain.test }
- role: mailserver
vars:
mail_domain: mydomain.test
mail_hostname: sut.mydomain.test
mail_mailname: sut.mydomain.test
mail_mailbox_domains:
- mydomain.test
- myotherdomain.test
mail_ssl:
certificate: /etc/ssl/servercerts/mydomain.test.pem
private_key: /etc/ssl/private/mydomain.test.key
generate_certificate_for_test: true
generate_safe_primes_for_dh: false # because generating DSA params is much faster
mail_dkim_keys: # Used for ARC-signing as well
- domain: mydomain.test
selector: key1
private_key: /var/lib/rspamd/dkim/mydomain.test.key1.key
copy_from: sut/dkim/mydomain.test.key1.key
mail_accounts:
- { user: [email protected], password: "{BLF-CRYPT}$2y$10$6W9VYuRklwLg8y2UoP6YHuK5Q8g7g.LOJdSa7K4CgoVMmARNYMVMK" } # Password: changeme
- { user: [email protected], password: "{BLF-CRYPT}$2y$10$wZtIn5uHAsbsMgMmOdBdU.qbRgrQxfeej65G63aUxMaDNEHfb8P2e" } # Password: changeme
mail_mailboxes:
- { name: [email protected], path: /srv/mail/john }
- { name: [email protected], path: /srv/mail/jane }
- { name: [email protected], path: /srv/mail/erika }
mail_aliases:
# Needed as otherwise the catch-all would match:
- { for: [email protected], destination: [email protected] }
- { for: [email protected], destination: [email protected] }
# Catch-all:
- { for: "@mydomain.test", destination: [email protected] }
mail_recipient_restrictions:
- for: [email protected]
action: REJECT This address is not supposed to receive mails!
mail_transports:
- for: [email protected]
nexthop: smtp:theirdomain.test
mail_spam:
greylisting_delay: 4s
thresholds: # Requirement: greylist < add_header < reject
greylist: 4
add_header: 6
reject: 15
controller:
password: $2$c75qgo1b8brudgq7wokg8wxr5qiby84p$ye6ss3ymc4h4u4swk3fhx3ph7jesahqrzw8kkxwhyfb14g4rkfhb # Password: changeme
bind_socket: "*:11334"
allowlist_domain:
- /^alloweddomain.test$/
allowlist_email:
- /ser.*@otheralloweddomain\.test/
mail_send_via:
IPv4: 192.168.56.10
IPv6:
- hosts: sut
become: true
tasks:
- name: Apply some test environment specific settings for rspamd
ansible.builtin.copy:
src: sut/rspamd/settings.conf
dest: /etc/rspamd/local.d/settings.conf
notify:
- Restart rspamd
handlers:
- name: Restart rspamd
ansible.builtin.systemd:
name: rspamd
state: restarted