IIS and SMTP - turing of NDRs

This is Interesting: Free IT Magazines  
Home > Archive > IIS and SMTP > December 2004 > turing of NDRs





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 turing of NDRs
security-man

2004-12-12, 6:36 pm

All
I am pretty new to Microsoft SMTP. I have a server with MS SMTP service
running acting as our MTA. This servrer is configured as relay to our
internal lotus notes mail server. So a mail from intenet for
abc@mydomain.com comes to the server with MS Smtp service running and
then forwards to lotus notes server which then looks at the mail
address and delivers to appropriate users mailbox. THe problem i see is
that we get a lot of spam addressed to e-mial addressed that do not
exist on lotus notes servers, as a result when there is a mail sent
from the intennet to xyz@mydomain.com i see at the packet level lotus
notes server replying to MS SMTP Service an "error 550 No such user"
and the SMTP service in turns replies with NDR to the originator. I
would like to turn of NDR on the SMTP service.
Is there any setting i need to modify so that this can become
effective. I could not find anything on MS site which explains how to
solve this issue.
Anybody have any clues/suggestions, please let me know

RK

m.marien

2004-12-12, 9:35 pm


"security-man" <rkejariwal@gmail.com> wrote in message
news:1102871295.983510.309500@f14g2000cwb.googlegroups.com...
> All
> I am pretty new to Microsoft SMTP. I have a server with MS SMTP service
> running acting as our MTA. This servrer is configured as relay to our
> internal lotus notes mail server. So a mail from intenet for
> abc@mydomain.com comes to the server with MS Smtp service running and
> then forwards to lotus notes server which then looks at the mail
> address and delivers to appropriate users mailbox. THe problem i see is
> that we get a lot of spam addressed to e-mial addressed that do not
> exist on lotus notes servers, as a result when there is a mail sent
> from the intennet to xyz@mydomain.com i see at the packet level lotus
> notes server replying to MS SMTP Service an "error 550 No such user"
> and the SMTP service in turns replies with NDR to the originator. I
> would like to turn of NDR on the SMTP service.
> Is there any setting i need to modify so that this can become
> effective. I could not find anything on MS site which explains how to
> solve this issue.
> Anybody have any clues/suggestions, please let me know
>


I had the same problem. There is no way to turn off the NDR that the SMTP
server generates and tries to deliver. However, there are a couple of things
that you can do. First, if you can, have Lotus Notes silently discard the
"error 550 No such user" messages and not send them back to the SMTP server.
If that's not possible, you can use a SMTP sink to silently discard the
messages at the SMTP server.

Here is a script that you can run on the SMTP server that will catch all the
NDR's and silently drop them. It only deletes the NDR's coming from your
domain. Be sure to change the one line wth the your.domain.name.here. You
can delete the code that writes the log file. It only helps to make sure
it's working properly.

<SCRIPT LANGUAGE="VBScript">

Const cdoRunNextSink = 0
Const cdoSkipRemainingSinks = 1
Const cdoStatAbortDelivery = 2
Const cdoStatBadMail = 3

Sub IEventIsCacheable_IsCacheable()
' just returns S_OK
End Sub

Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)

If Msg.Subject = "Delivery Status Notification (Failure)" and InStr
(Msg.From, "postmaster@your.domain.name.here") Then

Dim Flds
Set Flds = Msg.EnvelopeFields

Flds("http://schemas.microsoft.com/cdo/smtpenvelope/messagestatus") =
cdoStatAbortDelivery
Flds.Update

EventStatus = cdoSkipRemainingSinks

' write a log file --------------------------------------------
Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
Dim file
Set file = fs.OpenTextFile("C:\InetPub\ndr.log", 8, True )
file.Write "NDR deleted: " & Msg.To & vbCrLf
file.Close
' end of write a log file -------------------------------------

Else
EventStatus = cdoRunNextSink
End If

End Sub
</SCRIPT>

You can register the sink using the instructions here:
http://msdn.microsoft.com/library/d...ng_vbscript.asp

You need the "smtpreg.vbs" code from MS.


Frank Hellmann

2004-12-15, 6:38 pm

Why dont you have a look at our Aloaha?
Its a transparent SMTP Proxy which has quite big advantages such as saving
you traffic/bandwith and keeps your badmail clean :-) Just have a look.
Filter such as
SPF and RBL Lists remain freeware after 30 days
Frank


"security-man" <rkejariwal@gmail.com> schrieb im Newsbeitrag
news:1102871295.983510.309500@f14g2000cwb.googlegroups.com...
> All
> I am pretty new to Microsoft SMTP. I have a server with MS SMTP service
> running acting as our MTA. This servrer is configured as relay to our
> internal lotus notes mail server. So a mail from intenet for
> abc@mydomain.com comes to the server with MS Smtp service running and
> then forwards to lotus notes server which then looks at the mail
> address and delivers to appropriate users mailbox. THe problem i see is
> that we get a lot of spam addressed to e-mial addressed that do not
> exist on lotus notes servers, as a result when there is a mail sent
> from the intennet to xyz@mydomain.com i see at the packet level lotus
> notes server replying to MS SMTP Service an "error 550 No such user"
> and the SMTP service in turns replies with NDR to the originator. I
> would like to turn of NDR on the SMTP service.
> Is there any setting i need to modify so that this can become
> effective. I could not find anything on MS site which explains how to
> solve this issue.
> Anybody have any clues/suggestions, please let me know
>
> RK
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com