[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[minion-cvs] Make blacklist file less ambiguos; thanks to Noise and ...



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv14188/lib/mixminion

Modified Files:
	test.py 
Log Message:
Make blacklist file less ambiguos; thanks to Noise and Lucky Green for comments

Index: test.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/test.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- test.py	5 Jan 2003 13:19:53 -0000	1.64
+++ test.py	6 Jan 2003 03:26:36 -0000	1.65
@@ -3721,18 +3721,18 @@
 """
 
 EXAMPLE_ADDRESS_SET = """
-User freD
-User  mr-ed
+deny User freD
+Deny User  mr-ed
 # Comment
-Domain sally
-Domain  HOGWARTS.k12
+Deny onehost sally
+DENY onehost  HOGWARTS.k12
 # Another comment, followed by a blank line
-Subdomains  deathstar.gov
-Subdomains selva-Oscura.it
-Domain selva-Oscura.it
+dENY allhosts  deathstar.gov
+deny allhosts selva-Oscura.it
+deny onehost selva-Oscura.it
 
-Address  jim@sMith.com
-Pattern    /nyet.*Nyet/
+deny Address  jim@sMith.com
+deny pattern    /nyet.*Nyet/
 
 """
 
@@ -3769,7 +3769,7 @@
             has(set,"octavio.nyet.jones@nyet.net")
             has(set,"octavio.jones@nyet.nyet.net")
 
-            # Basic tfunctinoality: Don't match anything else.
+            # Basic functinoality: Don't match anything else.
             hasNo(set,"mojo@jojo.com")
             hasNo(set,"mr-fred@wilburs-barn.com") # almost by user
             hasNo(set,"joe@sally.com") # almost by domain...
@@ -3793,21 +3793,22 @@
                               mixminion.server.Modules.EmailAddressSet,
                               string=s)
 
-        bad("Address foo@bar@baz")
-        bad("Rumplestiltskin")
-        bad("bob@bob.com")
-        bad("user fred@bob")
-        bad("address foo")
-        bad("domain foo@")
-        bad("domain @foo")
-        bad("subdomains foo@bar")
-        bad("pattern a.*b")
-        bad("pattern /a.*b")
-        bad("pattern a.*b/")
-        bad("domain")
-        bad("user")
-        bad("pattern")
-        bad("subdomains")
+        bad("Address foo@bar.baz")
+        bad("deny Address foo@bar@baz")
+        bad("deny Rumplestiltskin")
+        bad("deny bob@bob.com")
+        bad("deny user fred@bob")
+        bad("deny address foo")
+        bad("deny onehost foo@")
+        bad("deny onehost @foo")
+        bad("deny allhosts foo@bar")
+        bad("deny pattern a.*b")
+        bad("deny pattern /a.*b")
+        bad("deny pattern a.*b/")
+        bad("deny onehost")
+        bad("deny user")
+        bad("deny pattern")
+        bad("deny allhosts")
 
     def testMixmasterSMTP(self):
         """Check out the SMTP-Via-Mixmaster module.  (We temporarily relace
@@ -3859,7 +3860,7 @@
         """Check out the SMTP module.  (We temporarily relace sendSMTPMessage
            with a stub function so that we don't actually send anything.)"""
         blacklistFile = mix_mktemp()
-        writeFile(blacklistFile, "Domain wangafu.net\nUser fred\n")
+        writeFile(blacklistFile, "Deny onehost wangafu.net\nDeny user fred\n")
 
         manager = self.getManager("""[Delivery/SMTP]
 Enabled: yes