Move the socket outside of SystemD private `/tmp/`.
-- name: Restart spamassassin
+- name: Restart spamd
become: true
service:
- name: spamassassin
+ name: spamd
state: reloaded
replace:
path: /etc/default/spamd
regexp: '^OPTIONS="--create-prefs --max-children 5 --helper-home-dir"$'
- replace: 'OPTIONS="--create-prefs --max-children 5 --helper-home-dir --socketpath=/tmp/spamassassin.sock"'
- notify: Restart spamassassin
+ replace: 'OPTIONS="--create-prefs --max-children 5 --helper-home-dir --socketpath=/run/spamassassin.sock"'
+ notify: Restart spamd