Hi, I would think you could write a script to do what you need ? Here is one I use that is in Python.
[root@mta3 alf02013]# Summary Usage: Summary -s -h {-|POSTFIX_LOG} [ POSTFIX_LOG .. ] Summarize postfix mail log. Gzipped files are OK. Print one line for each delivered email, with these columns TIME_RECEIVED TIME_SENT ELAPSED QUEUEID SOURCE_IP AUTHENTICATE_USER FINAL_STATUS FROM_ADDR TO_ADDRS OPTIONS -h Print column headers -s Include email subject (if in Postfix log) -ANGELO FAZZINA ITS Service Manager: Spam and Virus Prevention Mass Mailing G Suite/Gmail ang...@uconn.edu University of Connecticut, ITS, SSG, Server Systems 860-486-9075 From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] On Behalf Of j.emerlik Sent: Monday, February 12, 2018 10:07 AM To: postfix-users@postfix.org Subject: Postfix queue Lately I wrote in python postfix policy service that can do something for me what I want. Now I am thinking about next service butI don't know maybe it is not possible. That is my question: There is posssible write some service similar to eg. check_policy_service unix:private/policy-spf It is possible to write some policy service that will be working with postfix queue ? I would like have policy service that will be able to write do data base some information eg. when exactly message was sent, message ID, DSN if soemthing goes wrong. That means it should be working with Postfix queue. But policy services can be configured with smtpd_sender_restrictions and smtpd_recipient_restrictions. It 's possible configure some policy service with postfix queue ? Regards, MattX