I have rails application running, which send emails using postfix as relay. Here is flow
Rails -> Resque workers -> Postfix -> SES -> email out to clients
my problem is i want to find relation between logs of rails and postfix, to ensure that not even single email is lost and properly sent to recipient.
for example, if rails logs show, email is sent to "Abc@abc.com" then i can check in logs that email is sent to email@example.com, and i want to check the same email in postfix too. Ofcourse it will have an entry there, but to be precise and accurately find that if that specific email was sent using postifx or not? like a recipient can send 100 emails to firstname.lastname@example.org, or may be 50, with different interval of time, so how can i add any special TAG, an ID , or anything in the rails app, that i can trace it in the postifx logs?
I hope problem is clear.