Cronmails: Fix rejected mails b/c of non FQDNs in sender
This commit is contained in:
parent
42a2bd8a60
commit
d6fee609e4
5 changed files with 19 additions and 3 deletions
|
@ -30,13 +30,19 @@
|
|||
src: "{{ role_path }}/templates/update-exim4.conf.conf"
|
||||
dest: /etc/exim4/update-exim4.conf.conf
|
||||
register: cronmails_conffile_update
|
||||
- name: cronmails - Set /etc/mailname
|
||||
become: yes
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/mailname
|
||||
content: "{{ exim_etc_mailname }}"
|
||||
register: cronmails_mailname_update
|
||||
- name: cronmails - Run update-exim4.conf
|
||||
become: yes
|
||||
ansible.builtin.shell: "update-exim4.conf"
|
||||
when: cronmails_conftmp_update.changed or cronmails_conffile_update.changed
|
||||
when: cronmails_conftmp_update.changed or cronmails_conffile_update.changed or cronmails_mailname_update.changed
|
||||
- name: cronmails - Enable and start exim4
|
||||
become: yes
|
||||
ansible.builtin.service:
|
||||
name: exim4
|
||||
state: started
|
||||
state: restarted
|
||||
enabled: yes
|
||||
|
|
|
@ -23,3 +23,10 @@
|
|||
name: MAILTO
|
||||
env: yes
|
||||
value: "{{ cron_email }}"
|
||||
- name: cronmails - Add monthly test mail
|
||||
become: yes
|
||||
ansible.builtin.cron:
|
||||
name: "Monthly Test Mail"
|
||||
minute: "0"
|
||||
day: "1"
|
||||
job: echo "Monthly cron test mail"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue