Update of /cvsroot/mailman/mailman/Mailman
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27304/Mailman
Modified Files:
Tag: Release_2_1-maint
Defaults.py.in MailList.py Version.py versions.py
Log Message:
Merging SF patches:
[ 904850 ] Scrubber in regular delivery per list
[ 1027882 ] filter attachments by filename extensions
and a patch in mailman-dev mailing list
http://mail.python.org/pipermail/mailman-developers/2004-September/017246.html
Index: Defaults.py.in
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Defaults.py.in,v
retrieving revision 2.112.2.17
retrieving revision 2.112.2.18
diff -u -d -r2.112.2.17 -r2.112.2.18
--- Defaults.py.in 17 Sep 2004 03:00:42 -0000 2.112.2.17
+++ Defaults.py.in 3 Oct 2004 06:00:30 -0000 2.112.2.18
@@ -261,6 +261,11 @@
# this True.
SCRUBBER_DONT_USE_ATTACHMENT_FILENAME = False
+# Use of attachment filename extension per se is may be dangerous because
+# virus fakes it. You can set this True if you filter the attachment by
+# filename extension
+SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION = False
+
# This variable defines what happens to text/html subparts. They can be
# stripped completely, escaped, or filtered through an external program. The
# legal values are:
@@ -458,6 +463,7 @@
'Moderate',
'Hold',
'MimeDel',
+ 'Scrubber',
'Emergency',
'Tagger',
'CalcRecips',
@@ -800,6 +806,9 @@
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
"""
+# Scrub regular delivery
+DEFAULT_SCRUB_NONDIGEST = False
+
# Mail command processor will ignore mail command lines after designated max.
DEFAULT_MAIL_COMMANDS_MAX_LINES = 25
@@ -922,11 +931,24 @@
# types regardless of subtype (jpeg, gif, etc.).
DEFAULT_FILTER_MIME_TYPES = []
-# DEFAULT_PASS_MIME_TYPES is a list of MIME types to be passed through. Format is
the same as DEFAULT_FILTER_MIME_TYPES
+# DEFAULT_PASS_MIME_TYPES is a list of MIME types to be passed through.
+# Format is the same as DEFAULT_FILTER_MIME_TYPES
DEFAULT_PASS_MIME_TYPES = ['multipart/mixed',
'multipart/alternative',
'text/plain']
+# DEFAULT_FILTER_FILENAME_EXTENSIONS is a list of filename extensions to be
+# removed. It is useful because many viruses fake their content-type as
+# harmless ones while keep their extension as executable and expect to be
+# executed when victims 'open' them.
+DEFAULT_FILTER_FILENAME_EXTENSIONS = [
+ 'exe', 'bat', 'cmd', 'com', 'pif', 'scr', 'vbs', 'cpl'
+ ]
+
+# DEFAULT_PASS_FILENAME_EXTENSIONS is a list of filename extensions to be
+# passed through. Format is the same as DEFAULT_FILTER_FILENAME_EXTENSIONS.
+DEFAULT_PASS_FILENAME_EXTENSIONS = []
+
# Whether text/html should be converted to text/plain after content filtering
# is performed. Conversion is done according to HTML_TO_PLAIN_TEXT_COMMAND
DEFAULT_CONVERT_HTML_TO_PLAINTEXT = Yes
Index: MailList.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/MailList.py,v
retrieving revision 2.100.2.19
retrieving revision 2.100.2.20
diff -u -d -r2.100.2.19 -r2.100.2.20
--- MailList.py 4 Mar 2004 14:10:28 -0000 2.100.2.19
+++ MailList.py 3 Oct 2004 06:00:30 -0000 2.100.2.20
@@ -335,6 +335,9 @@
self.include_list_post_header = 1
self.filter_mime_types = mm_cfg.DEFAULT_FILTER_MIME_TYPES
self.pass_mime_types = mm_cfg.DEFAULT_PASS_MIME_TYPES
+ self.filter_filename_extensions = \
+ mm_cfg.DEFAULT_FILTER_FILENAME_EXTENSIONS
+ self.pass_filename_extensions = mm_cfg.DEFAULT_PASS_FILENAME_EXTENSIONS
self.filter_content = mm_cfg.DEFAULT_FILTER_CONTENT
self.convert_html_to_plaintext = \
mm_cfg.DEFAULT_CONVERT_HTML_TO_PLAINTEXT
@@ -382,6 +385,8 @@
self.encode_ascii_prefixes = 0
else:
self.encode_ascii_prefixes = 2
+ # scrub regular delivery
+ self.scrub_nondigest = mm_cfg.DEFAULT_SCRUB_NONDIGEST
#
Index: Version.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Version.py,v
retrieving revision 2.51.2.18
retrieving revision 2.51.2.19
diff -u -d -r2.51.2.18 -r2.51.2.19
--- Version.py 18 May 2004 02:14:18 -0000 2.51.2.18
+++ Version.py 3 Oct 2004 06:00:31 -0000 2.51.2.19
@@ -36,7 +36,7 @@
(REL_LEVEL << 4) | (REL_SERIAL << 0))
# config.pck schema version number
-DATA_FILE_VERSION = 90
+DATA_FILE_VERSION = 91
# qfile/*.db schema version number
QFILE_SCHEMA_VERSION = 3
Index: versions.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/versions.py,v
retrieving revision 2.38.2.3
retrieving revision 2.38.2.4
diff -u -d -r2.38.2.3 -r2.38.2.4
--- versions.py 1 Dec 2003 00:58:44 -0000 2.38.2.3
+++ versions.py 3 Oct 2004 06:00:31 -0000 2.38.2.4
@@ -394,6 +394,12 @@
add_only_if_missing('encode_ascii_prefixes', encode)
add_only_if_missing('news_moderation', 0)
add_only_if_missing('header_filter_rules', [])
+ # Scrubber in regular delivery
+ add_only_if_missing('scrub_nondigest', 0)
+ # ContentFilter by file extensions
+ add_only_if_missing('filter_filename_extensions',
+ mm_cfg.DEFAULT_FILTER_FILENAME_EXTENSIONS)
+ add_only_if_missing('pass_filename_extensions', [])
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org