I would like to inject a tracking header in an email before it is sent.
Nothing malicious, just something I can use to uniquely identify a
specific email that was sent from our server's web application.

Here's the use case narrative:

We build web based applications where we need to be able to audit: "Did
so-and-so get an email?" When the user is outside our system, the only
thing we can verify is that the recipient server on the other end
responded with a 250 OK. So, I need to be able to pair that 250 OK
response with a specific email that was generated out of our system.

To do that, I am planning on writing a milter in python that will look
at the headers (before or after it is sent, I haven't decided on that),
and then figure out the post-send disposition (250 OK, 550 5.7.1
Rejected, etc...) and update the database.

My current thought on how to do this would be to add a header to the
email that corresponds to the id that email has in the database. Just an
integer value. (THe secuirty guy in me says use a nonce instead. It
could be either).

So, the first part of my task is: can I add a header to the email that
will safely be ignored by everything? Something like: "X-Tracking:
1234\r\n"?

If the answer to that is "Yes", then my next task will be to research
what hooks are available for a miter to look at the results of a sent
mail so I can get the remote server response to store in the database.

Does anyone have any thoughts on this?

I am completely open to scrapping my current idea and adopting a better
way. I have no pride in the concept. I just want something that works
well and is an elegant approach.

Thanks in advance,
Michael

-- 
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

Reply via email to