Merge pull request #115 from Madic-/master

Add pflogsumm cron example
Dieser Commit ist enthalten in:
André Peters 2018-11-12 11:45:09 +01:00 committet von GitHub
Commit a112bd5213
Es konnte kein GPG-SchlĂĽssel zu dieser Signatur gefunden werden
GPG-SchlĂĽssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -5,3 +5,12 @@ docker logs --since 24h $(docker ps -qf name=postfix-mailcow) | pflogsumm
``` ```
The above log output is limited to the past 24 hours. The above log output is limited to the past 24 hours.
It's also possible to create a daily pflogsumm report via cron. Create the file /etc/cron.d/pflogsumm with the following content:
```
SHELL=/bin/bash
59 23 * * * root docker logs --since 24h $(docker ps -qf name=postfix-mailcow) | /usr/sbin/pflogsumm -d today | mail -s "Postfix Report of $(date)" postmaster@example.net
```
Based on the last 24h postfix logs, this example sends every day at 23:59:00 a pflogsumm report to postmaster@example.net.