Filter Ip Against Rbl/Rss/Dul And Orbs!

Spam Filter for Lotus Notes
Here is how to do a lookup against MAPS RBL (Realtime Blackhole List), RSS
(Relay Spam Stopper) and DUL (Dial-up List) from within Lotus Notes/Domino.
As a service to the rest of the spam-fighting community, I am making the code
available for everyone to use. Enjoy!

Here we go:
This code require you to run Windows NT (or Windows 95/98/2000) on the computer
where Notes/Domino is running.
First you need a DLL that is used to send ping. I found one called DSPing from
Donia Software (http://www.donia.com/). Just download and install this (free)
lightweight component onto the computer(s) the agent will run on. If you are
going to use a server-based spam-filter, you need to install it on the server.

Now for getting Notes to check if a certain IP is in any of the lists.
You simply do a DNS lookup, and if it returns 127.0.0.x (where x is different
depending on what list you are checking against), the IP is in the list. More
info can be found at http://www.mail-abuse.org/dul/usage.htm. So what you neet
to do is to ping the server and check if you get a response or not. If you do,
the server is listed, otherwise not.

You can download a small Notes database at
http://www.idgnews.net/spamfilter/rsstest.zip with a LotusScript agent that
check a user-supplied IP against the server. Run it and see what it does.
The code is very simple. In the (Declarations) section I have three constants,
the server names for the three lists, and a couple of variable declarations.

At the URL http://www.idgnews.net/spamfilter you can find more samples,
including a modified version of a personal blacklist I found at Notes.net. I
modified it to include lookups against several blacklists.
Const DUL="dialups.mail-abuse.org"
Const RSS="relays.mail-abuse.org"
Const RBL="rbl.maps.vix.com"

Dim IP As String
Dim dot1 As Integer
Dim dot2 As Integer
Dim dot3 As Integer
Dim IP1 As String
Dim IP2 As String
Dim IP3 As String
Dim IP4 As String

----- Main Code -----

Sub Initialize
Set Ping = CreateObject( "DSPing.Ping" ) ' Create Object
IP=Inputbox("Test IP","Enter IP as dotted quad:")

' Read the four octets from the IP address


' Put them in reverse order and add e period inbetween and in the end
ReverseIP = IP4 & "." & IP3 & "." & IP2 & "." & IP1 & "."

' Check for RSS entry
Result = Ping.DoPing( ReverseIP & RSS ,1,250 )
If Result = 0 Then
Msgbox "Open Relay!"
Msgbox "Not in RSS"
End If

' Check for RBL entry
Result = Ping.DoPing( ReverseIP & RBL ,1,250 )
If Result = 0 Then
Msgbox "Blacklisted in RBL!"
Msgbox "Not in RBL"
End If

' Check for DUL entry
Result = Ping.DoPing( ReverseIP & DUL ,1,250 )
If Result = 0 Then
Msgbox "Dial-up in DUL!"
Msgbox "Not in DUL"
End If
End Sub

This was first published in November 2000

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.