From bcc39e768191d46388633679d0ef82131e70da27 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 11 Mar 2022 03:56:24 +0300 Subject: [PATCH] Feat(debian/email): Configure `/etc/default/spamassassin` Add `--socketpath`. --- playbooks/roles/debian/email/tasks/main.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/playbooks/roles/debian/email/tasks/main.yml b/playbooks/roles/debian/email/tasks/main.yml index 0ecc3a8..ccf18cc 100644 --- a/playbooks/roles/debian/email/tasks/main.yml +++ b/playbooks/roles/debian/email/tasks/main.yml @@ -6,3 +6,18 @@ name: ['exim4', 'spamassassin', 'spamc'] state: latest update_cache: yes + +- name: Configure /etc/default/spamassassin + become: true + replace: + path: /etc/default/spamassassin + 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 + +handlers: + - name: Restart spamassassin + become: true + service: + name: spamassassin + state: reloaded -- 2.39.5