From d9e603b1af83cb92f5331af5a86bcea4d9b109d2 Mon Sep 17 00:00:00 2001 From: Ubergeek Date: Mon, 13 Jan 2020 08:38:01 -0500 Subject: [PATCH] Moving files to correct spot --- roles/shell/files/etc/cron.daily/postfix_stats | 2 ++ roles/shell/tasks/postfix.yml | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 roles/shell/files/etc/cron.daily/postfix_stats 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 00000000..99ba6681 --- /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 ba909f91..8c53141d 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