add rspamd spamfilter to ansible

This commit is contained in:
j3d1 2024-06-22 19:51:16 +02:00
parent bb71c44aa7
commit 575d43acbd
3 changed files with 22 additions and 1 deletions

View file

@ -11,6 +11,11 @@
name: postfix name: postfix
state: restarted state: restarted
- name: restart rspamd
service:
name: rspamd
state: restarted
- name: restart mariadb - name: restart mariadb
service: service:
name: mariadb name: mariadb
@ -51,7 +56,7 @@
- name: Check if a reboot is needed for debian - name: Check if a reboot is needed for debian
register: reboot_required_file 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 - name: Reboot the Debian or Ubuntu server
reboot: reboot:
@ -82,6 +87,7 @@
- default-libmysqlclient-dev - default-libmysqlclient-dev
- build-essential - build-essential
- postfix - postfix
- rspamd
- git - git
- pkg-config - pkg-config
- npm - npm
@ -339,6 +345,16 @@
notify: notify:
- restart postfix - 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 - name: UFW allow smtp
ufw: ufw:
rule: allow rule: allow

View file

@ -11,6 +11,8 @@ Restart=always
RestartSec=5 RestartSec=5
User=www-data User=www-data
Group=www-data Group=www-data
StandardOutput=append:/var/www/c3lf-sys3/service.info.log
StandardError=append:/var/www/c3lf-sys3/service.error.log
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -48,3 +48,6 @@ maillog_file = /var/log/mail.log
virtual_mailbox_domains = {{ mail_domain }} virtual_mailbox_domains = {{ mail_domain }}
virtual_transport=c3lf-sys3:unix:/var/www/c3lf-sys3/lmtp.sock virtual_transport=c3lf-sys3:unix:/var/www/c3lf-sys3/lmtp.sock
smtpd_milters = inet:localhost:11332
milter_default_action = accept