Upload Greylist Whitelist entries from text file

This section contains scripts that hMailServer has contributed with. hMailServer 4 is needed to use these.
Post Reply
bazporter
Normal user
Normal user
Posts: 98
Joined: 2005-06-03 16:14

Upload Greylist Whitelist entries from text file

Post by bazporter » 2006-11-16 10:21

Adding a whole bunch of entries into the Greylist whitelist is not much fun. Here's a little script I wrote with some help from Martin to upload the entries from a tab delimited text file. You just need to set up the paths and your administrator password under User Defined Constants near the top of the file to make this work.

Script updated on 19/11/2006 to allow for comment lines (starting with #), blank lines in the data, and IP addresses without descriptions.

Code: Select all

'********************************************************************
' NAME   :	hMSGreylistInsert.vbs
' VERSION:  0.2
' 
' AUTHOR :	Barry Porter
' DATE   : 	04/11/2006
' MODIFIED: 19/11/2006
' 
' DESCRIPTION: 
' This script will read a list of Greylist entries from a tab delimited
' text file and write them into hMailServer.
' With thanks to cmurphy54 from the hMailServer forum for the debuglogger
' class and the intialise and dispose variables subs.
' 
'********************************************************************

dim DebugLog

'==========================================================================
' User Defined Constants
'
'==========================================================================

' log Directory where Debug log is stored
const cLogDir = "C:\hMailServerScripting\Greylist\"
' Set the name of our debug log file
const cDebugLogName = "GreyListDebug.log"
' If true, debug log is created to help debug
const cDebug = true
' Make it easier to understand file access
const ForReading = 1, ForWriting = 2, ForAppending = 8
' Set the hMailServer Administrator Password
const sAdminPassword = "AdminPassword"
' What is the path and name of the file we want to import the data from?
const cTextInput = "C:\hMailServerScripting\Greylist\Whitelist\NewGreylist.txt"

'==========================================================================
' Variables
'
'==========================================================================

' Initialize our global variables
InitializeVariables

dim oApp, oFSO, oTextInput, oEntries, oEntry
set oApp = CreateObject("hMailServer.Application")
set oFSO = CreateObject("Scripting.FileSystemObject")

' Open the greylist whitelist input file
set oTextInput = oFSO.OpenTextFile(cTextInput, ForReading)

'==========================================================================
' Main
'
'==========================================================================

DebugLog.LogWithTimestamp "Entering GreyList Insertion", DebugLog.IncreaseIndent
DebugLog.log "-- " , Null

' Authenticate the client.
call oApp.Authenticate ("Administrator", sAdminPassword)

' Process the data
do while oTextInput.AtEndOfStream <> true

	sData = oTextInput.ReadLine
	
	' If we have a blank line in the data, ignore the line
	if (sData <> "") then
		
		' Ignore comment lines starting with #
		if (left(sData, 1) <> chr(35)) then
			
			' Split the string into an array
			oData = split(sData, chr(9))
			
			' Check the size of the array to see if we have description data
			oDataSize = UBound(oData, 1)
			
			' Process that data depending on the size of the array
			if oDataSize = 1 then
				sIPData = oData(0)
				sDescData = oData(1)
						
				' Remove quotes around text if already present
				If Left(sDescData, 1) = chr(34) then
					sLen = Len(sDescData) -1
					sDescData = right(sDescData, sLen)
					sLen = Len(sDescData) -1
					sDescData = left(sDescData , sLen)
				end if
				
				DebugLog.log "IP Address : " & sIPData , Null
				DebugLog.log "Description: " & sDescData , Null
				
				' Add the IP Address and Description into the Whitelist
				set oEntries = oApp.Settings.AntiSpam.GreyListingWhiteAddresses  
				set oEntry = oEntries.Add 
				oEntry.IPAddress = sIPData 
				oEntry.Description = sDescData 
				oEntry.Save
				oEntries.Refresh
				set oEntry = nothing
				set oEntries = nothing
			else
				sIPData = oData(0)
				
				DebugLog.log "IP Address : " & sIPData , Null
				
				' Add the IP Address into the Whitelist
				set oEntries = oApp.Settings.AntiSpam.GreyListingWhiteAddresses  
				set oEntry = oEntries.Add 
				oEntry.IPAddress = sIPData 
				oEntry.Save
				oEntries.Refresh
				set oEntry = nothing
				set oEntries = nothing
			end if
		end if
	end If
loop

' Close the input text file
oTextInput.Close

DebugLog.log "Exiting GreyList Insertion" , DebugLog.DecreaseIndent
DebugLog.log "-----" , Null

' Cleanup our variables
set oFSO = nothing
set oApp = nothing
DisposeVariables


'==========================================================================
' Functions and subs
'
'==========================================================================

'==========================================================================
' InitializeVariables: Initialize global variables
'
'==========================================================================
sub InitializeVariables
    'Create our debug logger
    set DebugLog = new DebugLogger
    'Set whether it is enabled or Not
    DebugLog.IsEnabled = cDebug
end Sub

'==========================================================================
' DisposeVariables: Clean up any variables we might have been using
'
'==========================================================================
sub DisposeVariables
    DebugLog.Dispose
    set DebugLog = nothing
end sub

'==========================================================================
' Helper Classes
'
'==========================================================================

'==========================================================================
' DebugLogger: A class To log debug messages. Logging only works
' if IsEnabled = true, otherwise all logging calls are ignored
'==========================================================================
class DebugLogger

    private iLogIndent
    private bLogIsEnabled
    
    public property get IsEnabled
        IsEnabled = bLogIsEnabled
    end property
    
    public property Let IsEnabled(ByVal blnValue)
        bLogIsEnabled = blnValue
    end property
    
    public property get DecreaseIndent
        DecreaseIndent = -1
    end property
    
    public property get IncreaseIndent
        IncreaseIndent = 1
    end property
    
    private property get LogDir
        LogDir = cLogDir
    end property
    
    private property get Indent
        if iLogIndent = "" then
            iLogIndent = 0
        end If
         
        Indent = iLogIndent
    end property
    
    private property let Indent(ByVal iLogValue)
        iLogIndent = iLogValue
    end property
    
    sub Dispose
    
    end sub
    
    private sub IncIndent
        Indent = Indent + 1
    end sub
    
    private sub DecIndent
        if Indent > 0 then
            Indent = Indent - 1
        end If
    end sub
    
    sub LogWithTimestamp( sString, iIndentType )
        log date & " " & Time & "  " & sString, iIndentType
    end sub
    
    sub log( sString, iIndentType )
        if IsEnabled then
            ' We decrease indent immediately
            if iIndentType = DecreaseIndent then
                DecIndent
            end if
            
            set oFs = CreateObject("Scripting.FileSystemObject")
            set oFil = oFs.OpenTextFile( cLogDir & cDebugLogName, ForAppending, true)
            
            for i = 0 to Indent
            oFil.write("  ")
            next
            
            oFil.WriteLine( sString )
            oFil.Close
            set oFil = nothing
            set oFs = nothing
            
            ' We increase indent after
            if iIndentType = IncreaseIndent then
                IncIndent
            end if
        end if
    end sub

end class
The default greylist whitelist entries I have configured were found by doing a Google search and from testing on my server:

Code: Select all

# Default entries for hMailServer Greylist Whitelist
207.171.168.*	Amazon.com (common pool)
207.171.180.*	Amazon.com (common pool)
207.171.187.*	Amazon.com (common pool)
207.171.188.*	Amazon.com (common pool)
207.171.190.*	Amazon.com (common pool)
204.107.120.*	Ameritrade (no retry)
204.107.120.10	Ameritrade (no retry)
205.188.139.136	AOL Outgoing Mail Server
205.188.139.137	AOL Outgoing Mail Server
205.188.144.207	AOL Outgoing Mail Server
205.188.144.208	AOL Outgoing Mail Server
205.188.156.66	AOL Outgoing Mail Server
205.188.157.33	AOL Outgoing Mail Server
205.188.157.34	AOL Outgoing Mail Server
205.188.157.35	AOL Outgoing Mail Server
205.188.157.36	AOL Outgoing Mail Server
205.188.157.37	AOL Outgoing Mail Server
205.188.157.38	AOL Outgoing Mail Server
205.188.157.39	AOL Outgoing Mail Server
205.188.157.40	AOL Outgoing Mail Server
205.188.157.41	AOL Outgoing Mail Server
205.188.157.42	AOL Outgoing Mail Server
205.188.159.7	AOL Outgoing Mail Server
64.12.137.1	AOL Outgoing Mail Server
64.12.137.11	AOL Outgoing Mail Server
64.12.137.2	AOL Outgoing Mail Server
64.12.137.3	AOL Outgoing Mail Server
64.12.137.4	AOL Outgoing Mail Server
64.12.137.5	AOL Outgoing Mail Server
64.12.137.6	AOL Outgoing Mail Server
64.12.137.7	AOL Outgoing Mail Server
64.12.137.8	AOL Outgoing Mail Server
64.12.137.9	AOL Outgoing Mail Server
64.12.138.201	AOL Outgoing Mail Server
64.12.138.202	AOL Outgoing Mail Server
64.12.138.203	AOL Outgoing Mail Server
64.12.138.204	AOL Outgoing Mail Server
64.12.138.206	AOL Outgoing Mail Server
64.12.138.207	AOL Outgoing Mail Server
64.12.138.208	AOL Outgoing Mail Server
66.100.210.82	"appscorp.net, Groupwise?"
217.158.50.178	AXKit mailing list (unique sender per attempt)
65.82.241.160	"BellSouth.net, Groupwise?"
64.125.132.254	collab.net (unique sender per attempt)
64.125.133.202	collab.net (unique sender per attempt)
68.15.115.88	"cox.com, Groupwise?"
216.157.204.5	"crt.net, Groupwise?"
127.0.0.1	"Private network (Don't delay)"
192.168.1.*	"Private network (Don't delay)"
66.135.197.*	Ebay (common pool)
66.135.209.*	Ebay (for time critical alerts)
216.239.32.*	"gmail.com (common server pool, bad 451 handling?)"
216.239.56.*	"gmail.com (common server pool, bad 451 handling?)"
64.233.162.*	"gmail.com (common server pool, bad 451 handling?)"
64.233.170.*	"gmail.com (common server pool, bad 451 handling?)"
64.233.182.*	"gmail.com (common server pool, bad 451 handling?)"
64.233.184.*	"gmail.com (common server pool, bad 451 handling?)"
66.249.82.*	"gmail.com (common server pool, bad 451 handling?)"
72.14.204.*	"gmail.com (common server pool, bad 451 handling?)"
204.60.8.162	"greywolftech.com, Groupwise?"
12.107.209.244	"kernel.org mailing lists (high traffic, unique sender per mail)"
12.107.209.244	"kernel.org mailing lists (high traffic, unique sender per mail)"
66.27.51.218	ljbtc.com (Groupwise)
64.124.204.39	moveon.org (unique sender per attempt)
84.45.71.76	MyFujiMail server (bad 451 handling)
213.136.52.31	Mysql.com (unique sender)
211.29.132.*	optusnet.com.au (wierd retry pattern and more than 48hrs)
66.206.22.82	PLEXOR
66.206.22.83	PLEXOR
66.206.22.84	PLEXOR
66.206.22.85	PLEXOR
207.115.63.*	Prodigy (broken software that retries continually with no delay)
205.206.231.*	SecurityFocus.com (unique sender per attempt)
205.211.164.50	sentex.ca (common pool)
64.7.153.18	sentex.ca (common pool)
195.238.2.105	"skynet.be (wierd retry pattern, common pool)"
195.238.2.124	"skynet.be (wierd retry pattern, common pool)"
195.238.3.12	"skynet.be (wierd retry pattern, common pool)"
195.238.3.13	"skynet.be (wierd retry pattern, common pool)"
63.82.37.110	SLmail
209.132.176.174	"sourceware.org mailing lists (high traffic, unique sender per mail)"
12.5.136.141	"Southwest Airlines (unique sender, no retry)"
12.5.136.142	"Southwest Airlines (unique sender, no retry)"
12.5.136.143	"Southwest Airlines (unique sender, no retry)"
12.5.136.144	"Southwest Airlines (unique sender, no retry)"
63.169.44.143	"Southwest Airlines (unique sender, no retry)"
63.169.44.144	"Southwest Airlines (unique sender, no retry)"
209.104.63.*	Ticketmaster (poor retry config)
195.235.39.19	Tid InfoMail Exchanger v2.20
66.162.216.166	"twtelecom.net, Groupwise?"
66.89.73.101	"xo.com, Groupwise?"
66.163.187.*	"Yahoo Groups servers (common pool, no retry)"
66.218.66.*	"Yahoo Groups servers (common pool, no retry)"
66.218.67.*	"Yahoo Groups servers (common pool, no retry)"
66.218.69.*	"Yahoo Groups servers (common pool, no retry)"
66.94.237.*	"Yahoo Groups servers (common pool, no retry)"
216.136.226.*	"Yahoo Mail servers (common pool, no retry)"
216.155.201.64	"Yahoo Mail servers (common pool, no retry)"
216.155.201.65	"Yahoo Mail servers (common pool, no retry)"
And if you are using DynDNS Backup MX you will also need:

Code: Select all

# DynDNS entries for hMailServer Greylist Whitelist
204.13.249.91	mx2-chi1.mailhop.org - DynDNS Backup MX Relay (Don't delay)
204.13.249.92	mx2-chi2.mailhop.org - DynDNS Backup MX Relay (Don't delay)
204.13.250.91	mx2-sjc1.mailhop.org - DynDNS Backup MX Relay (Don't delay)
204.13.250.92	mx2-sjc2.mailhop.org - DynDNS Backup MX Relay (Don't delay)
63.170.10.91	mx2-iad1.mailhop.org - DynDNS Backup MX Relay (Don't delay)
63.170.10.92	mx2-iad2.mailhop.org - DynDNS Backup MX Relay (Don't delay)
Hope this helps.

--
Regards
Barry
Last edited by bazporter on 2006-11-19 14:46, edited 1 time in total.

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Post by ^DooM^ » 2006-11-16 10:48

Nice ;)

Thankyou once again bazporter :)

AJB111
Normal user
Normal user
Posts: 184
Joined: 2005-01-28 05:13
Location: Australia
Contact:

Post by AJB111 » 2006-11-19 00:50

Hi

Firstly, thanks for the script :)

Obviously I have done something wrong, can anyone shed some light on this error when running the script ...

Image

Do While oTextInput.AtEndOfStream <> True

sData = oTextInput.ReadLine
oData = Split(sData, Chr(9))
sIPData = oData(0)
sDescData = oData(1)

' Add quotes around IP Address to make a string
'sIPData = Chr(34) & sIPData & Chr(34)

Line 68 is highlighted above

TIA
Windows Server 2003, IIS6
HMail Server 5.3.1 B1748
MySQL 5.0.67

bazporter
Normal user
Normal user
Posts: 98
Joined: 2005-06-03 16:14

Post by bazporter » 2006-11-19 12:43

Hi AJB111,

There's no error checking built into the script, so if something is wrong with the input file it will throw errors.

Did you add any additional entries to the tab delimited list? If so, you did use a tab between the IP Address and the Description? If there is not a tab character this could cause the error, also if there is no description text the same error will occur..
Are there any blank lines at the end of the tab delimited file? There should only be a carriage return after the last entry in the tab delimited file.

I have posted a copy of the script and the tab delimited file that I know work for you to be able to download here just in case something has gone wrong with the tab delimited file in the copy and paste process from the web.

--
Regards
Barry

bazporter
Normal user
Normal user
Posts: 98
Joined: 2005-06-03 16:14

Post by bazporter » 2006-11-19 14:53

I have just updated the script above to handle blank lines in the data file, comment lines (starting with #), and for IP addresses without descriptions.

Hopefully this should prevent any script errors that might have occurred with the previous version. A new version of the script and default entries lists are available for download from here.

--
Regards
Barry

AJB111
Normal user
Normal user
Posts: 184
Joined: 2005-01-28 05:13
Location: Australia
Contact:

Post by AJB111 » 2006-11-19 23:14

Hi Baz

Thanks for the script and the quick reply ...

I have downloaded the latest script and it ran no problems, will do a check of the two files soon to see what the differences are.

However (there is always one isn't there), when I checked the Whitelist in HMS, I have the following which does not look right ....

Image

It appears the Description has not gone to the correct field.

Other than adding the password, the files are exactly as downloaded

This is the DebugLog after the insertion:

20/11/2006 6:54:29 AM Entering GreyList Insertion
--
IP Address : 207.171.168.* Amazon.com (common pool)
IP Address : 207.171.180.* Amazon.com (common pool)
IP Address : 207.171.187.* Amazon.com (common pool)
IP Address : 207.171.188.* Amazon.com (common pool)
IP Address : 207.171.190.* Amazon.com (common pool)
IP Address : 204.107.120.* Ameritrade (no retry)
IP Address : 204.107.120.10 Ameritrade (no retry)
IP Address : 205.188.139.136 AOL Outgoing Mail Server
IP Address : 205.188.139.137 AOL Outgoing Mail Server
IP Address : 205.188.144.207 AOL Outgoing Mail Server
IP Address : 205.188.144.208 AOL Outgoing Mail Server
IP Address : 205.188.156.66 AOL Outgoing Mail Server
IP Address : 205.188.157.33 AOL Outgoing Mail Server
IP Address : 205.188.157.34 AOL Outgoing Mail Server
IP Address : 205.188.157.35 AOL Outgoing Mail Server
IP Address : 205.188.157.36 AOL Outgoing Mail Server
IP Address : 205.188.157.37 AOL Outgoing Mail Server
IP Address : 205.188.157.38 AOL Outgoing Mail Server
IP Address : 205.188.157.39 AOL Outgoing Mail Server
IP Address : 205.188.157.40 AOL Outgoing Mail Server
IP Address : 205.188.157.41 AOL Outgoing Mail Server
IP Address : 205.188.157.42 AOL Outgoing Mail Server
IP Address : 205.188.159.7 AOL Outgoing Mail Server
IP Address : 64.12.137.1 AOL Outgoing Mail Server
IP Address : 64.12.137.11 AOL Outgoing Mail Server
IP Address : 64.12.137.2 AOL Outgoing Mail Server
IP Address : 64.12.137.3 AOL Outgoing Mail Server
IP Address : 64.12.137.4 AOL Outgoing Mail Server
IP Address : 64.12.137.5 AOL Outgoing Mail Server
IP Address : 64.12.137.6 AOL Outgoing Mail Server
IP Address : 64.12.137.7 AOL Outgoing Mail Server
IP Address : 64.12.137.8 AOL Outgoing Mail Server
IP Address : 64.12.137.9 AOL Outgoing Mail Server
IP Address : 64.12.138.201 AOL Outgoing Mail Server
IP Address : 64.12.138.202 AOL Outgoing Mail Server
IP Address : 64.12.138.203 AOL Outgoing Mail Server
IP Address : 64.12.138.204 AOL Outgoing Mail Server
IP Address : 64.12.138.206 AOL Outgoing Mail Server
IP Address : 64.12.138.207 AOL Outgoing Mail Server
IP Address : 64.12.138.208 AOL Outgoing Mail Server
IP Address : 66.100.210.82 "appscorp.net, Groupwise?"
IP Address : 217.158.50.178 AXKit mailing list (unique sender per attempt)
IP Address : 65.82.241.160 "BellSouth.net, Groupwise?"
IP Address : 64.125.132.254 collab.net (unique sender per attempt)
IP Address : 64.125.133.202 collab.net (unique sender per attempt)
IP Address : 68.15.115.88 "cox.com, Groupwise?"
IP Address : 216.157.204.5 "crt.net, Groupwise?"
IP Address : 127.0.0.1 "Private network (Don't delay)"
IP Address : 192.168.1.* "Private network (Don't delay)"
IP Address : 66.135.197.* Ebay (common pool)
IP Address : 66.135.209.* Ebay (for time critical alerts)
IP Address : 216.239.32.* "gmail.com (common server pool, bad 451 handling?)"
IP Address : 216.239.56.* "gmail.com (common server pool, bad 451 handling?)"
IP Address : 64.233.162.* "gmail.com (common server pool, bad 451 handling?)"
IP Address : 64.233.170.* "gmail.com (common server pool, bad 451 handling?)"
IP Address : 64.233.182.* "gmail.com (common server pool, bad 451 handling?)"
IP Address : 64.233.184.* "gmail.com (common server pool, bad 451 handling?)"
IP Address : 66.249.82.* "gmail.com (common server pool, bad 451 handling?)"
IP Address : 72.14.204.* "gmail.com (common server pool, bad 451 handling?)"
IP Address : 204.60.8.162 "greywolftech.com, Groupwise?"
IP Address : 12.107.209.244 "kernel.org mailing lists (high traffic, unique sender per mail)"
IP Address : 12.107.209.244 "kernel.org mailing lists (high traffic, unique sender per mail)"
IP Address : 66.27.51.218 ljbtc.com (Groupwise)
IP Address : 64.124.204.39 moveon.org (unique sender per attempt)
IP Address : 84.45.71.76 MyFujiMail server (bad 451 handling)
IP Address : 213.136.52.31 Mysql.com (unique sender)
IP Address : 211.29.132.* optusnet.com.au (wierd retry pattern and more than 48hrs)
IP Address : 66.206.22.82 PLEXOR
IP Address : 66.206.22.83 PLEXOR
IP Address : 66.206.22.84 PLEXOR
IP Address : 66.206.22.85 PLEXOR
IP Address : 207.115.63.* Prodigy (broken software that retries continually with no delay)
IP Address : 205.206.231.* SecurityFocus.com (unique sender per attempt)
IP Address : 205.211.164.50 sentex.ca (common pool)
IP Address : 64.7.153.18 sentex.ca (common pool)
IP Address : 195.238.2.105 "skynet.be (wierd retry pattern, common pool)"
IP Address : 195.238.2.124 "skynet.be (wierd retry pattern, common pool)"
IP Address : 195.238.3.12 "skynet.be (wierd retry pattern, common pool)"
IP Address : 195.238.3.13 "skynet.be (wierd retry pattern, common pool)"
IP Address : 63.82.37.110 SLmail
IP Address : 209.132.176.174 "sourceware.org mailing lists (high traffic, unique sender per mail)"
IP Address : 12.5.136.141 "Southwest Airlines (unique sender, no retry)"
IP Address : 12.5.136.142 "Southwest Airlines (unique sender, no retry)"
IP Address : 12.5.136.143 "Southwest Airlines (unique sender, no retry)"
IP Address : 12.5.136.144 "Southwest Airlines (unique sender, no retry)"
IP Address : 63.169.44.143 "Southwest Airlines (unique sender, no retry)"
IP Address : 63.169.44.144 "Southwest Airlines (unique sender, no retry)"
IP Address : 209.104.63.* Ticketmaster (poor retry config)
IP Address : 195.235.39.19 Tid InfoMail Exchanger v2.20
IP Address : 66.162.216.166 "twtelecom.net, Groupwise?"
IP Address : 66.89.73.101 "xo.com, Groupwise?"
IP Address : 66.163.187.* "Yahoo Groups servers (common pool, no retry)"
IP Address : 66.218.66.* "Yahoo Groups servers (common pool, no retry)"
IP Address : 66.218.67.* "Yahoo Groups servers (common pool, no retry)"
IP Address : 66.218.69.* "Yahoo Groups servers (common pool, no retry)"
IP Address : 66.94.237.* "Yahoo Groups servers (common pool, no retry)"
IP Address : 216.136.226.* "Yahoo Mail servers (common pool, no retry)"
IP Address : 216.155.201.64 "Yahoo Mail servers (common pool, no retry)"
IP Address : 216.155.201.65 "Yahoo Mail servers (common pool, no retry)"
Exiting GreyList Insertion
-----

If you need any more information, please let me know, thanks.

Look forward to hearing from you
Windows Server 2003, IIS6
HMail Server 5.3.1 B1748
MySQL 5.0.67

bazporter
Normal user
Normal user
Posts: 98
Joined: 2005-06-03 16:14

Post by bazporter » 2006-11-20 00:04

Hi AJB111,

That is definitely not right.

What version of hMailServer are you using this with? Not that it should matter but I have only tested it with builds 247 and 248. Also what OS are you running as I have been working only on Windows 2000 to date?

I'll do some further tests tomorrow morning and come back to you. The log file clearly shows that the script is not separating the input string correctly into the two fields.

--
Regards
Barry

AJB111
Normal user
Normal user
Posts: 184
Joined: 2005-01-28 05:13
Location: Australia
Contact:

Post by AJB111 » 2006-11-20 02:03

Hi Barry

Thanks again for the quick response.

Thought it did not look right :(

HMail : current 248
OS: Windows 2003

Kind Regards, John
Windows Server 2003, IIS6
HMail Server 5.3.1 B1748
MySQL 5.0.67

bazporter
Normal user
Normal user
Posts: 98
Joined: 2005-06-03 16:14

Post by bazporter » 2006-11-20 07:00

Hi John,

I have tested this on Windows 2000, 2003, and XP now and all works as expected.

I believe that you are probably using a text editor which is configured to automatically replace tabs with spaces. This would give exactly the issues you have seen on your system in both instances.

Please could you check this? If so, you will need to re-download the data files. The easiest way to ensure that you get clean data files is to download the zip from the link above.

--
Regards
Barry

AJB111
Normal user
Normal user
Posts: 184
Joined: 2005-01-28 05:13
Location: Australia
Contact:

Post by AJB111 » 2006-11-20 08:18

Hi Barry
Other than adding the password, the files are exactly as downloaded
I did not even open the White-list, only the vbs to replace the Admin password

I use UltraEdit as my text editor and don't believe it is set that way, but will check and will also re-download the files and try again.

Again, thanks for the script and my apologies for the problems....

Will post back the results
Windows Server 2003, IIS6
HMail Server 5.3.1 B1748
MySQL 5.0.67

AJB111
Normal user
Normal user
Posts: 184
Joined: 2005-01-28 05:13
Location: Australia
Contact:

Post by AJB111 » 2006-11-21 13:37

UPDATE: No problems with script ... works a treat ... Baz Thank you very much.

The problem was in the .vbs file it looked for this file ...
const cTextInput = "C:\hMailServerScripting\Greylist\Whitelist\NewGreylist.txt"

The file contained in the zip is named DefaultGreylist.txt.

Now normally this would have shown up immediately, except I had created a file named NewGreyList.txt as per the original post and it was still in that directory ... so all my fault, should have looked closer and I would have picked it up.

Baz, again, thanks for the script, the obvious work that went in to it and sincere apolgies for any grief !
Windows Server 2003, IIS6
HMail Server 5.3.1 B1748
MySQL 5.0.67

bazporter
Normal user
Normal user
Posts: 98
Joined: 2005-06-03 16:14

Post by bazporter » 2006-11-21 14:22

Hi John,

No problem at all. Glad it's all working as it should for you. Sorry for the change in the file name from the original post.

--
Regards
Barry

Post Reply