Help writing a Script to forward e-mail

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Mike Perry (_at_)
Date: 10/18/04


Date: Mon, 18 Oct 2004 14:53:29 -0500

As the system administrator for my company any e-mail which is returned as
undeliverable is automatically forwarded to me. If the message was
originally created by an employee they also get a copy of the NDR so I am
not concerned about those but from time to time I get a NDR on a message
that was sent by an automated system (typically an order confirmation
message that is sent to confirm that we recieved an order from the customer
via our e-commerce site) and in that case I have to run an ODBC query on the
database using the intended recipient's e-mail address as the variable to
query for and that gets me the customer number which in turn gets me the
sales person's name and then I have to contact the sales person involved and
notify them that they need to contact their customer and acquire a valid
e-mail address and then update our CRM software with the current e-mail
address.

Seems to me that this can be automated at least to some degree via a
script - I could create a special e-mail inbox and direct bounced messages
to that and then a process could run which would check for messages in this
special mailbox, grab the intended recipient's e-mail address from the NDR
message, query for the sales person's name and then forward that NDR message
to them along with a message from me instructing them to update the
customer's records in our database with a correct e-mail address.

Anyone have any thoughts on a script that would do this? I can write the
VBS that does the query and gets the sales person's name, but I am not sure
how to access the Exchange Server and this special mailbox I would create,
look for any messages, find the intended recipient's e-mail address on those
messages and then instruct Exchange to forward the NDR message along with my
mesage.

Any help steering me in the right direction would be greatly appreciated.



Relevant Pages

  • Help writing a Script to forward e-mail
    ... As the system administrator for my company any e-mail which is returned as ... originally created by an employee they also get a copy of the NDR so I am ... via our e-commerce site) and in that case I have to run an ODBC query on the ... sales person's name and then I have to contact the sales person involved and ...
    (microsoft.public.exchange2000.admin)
  • Re: Help writing a Script to forward e-mail
    ... >originally created by an employee they also get a copy of the NDR so I am ... >via our e-commerce site) and in that case I have to run an ODBC query on the ... >sales person's name and then I have to contact the sales person involved and ... >messages and then instruct Exchange to forward the NDR message along with my ...
    (microsoft.public.scripting.vbscript)
  • Re: Help writing a Script to forward e-mail
    ... >originally created by an employee they also get a copy of the NDR so I am ... >via our e-commerce site) and in that case I have to run an ODBC query on the ... >sales person's name and then I have to contact the sales person involved and ... >messages and then instruct Exchange to forward the NDR message along with my ...
    (microsoft.public.exchange2000.admin)
  • Re: Strange SPAM with no tracks...!?
    ... that are generated by a mail server to ... the destination domain generates a NDR for the recipient ... If the destination domain did a SenderID check and you had SPF records ... A person in our company got this System Administrator Undeliverable email: ...
    (microsoft.public.exchange.admin)
  • Re: 550 sometimes but not others
    ... He MAY be getting all his 5.7.1 NDRs ONLY when he puts "sales" in the ... Exchange mailboxes which he has an account for in Outlook. ... And I REALLY don't understand this: When he receives a 5.7.1 NDR it's ...
    (microsoft.public.windows.server.sbs)