summaryrefslogtreecommitdiff
path: root/ansible/roles/mox/templates/domains.conf
blob: bccfab3bffa496b6fde6346664d3376e64606dbb (plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Domains:
	mail.joeac.net:
		ClientSettingsDomain: mail.joeac.net
		LocalpartCatchallSeparator: +
		DKIM:
			Selectors:
				2026a:
					Expiration: 72h
					PrivateKeyFile: dkim/2026a._domainkey.mail.joeac.net.20260705T163220.rsa2048.privatekey.pkcs8.pem
				2026b:
					Expiration: 72h
					PrivateKeyFile: dkim/2026b._domainkey.mail.joeac.net.20260705T163220.rsa2048.privatekey.pkcs8.pem
			Sign:
				- 2026a
		DMARC:
			Localpart: dmarcreports
			Account: me
			Mailbox: DMARC
		MTASTS:
			PolicyID: 20260705T153220
			Mode: enforce
			MaxAge: 24h0m0s
			MX:
				- mail.joeac.net
		TLSRPT:
			Localpart: tlsreports
			Account: me
			Mailbox: TLSRPT

Accounts:
{% for account in email_accounts %}
	{{ account.name }}:
		Domain: mail.joeac.net
		Destinations:
			{{ account.name }}@mail.joeac.net: nil
		SubjectPass:
			Period: 12h0m0s
		RejectsMailbox: Rejects
		AutomaticJunkFlags:
			Enabled: true
			JunkMailboxRegexp: ^(junk|spam)
			NeutralMailboxRegexp: ^(inbox|neutral|postmaster|dmarc|tlsrpt|rejects)
		JunkFilter:
			Threshold: 0.950000
			Params:
				Onegrams: true
				MaxPower: 0.010000
				TopWords: 10
				IgnoreWords: 0.100000
				RareWords: 2
		NoCustomPassword: true
{% endfor %}

MonitorDNSBLs:
	- zen.spamhaus.org
	- bl.spamcop.net

WebHandlers:

{% for subdomain in ( subdomains | selectattr("mox_handler", "eq", "static") ) %}
	-
		LogName: {{ subdomain.name }}.joeac.net
		PathRegexp: ^/
		Compress: true
		Domain: {{ subdomain.full_domain }}
		WebStatic:
			Root: {{ services[subdomain.service].root }}
			ListFiles: {{ "directory_listing" in services[subdomain.service] and services[subdomain.service].directory_listing | lower }}
			ContinueNotFound: true

	-
		LogName: {{ subdomain.name }}.joeac.net
		PathRegexp: ^.*[^(.html)]$
		Compress: true
		Domain: {{ subdomain.full_domain }}
		WebRedirect:
			OrigPathRegexp: ^(.*[^(.html)])$
			ReplacePath: $1/index.html

	-
		LogName: {{ subdomain.name }}.joeac.net
		PathRegexp: ^/.*/index.html$
		Compress: true
		Domain: {{ subdomain.full_domain }}
		WebRedirect:
			OrigPathRegexp: ^(.*)/index.html$
			ReplacePath: $1.html
{% endfor %}

{% for subdomain in ( subdomains | selectattr("mox_handler", "eq", "forward") ) %}
	-
		LogName: {{ subdomain.name }}.joeac.net
		PathRegexp: ^/
		Compress: true
		Domain: {{ subdomain.full_domain }}
		WebForward:
			URL: http://{{ hostvars[services[subdomain.service].host].ansible_host }}:{{ services[subdomain.service].port }}
{% endfor %}