This is my first Post at serverfault. I hope someone can help me.
My setup looks like this:
I have a RabbitMQ where emails are queued. I've written a small Python tool that retrieves one email at a time from the queue and sends it to the local Postfix. It then waits for acknowledgment (ACK) before fetching a new email from the queue.
However, my challenge is to ensure that the email has been successfully processed by Postfix before sending an ACK to RabbitMQ to confirm the successful processing.
My idea is to trigger the tool (that acks the mail from the rabbitmq. ) once the email has been successfully sent from Postfix.
I'm currently stuck on how to make Postfix trigger my script after the E-Mail has been successfully sent. is there a way to make this work?