CVS: tmda/TMDA Defaults.py,1.190,1.191 Pending.py,1.27,1.28

Jim Ramsay <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda/TMDA
In directory sc8-pr-cvs1:/tmp/cvs-serv31762

Modified Files:
	Defaults.py Pending.py 
Log Message:
Added variable PENDING_WHITELIST_RELEASE which for now may be:
 0 (do not release when whitelisting)
 1 (release current message when whitelisting)
 (1 is default)

Implemented this in Pending.py, and tested briefly with tmda-pending


Index: Defaults.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Defaults.py,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -r1.190 -r1.191
--- Defaults.py	9 Jan 2004 19:36:26 -0000	1.190
+++ Defaults.py	10 Jan 2004 18:15:12 -0000	1.191
@@ -1213,6 +1213,22 @@
 if not vars().has_key('PENDING_WHITELIST_APPEND'):
     PENDING_WHITELIST_APPEND = None
 
+# PENDING_WHITELIST_RELEASE
+# An option detailing the action taken when 'Whitelist' is the 
+# current action in tmda-pending or tmda-cgi
+#
+# Available options:
+#
+# 0 - 'Whitelist' does not release any messages, only appends
+#     the envelope sender to PENDING_WHITELIST_APPEND
+#
+# 1 - 'Whitelist' releases the current message and also appends
+#     the envelope sender to PENDING_WHITELIST_APPEND
+#
+# Default is 1
+if not vars().has_key('PENDING_WHITELIST_RELEASE'):
+    PENDING_WHITELIST_RELEASE = 1
+
 # ADDED_HEADERS_CLIENT
 # A Python dictionary containing one or more header:value string pairs
 # that should be added to _all_ outgoing client-side messages (i.e,

Index: Pending.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Pending.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- Pending.py	1 Jan 2004 23:22:19 -0000	1.27
+++ Pending.py	10 Jan 2004 18:15:13 -0000	1.28
@@ -470,6 +470,8 @@
         if Defaults.PENDING_WHITELIST_APPEND:
             Util.append_to_file(self.append_address,
                                 Defaults.PENDING_WHITELIST_APPEND)
+            if Defaults.PENDING_WHITELIST_RELEASE == 1:
+                self.release()
         else:
             raise Errors.ConfigError, \
                   'PENDING_WHITELIST_APPEND not defined!'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.