|
Home > Archive > IIS and SMTP > November 2004 > Trying to get DSN notifications with delayed/failed mail
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Trying to get DSN notifications with delayed/failed mail
|
|
| Kelley Kenison 2004-11-23, 8:47 pm |
| For starters, I am trying to find out exactly what the
"urn:schemas:mailheader:disposition-notification-to" field accomplishes when
using CDOSYS to send mail via a local SMTP Virtual Server. Upon inquiring, I
was sent by a Microsoft tech rep to http://support.microsoft.com/?id=302839
for information about receiving Delivery Status Notifications (DSNs) when
mail fails or is delayed. Sadly, using their examples, I have had very little
luck making DSNs work.
I mention the the disposition-notification-to field, because putting a valid
e-mail address in there seems to have no effect. As a matter of fact, whether
the field is there at all seems to make no difference. The only way I can get
a DSN sent anywhere is by using the .Sender property with the message (along
with .DSNOptions), and then, even when I set it for cdoSuccessFailOrDelay, I
only seem to receive a DSN if the mail is sent successfully. If it goes into
the badmail, the DSN goes in there, too, and no one is notified of anything.
And with some test scripts (where the .From,.To and .Sender mails are all
invalid) the mail seems to just disappear, nothing in badmail. This may all
be normal behavior, but it makes programatic notification difficult.
This question is a roundabout way of solving my actual issue, which is:
Are there any tools or code snippets that would let application developers
know if mail has been delayed (say after 15 minutes) or failed being
delivered by the local SMTP server, on a per-app-specific basis? Whoever
writes the code needs a way to be notified if the auto-mail his/her app is
generating is not getting past the first hop (which is the local SMTP Server
running with IIS. From the local server, it does get passed to the corporate
domain mail servers, and they have their own settings for dealing with
delayed/failed mail)
I have heard that FSO may work, but am looking for any kind of solution.
--
Thanks, Kelley
--
Thanks, Kelley
| |
| Ken Schaefer 2004-11-24, 2:59 am |
| a) It is up to the SMTP server to send the Delivery Status Notifications.
All you are doing with your code is putting a header into the SMTP message,
and it is ultimately up to the SMTP server to understand what to do with
this header (that assumes that it even understands what the header is
about).
b) Mail that goes into "badmail" usually is from, or destined for a domain
that the SMTP server can not resolve. You will never get a DSN if the From:
domain can not be resolved (eg it doesn't exist). MS SMTP server can't
validate the from: domain, so it certainly can't send a DSN back to someone
in that from: domain :-)
c) I suspect (and this is just a hunch) that the
disposition-notification-to: header is supported by Exchange server, and not
MS SMTP server. That would explain why you get the "sucess" messages, since
they would be generated by the corporate Exchange servers that your server
is forwarding the mail to. on the other hand, the failure messages being
returned to the Sender: are probably plain Non-Delivery Reports (NDRs), and
these are sent by all SMTP servers that I'm aware of, either to the Sender:
or to the Reply-To:
Cheers
Ken
"Kelley Kenison" <wolfstorm57@community.nospam> wrote in message
news:6BFFFC04-2EFD-4B5D-963C-47357C0F0AE1@microsoft.com...
> For starters, I am trying to find out exactly what the
> "urn:schemas:mailheader:disposition-notification-to" field accomplishes
> when
> using CDOSYS to send mail via a local SMTP Virtual Server. Upon inquiring,
> I
> was sent by a Microsoft tech rep to
> http://support.microsoft.com/?id=302839
> for information about receiving Delivery Status Notifications (DSNs) when
> mail fails or is delayed. Sadly, using their examples, I have had very
> little
> luck making DSNs work.
>
> I mention the the disposition-notification-to field, because putting a
> valid
> e-mail address in there seems to have no effect. As a matter of fact,
> whether
> the field is there at all seems to make no difference. The only way I can
> get
> a DSN sent anywhere is by using the .Sender property with the message
> (along
> with .DSNOptions), and then, even when I set it for cdoSuccessFailOrDelay,
> I
> only seem to receive a DSN if the mail is sent successfully. If it goes
> into
> the badmail, the DSN goes in there, too, and no one is notified of
> anything.
> And with some test scripts (where the .From,.To and .Sender mails are all
> invalid) the mail seems to just disappear, nothing in badmail. This may
> all
> be normal behavior, but it makes programatic notification difficult.
>
> This question is a roundabout way of solving my actual issue, which is:
>
> Are there any tools or code snippets that would let application developers
> know if mail has been delayed (say after 15 minutes) or failed being
> delivered by the local SMTP server, on a per-app-specific basis? Whoever
> writes the code needs a way to be notified if the auto-mail his/her app is
> generating is not getting past the first hop (which is the local SMTP
> Server
> running with IIS. From the local server, it does get passed to the
> corporate
> domain mail servers, and they have their own settings for dealing with
> delayed/failed mail)
>
> I have heard that FSO may work, but am looking for any kind of solution.
> --
> Thanks, Kelley
> --
> Thanks, Kelley
| |
| Kelley Kenison 2004-11-24, 6:26 pm |
| Thanks for responding, Ken.
a) Understood.
b) Domain can be resolved, it's the user names that I make funky for testing.
c) actually my success responses are DSNs (not NDRs) and they do come from
the local SMTP Server (or a remote one if I specify it in the
CDO.Configuration)
I haven't really been able to test a message that's delayed from the local
SMTP Server (not sure how to emulate that). Mail with bad "To" addresses
aren't a real big issue (the corporate servers always send a "Undeliverable"
back to the sender). It's other errors that can make messages go into the
badmail.
Again, what I really hoping to get out of this inquiry was a mechanism for
alerting mail originators if their app has generated badmail, but thanks for
the input.
"Ken Schaefer" wrote:
> a) It is up to the SMTP server to send the Delivery Status Notifications.
> All you are doing with your code is putting a header into the SMTP message,
> and it is ultimately up to the SMTP server to understand what to do with
> this header (that assumes that it even understands what the header is
> about).
>
> b) Mail that goes into "badmail" usually is from, or destined for a domain
> that the SMTP server can not resolve. You will never get a DSN if the From:
> domain can not be resolved (eg it doesn't exist). MS SMTP server can't
> validate the from: domain, so it certainly can't send a DSN back to someone
> in that from: domain :-)
>
> c) I suspect (and this is just a hunch) that the
> disposition-notification-to: header is supported by Exchange server, and not
> MS SMTP server. That would explain why you get the "sucess" messages, since
> they would be generated by the corporate Exchange servers that your server
> is forwarding the mail to. on the other hand, the failure messages being
> returned to the Sender: are probably plain Non-Delivery Reports (NDRs), and
> these are sent by all SMTP servers that I'm aware of, either to the Sender:
> or to the Reply-To:
>
> Cheers
> Ken
>
>
> "Kelley Kenison" <wolfstorm57@community.nospam> wrote in message
> news:6BFFFC04-2EFD-4B5D-963C-47357C0F0AE1@microsoft.com...
>
>
>
|
|
|
|
|