mailcow-dockerized-docs/docs/manual-guides/Postfix/u_e-postfix-pflogsumm.en.md

22 Zeilen
1.012 B
Markdown

2022-03-24 11:25:12 +01:00
To use pflogsumm with the default logging driver, we need to query postfix-mailcow via docker logs and direct the output to pflogsumm:
```
docker logs --since 24h $(docker ps -qf name=postfix-mailcow) | pflogsumm
```
2022-03-24 11:25:12 +01:00
The above log output is limited to the last 24 hours.
2022-03-24 11:25:12 +01:00
It is also possible to create a daily pflogsumm report via cron. Create the /etc/cron.d/pflogsumm file with the following content:
```
SHELL=/bin/bash
2022-06-12 22:21:04 +02:00
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
```
2022-03-24 11:25:12 +01:00
To work, a local postfix must be installed on the server, which relays to the mailcow postfix.
2023-01-13 18:16:08 +01:00
!!! question
More detailed information can be found in section [Post installation tasks -> Local MTA on Dockerhost](../../post_installation/firststeps-local_mta.en.md).
2022-03-24 11:25:12 +01:00
Based on the postfix logs of the last 24 hours, this example then sends a pflogsumm report to postmaster@example.net every day at 23:59:00.