~nka/ansible-role-postfix

77a3769898fb7a8805f4f78d44a21a0859dcb410 — Nicolas KAROLAK a month ago 46b2140 v1.1.3
add pflogsumm
2 files changed, 7 insertions(+), 0 deletions(-)

M defaults/main.yml
M tasks/main.yml
M defaults/main.yml => defaults/main.yml +1 -0
@@ 6,6 6,7 @@ smtp_aliases:
  - vmail: '{{ smtp_admin }}'

smtp_packages:
  - pflogsumm
  - postfix
  - postfix-pgsql


M tasks/main.yml => tasks/main.yml +6 -0
@@ 115,4 115,10 @@
      dbname = {{ smtp_db_name }}
      query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'

- name: setup pflogsumm cronjob
  cron:
    job: '/usr/sbin/pflogsumm -d yesterday --problem_first --rej_add_from -q /var/log/mail.log | /usr/bin/mail -s "Postfix log summary | {{ ansible_hostname }}" {{ smtp_admin }}'
    name: 'send pflogsumm'
    special_time: 'daily'

...