it is a little complicated
It’s a zabbix-agent script, the jouranl query for the stats works but the offset part doesn’t work well …
at the moment it works somewhat this way (added the logtail part under jounalctl part)
journalctl --no-pager --since '5 min ago' -u postfix@-.service | "${PFLOGSUMM}" -h 0 -u 0 --bounce_detail=0 --deferral_detail=0 --reject_detail=0 --no_no_msg_size --smtpd_warning_detail=0 > "${TEMPFILE}"
"${LOGTAIL}" -f"${TEMPFILE}" -o"${PFOFFSETFILE}"
for i in "${PFVALS[@]}"; do
printvalues "$i"
done
so this part “PFOFFSETFILE=/etc/zabbix/scripts/zabbix-postfix-offset.dat” stores the offset data which is normaly taken from mail.log, but in that case I need to use journalctl …
Above I have used the TEMPFILE for the logtail query so it is not accurate right now …