rspamd: webui support
This commit is contained in:
parent
d240521c1a
commit
e574070869
|
@ -20,4 +20,6 @@ mailserver_postfixadmin_default_aliases:
|
|||
webmaster: "webmaster@{{ mailserver_mail_domain }}"
|
||||
|
||||
mailserver_rspamd_enabled: true
|
||||
mailserver_rspamd_domain: ""
|
||||
#mailserver_rspamd_webui_password: "" # run `rspamadm pw` for it
|
||||
mailserver_rspamd_dkim_selector: "2020"
|
||||
|
|
|
@ -8,3 +8,8 @@
|
|||
systemd:
|
||||
name: dovecot
|
||||
state: restarted
|
||||
|
||||
- name: restart rspamd
|
||||
systemd:
|
||||
name: rspamd
|
||||
state: restarted
|
||||
|
|
|
@ -13,11 +13,13 @@
|
|||
state: started
|
||||
|
||||
- name: rspamd - create config folder
|
||||
notify: restart rspamd
|
||||
file:
|
||||
path: /etc/rspamd/local.d
|
||||
state: directory
|
||||
|
||||
- name: rspamd - config
|
||||
notify: restart rspamd
|
||||
template:
|
||||
src: "rspamd/{{ item }}"
|
||||
dest: "/etc/rspamd/local.d/{{ item }}"
|
||||
|
@ -27,7 +29,13 @@
|
|||
- dkim_signing.conf
|
||||
- milter_headers.conf
|
||||
- redis.conf
|
||||
#- worker-controller.inc
|
||||
|
||||
- name: rspamd - set webui password
|
||||
notify: restart rspamd
|
||||
when: mailserver_rspamd_webui_password is defined
|
||||
template:
|
||||
src: rspamd/worker-controller.inc
|
||||
dest: /etc/rspamd/local.d/worker-controller.inc
|
||||
|
||||
- name: rspamd - install sieve
|
||||
copy:
|
||||
|
@ -37,6 +45,13 @@
|
|||
- learn-ham.sieve
|
||||
- learn-spam.sieve
|
||||
|
||||
- name: rspamd - nginx local
|
||||
notify: reload nginx
|
||||
when: mailserver_rspamd_domain == ""
|
||||
template:
|
||||
src: rspamd-local.nginx
|
||||
dest: /etc/nginx/local.d/rspamd.act
|
||||
|
||||
- name: rspamd - start and enable on boot
|
||||
systemd:
|
||||
name: rspamd
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
location /rspamd {
|
||||
proxy_pass http://127.0.0.1:11334/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
|
||||
# websocket
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
password = "{{ mailserver_rspamd_webui_password }}";
|
Loading…
Reference in New Issue