Re: [Mailman-Users] Detecting mail with multiple From: lines

2011-05-24 Thread Barry Warsaw
On May 24, 2011, at 11:29 AM, Stephen J. Turnbull wrote:

Barry Warsaw writes:

  What's the legitimate use case for multiple From headers?

Technically, there is none.  RFC 5322 requires exactly one From field,
and that's that.  http://www.ietf.org/rfc/rfc5322.txt, table in
section 3.6.  (Resent-From, of course, is a different kettle of fish.)

However, presumably multiple addresses in the From field (same URL,
section 3.6.2) would have the same effect on Mailman's (current)
filtering strategy.

Actually, I think MM3 could handle either case:

field_values = self.get_all(header, [])
senders.extend(address.lower() for (real_name, address)
   in email.utils.getaddresses(field_values))

-Barry



signature.asc
Description: PGP signature
--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Re: [Mailman-Users] Automating Mailman Archive Maintenance

2011-05-24 Thread C Nulk
I agree with you, Mark.  Unfortunately, as you may know, my Python
skills aren't the best.  I am working on little bits of improvements for
us here as time permits so I use the tools with which I am most familiar.

Since we are using Mailman v2.1.9, we are a bit behind where Mailman
currently sits.  Your gracious help assisted us with the LDAP plus I
have made some custom modifications - one you help with was for Special
Posters and a set of changes to add more logging information to the log
files.  At some point, we will be migrating to at least v2.1.12 or
later, so I need to look at incorporating my mods into the later code.
And very little free time to do it.

Thanks again for you help,
Chris

P.S.  While my automation php app isn't the best written thing in the
world, if anyone wants a copy to use as a starting point for conversion
to a Python script, let me know.

On 5/23/2011 3:32 PM, Mark Sapiro wrote:
 C Nulk wrote:
 I have written a small php app which uses the imap libraries to open and
 process the mbox files.  Given a time frame, the app will mark for
 deletion or remove any messages older than the time frame.  Now to write
 a script to call bin/arch for each of the lists I process with my php
 app.  I think I will still shutdown mailman when I run the php app since
 I don't have any way to check on any locks.  Afterwards, I can restart
 Mailman, then call the script to rebuild the archives.

 That should work fine, but if you wrote a Python script, it could use
 Mailman list methods to manage the archive locking and use either
 Python's imaplib or mailbox modules to actually manipulate messages in
 the .mbox.

 --
 Mark Sapiro m...@msapiro.netThe highway is for gamblers,
 San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org