[Mailman-Users] Problem enforcing text/plain posts only policy

Mike Noyes mhnoyes at users.sourceforge.net
Tue Jul 16 17:42:50 CEST 2002


On Tue, 2002-07-16 at 07:42, Tim Hutchinson wrote:
> I have recently begun enforcing a plain text only policy based on the 
> instructions in FAQ 3.10: 
> http://www.python.org/cgi-bin/faqw-mm.py?req=all#3.10
> (adding header values to Privacy Options -> Spam-specific posting 
> filters, e.g. Content-Type: .*mixed)
> 
> The problem is that this has cast the net a little too wide.  At least 
> one subscriber use AVG virus protection software, which adds a text 
> attachment to every e-mail.  This results in a header of 
> multipart/mixed, so the post gets held as having a suspicious header.  
> 
> More specifically, an example of a complete Content-type line is
> Content-type: multipart/mixed; 
> boundary="Boundary_(ID_Pcxr7Y3chQ46Gj8lLo/M5A)"; x-avg-checked=avg-ok
> 
> Is there anyway to match against "x-avg-checked", say, so that posts 
> will be held if they include .*mixed, but not x-avg-checked.  I tried
> Content-Type: .*mixed(?!x-avg-checked)
> but this doesn't seem to work.  (I couldn't find any details about the 
> regex syntax that mailman supports.)

Tim,
A (?!...) Python negative lookahead assertion would be the preferred
solution, but I was unable to make it work with Mailman 2.0.x versions.
Barry stated that this will not be the case in 2.1.x.

If anyone knows how to get negative lookahead assertions to work in
Mailman 2.0.x versions, please enlighten me. Thanks.

ref.
http://www.mail-archive.com/mailman-users@python.org/msg09651.html

-- 
Mike Noyes <mhnoyes at users.sourceforge.net>
http://sourceforge.net/users/mhnoyes/
http://leaf-project.org/






More information about the Mailman-Users mailing list