steps for autoresponder mailbot
This commit is contained in:
@@ -37,6 +37,17 @@
|
||||
dest: etc/services.d/autoreply-editor.ini
|
||||
notify: reload supervisord
|
||||
|
||||
- name: Create autoresponders directory
|
||||
file:
|
||||
path: autoresponders
|
||||
state: directory
|
||||
|
||||
- name: Create autoreply mailbot filter
|
||||
template:
|
||||
src: filter-autoreply.j2
|
||||
dest: .filter-autoreply
|
||||
mode: 0600
|
||||
|
||||
handlers:
|
||||
- name: reread supervisord
|
||||
command: supervisorctl reread
|
||||
|
||||
5
ansible/templates/filter-autoreply.j2
Normal file
5
ansible/templates/filter-autoreply.j2
Normal file
@@ -0,0 +1,5 @@
|
||||
logfile "$HOME/mailfilter-autoreply.log"
|
||||
|
||||
FROM="{{ mail_from }}"
|
||||
|
||||
to "| mailbot -T reply -t $HOME/autoreply-editor/{{ message_file }} -d $HOME/autoresponders/autoresponsedb -N -A 'From: $FROM' /var/qmail/bin/qmail-inject -f ''"
|
||||
Reference in New Issue
Block a user