tldr: I want to be able to stick a filter / milter AFTER smtp(8) so I can save the remote server response code and associate it with an email that was sent so my PHP application can display the status of a notification sent to a user.
Looking for docs on how to do this. Long story / background / additional info: I have an automated bug tracker that sends email notifications to users when something they are working on needs their attention. Sometimes, people complain they don't get the messages. So, I end up going through mail.log to see what the problem is, and invariably, I see the email was sent to their address with a "250 OK Queued as..." response, which means it's not my problem. So, here's the question: I would like to add a python script that would be able to read / store the remote server responses for a given message. I will stuff an X-Header into the mail before I send it so that the Python script can associate the exact email with the exact notification that goes out. The point here, is that if a message with X-Header XYZ 1234 was sent, and we received a 250 OK back from the remote server, we know we've done everything we can to deliver the message. It's now outside our network. if, on the other hand, I get something like a 551 5.7.1, we know that something is wrong and we've been classified as spam. Or, as I recently saw with one of our users: 550 5.1.1 user unknown because the user in question is unable to type their own email address properly... .twice. (The form requires you confirm it, so they really had to try to fail). *If I can insert the python script as a filter (or milter?) AFTER smtp(8), that would be perfect. I could read the X-header injected by the PHP application to get the message ID as the PHP application knows it by, and then read the response code to find out the disposition of the message.* ** Where in the docs can I find information on doing this? Michael Munger, dCAP, MCPS, MCNPS, MBSS High Powered Help, Inc. Microsoft Certified Professional Microsoft Certified Small Business Specialist Digium Certified Asterisk Professional mich...@highpoweredhelp.com