fix(spamassassin): add service user in /etc/default/spamd; for some reason spamd drops to nobody in bookworm

This commit is contained in:
s3lph 2023-07-09 22:26:06 +02:00
parent f3ae8ffe8a
commit e96eddb960
3 changed files with 34 additions and 1 deletions
galaxy.yml
roles/spamassassin
tasks
templates/etc/default

View file

@ -8,7 +8,7 @@ namespace: s3lph
name: mailserver
# The version of the collection. Must be compatible with semantic versioning
version: '0.3.8'
version: '0.3.9'
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md

View file

@ -18,6 +18,15 @@
mode: 0644
notify: restart spamass-milter
- name: render /etc/default/spamd
ansible.builtin.template:
src: etc/default/spamass-milter.j2
dest: /etc/default/spamass-milter
owner: root
group: root
mode: 0644
notify: restart spamd
- name: render /etc/spamassassin/local.cf
ansible.builtin.template:
src: etc/spamassassin/local.cf.j2

View file

@ -0,0 +1,24 @@
{{ ansible_managed | comment }}
# /etc/default/spamd
# Duncan Findlay
# WARNING: please read README.spamd before using.
# There may be security risks.
# Options
# See man spamd for possible options. The -d option is automatically added.
# SpamAssassin uses a preforking model, so be careful! You need to
# make sure --max-children is not set to anything higher than 5,
# unless you know what you're doing.
OPTIONS="--create-prefs --max-children 5 --helper-home-dir -u debian-spamd"
# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Note that this setting is not used when spamd is managed by systemd
PIDFILE="/run/spamd.pid"
# Set nice level of spamd
#NICE="--nicelevel 15"