add rspamd spamfilter to ansible
This commit is contained in:
parent
bb71c44aa7
commit
575d43acbd
3 changed files with 22 additions and 1 deletions
|
@ -11,6 +11,11 @@
|
|||
name: postfix
|
||||
state: restarted
|
||||
|
||||
- name: restart rspamd
|
||||
service:
|
||||
name: rspamd
|
||||
state: restarted
|
||||
|
||||
- name: restart mariadb
|
||||
service:
|
||||
name: mariadb
|
||||
|
@ -51,7 +56,7 @@
|
|||
|
||||
- name: Check if a reboot is needed for debian
|
||||
register: reboot_required_file
|
||||
stat: path=/var/run/reboot-required get_md5=no
|
||||
stat: path=/var/run/reboot-required get_checksum=no
|
||||
|
||||
- name: Reboot the Debian or Ubuntu server
|
||||
reboot:
|
||||
|
@ -82,6 +87,7 @@
|
|||
- default-libmysqlclient-dev
|
||||
- build-essential
|
||||
- postfix
|
||||
- rspamd
|
||||
- git
|
||||
- pkg-config
|
||||
- npm
|
||||
|
@ -339,6 +345,16 @@
|
|||
notify:
|
||||
- restart postfix
|
||||
|
||||
- name: configure rspamd
|
||||
copy:
|
||||
content: |
|
||||
write_servers = "localhost";
|
||||
read_servers = "localhost";
|
||||
dest: /etc/rspamd/local.d/redis.conf
|
||||
notify:
|
||||
- restart rspamd
|
||||
|
||||
|
||||
- name: UFW allow smtp
|
||||
ufw:
|
||||
rule: allow
|
||||
|
|
|
@ -11,6 +11,8 @@ Restart=always
|
|||
RestartSec=5
|
||||
User=www-data
|
||||
Group=www-data
|
||||
StandardOutput=append:/var/www/c3lf-sys3/service.info.log
|
||||
StandardError=append:/var/www/c3lf-sys3/service.error.log
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -48,3 +48,6 @@ maillog_file = /var/log/mail.log
|
|||
|
||||
virtual_mailbox_domains = {{ mail_domain }}
|
||||
virtual_transport=c3lf-sys3:unix:/var/www/c3lf-sys3/lmtp.sock
|
||||
|
||||
smtpd_milters = inet:localhost:11332
|
||||
milter_default_action = accept
|
Loading…
Reference in a new issue