|
Because of the length of the code in this
script I am going to defer you to the
attach
.vbs
file to see the complete script. It includes some additional features
and differences in the code covered above.
The attached script
will log data to the Application log on the system you run it on. At
the beginning of script you can set the
PromptLevel
and
LogLevel
to the level of pop-up
feedback and logging you want in the application log. This will make it
a lot easier to troubleshoot problems in the script.
In addition, the
included script will generate a text file with a list of all the newly
created contacts and why they were created. This will help when looking
for hosts that shouldn?t have been blocked, false positives. When you
find such a host you should delete the contact from the AD and add the
DNS name to the
ValidDomains
list in this script.
In Part 1,
Building your own custom spam filter, we went over creating and
installing a spam filter script for Exchange 2000. One of the
features of this script was that it could query the AD for contacts that
matched the IP address, or class C address, of the host sending the
e-mail. If the contact was found the script assume the message was
spam and prevented it from being sent to your users. The script discussed
in this article allows you to automate the process of creating those contacts based on
the logs created by the script in Part 1 and by even setting up a public
folder that you can have all of your users drop spam messages into.
With both of these script working together, and some manual double
checking of the logs and contacts created, you can greatly reduce the
about of spam coming into your environment.
Code (CreateSPAMHosts.vbs)
Updated 12/5 to fix issue were some contacts weren't be
created
Jason Sherry is a
Windows Infrastructure Architect for Pro Exchange and specialized in the
Active Directory, Exchange, system management and administration, and
scripting. Before coming to Pro Exchange he worked at NetIQ for five
years, where he was a product manager in their administration and
security product line.
Reference Information
-
1)
Spam related web-sites
?
Open Relay Sites
http://www.ordb.org/
http://relays.visi.com
http://relays.osirusoft.com
?
RFC-Ignore ? Since most
spamers don?t follow RFC guidelines for SMTP mail deliver they are
listed here
http://www.rfc-ignorant.org
?
Spamhaus Block List ?
List and information on the worst spamer on the internet
http://www.spamhaus.org
-
2)
Securing Exchange 2000
?
How to prevent
Unsolicited Commercial E-Mail in Exchange 2000 Server (Q319356)
http://support.microsoft.com/default.aspx?scid=kb;en-us;319356
?
How to prevent SMTP
relaying with Microsoft Exchange Server
http://www.slipstick.com/exs/relay.htm
?
How to secure Simple
Message Transfer Protocol Client Message Delivery in Exchange 2000
(Q319267)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;319267
-
3)
Adding Exchange Server Filters
?
XADM: How to Filter Junk
Mail in Exchange 2000
http://support.microsoft.com/default.aspx?scid=kb;en-us;q276321
-
One thing this article fails to mention is that the senders
information is often forged by spam senders so these filters aren?t
that helpful
?
How to Enable or Disable
Message Filtering on a Simple Mail Transfer Protocol Virtual Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q261087
-
4)
Anti-Spam Software for Exchange and Outlook
?
http://www.msexchange.org/software/software.asp?cat=AntiSpam
?
http://www.slipstick.com/addins/content_control.htm
-
5)
Related Articles
?
Rules and tools to filter
junk mail
http://www.slipstick.com/rules/junkmail.htm
?
How to view Internet
Headers
http://www.slipstick.com/mail1/viewheaders.htm
|