Groups | Blog | Home
all groups > iis smtp nntp > december 2004 >

iis smtp nntp : turing of NDRs



security-man
12/12/2004 9:08:16 AM
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
12/12/2004 8:28:27 PM

[quoted text, click to view]

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/default.asp?url=/library/en-us/cdosys/html/_cdosys_sink_example_using_vbscript.asp

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

Frank Hellmann
12/15/2004 4:19:29 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...
[quoted text, click to view]
AddThis Social Bookmark Button