diff --git a/roles/shell/files/etc/cron.daily/postfix_stats b/roles/shell/files/etc/cron.daily/postfix_stats new file mode 100644 index 0000000..99ba668 --- /dev/null +++ b/roles/shell/files/etc/cron.daily/postfix_stats @@ -0,0 +1,2 @@ +#!/bin/bash +/usr/sbin/pflogsumm /var/log/mail.log.1 | mail -s "Mail Report for `date +%Y/%m/%d`" postmaster@thunix.net diff --git a/roles/shell/tasks/postfix.yml b/roles/shell/tasks/postfix.yml index ba909f9..8c53141 100644 --- a/roles/shell/tasks/postfix.yml +++ b/roles/shell/tasks/postfix.yml @@ -28,3 +28,11 @@ group: root mode: 0644 +# Deploy cron for reports +- name: Deploy cron reportss + copy: + src: ../files/etc/crond.daily/postfix_stats + dest: /etc/cron.daily/postfix_stats + owner: root + group: root + mode: 0755