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 ( 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 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 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 you can find more samples,
including a modified version of a personal blacklist I found at I
modified it to include lookups against several blacklists.
Const DUL=""
Const RSS=""
Const RBL=""

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 last published in November 2000

Dig Deeper on Domino Resources - Part 6

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...