Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run script after remote delivery

Status
Not open for further replies.

wmjasonward

Programmer
Mar 1, 2007
8
US
Does anyone know of a way to run a script after remotely delivering a message? Specifically, I want to send an email to my user that originated the message showing the status (hopefully sent) of the message they sent. I only want this script to run on messages sent to specified remote addresses.

The return email ideally will specify the message-id, date/time, message size, and the address of the server the message was delivered to, and of course, the result (send/fail/requeued).

Any ideas are greatly appreciated!
 
Yes. My clients system doesn't send delivery receipts and they do not have the ability to turn them on (I think it's a policy issue).

The exact purpose of this is to add to the audit trail. I have an application which generates an email and sends it to a "public folder" on the client system. My application is not a mail server itself so I use my qmail server to handle the delivery. I log (in my application) the hand-off to the qmail server and I would like to be able to log an event from the qmail server saying that it handed the message over to the client's server. Then if one of their people deleted the message I could verify that I did deliver it. A delivery receipt from their system would further strengthen the trail.


It looks like qmail-remote outputs the needed information. I'm looking into putting a wrapper around it to do what I need. If anyone has done something like this before, I'd appreciate any input.

Thanks again!
 
You sound pretty bright. Is re-writing the application to include it's own email/filetransfer capability something that would make more sense?



D.E.R. Management - IT Project Management Consulting
 
I was just thinking that there's a patch called qmail-trap (??).

It's used for situations not unlike your's where evidence of incoming and outgoing email is stored at a specific areas/queue/partition....

I haven't used it personally, but I read good things about it. Since you're looking for "audit" capability (read: don't LITERALLY need to put it in the sender's hand each time, but need to be able to get the evidence when you need it) I would think this might be an option?!

Good luck!

D.E.R. Management - IT Project Management Consulting
 
Yes, TGIF!

Thanks for the link to qmail tap. I should have known Inter7 would have something. It looks like it may be close enough depending on when the copies are sent. I'll dig into the patch later today.

I did consider adding a queue with simple "retry after x seconds" capability to the application. Then I could deliver straight to the client's mail server and handle failures. I may still go that route. But I figured I wasn't the first person who needed an audit trail so I starting looking around...

I'll post my findings and choice(s) for reference.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top