summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/MimeDel.py
Commit message (Collapse)AuthorAgeFilesLines
* Reorganize doctests, moving handler documentation into Mailman/handlers/docs.Barry Warsaw2008-01-241-261/+0
| | | | Rename all handlers to be more PEP 8 friendly, i.e. lowercased.
* Reorganize the qrunner infrastructure. First, the package has been renamedBarry Warsaw2007-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | from Mailman.Queue to Mailman.queue (note the case change to be more PEP 8 compliant). The Switchboard and Runner classes have been moved into the package __init__.py and the previous class modules have been removed. The switchboard cache is removed; I don't think it was ultimately buying us much. Now, just import the Switchboard class and instantiate it directly. Added an IRunner interface. Renamed the ArchRunner to ArchiveRunner. bin/qrunner and bin/mailmanctl are updated accordingly. For the former, it no long accepts -r=All to run all qrunners. You can still use the short name (e.g. --runner=incoming) to run the built-in queue runners, but this design will eventually allow for plugin qrunners by allowing them to be run specifying the full package path to the class. It also now accepts a leading dot to indicate a qrunner class relative to the Mailman.queue package.
* Update copyright years.bwarsaw2007-01-191-1/+1
|
* Fix test_message.py by finishing the wind-through of the configuration objectbwarsaw2006-07-081-6/+6
| | | | | | | | | | | | | | | | and fixing the invocation and shutdown of mailmanctl. While the tests in this module work individually, they do not yet work as a group. -C added to testall.py, and mailmanctl now passes that flag on to qrunner. UserNotification sets reduced_list_header in the msgdata, but the behavior of this flag has changed. It used to suppress List-Help, List-Subscribe, and List-Unsubscribe as well as List-Post and List-Archive. However, List-Help, List-Subscribe and List-Unsubscribe should definitely be included in UserNotifications, and List-Post has a different variable controlling it now. Therefore, always add List-Help, List-Subscribe, and List-Unsubscribe. Some style updates to Message.py
* - Convert all logging to Python's standard logging module. Get rid of allbwarsaw2006-04-171-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | traces of our crufty old Syslog. Most of this work was purely mechanical, except for: 1) Initializing the loggers. For this, there's a new module Mailman/loginit.py (yes all modules from now on will use PEP 8 names). We can't call this 'logging.py' because that will interfere with importing the stdlib module of the same name (can you say Python 2.5 and absolute imports?). If you want to write log messages both to the log file and to stderr, pass True to loginit.initialize(). This will turn on propagation of log messages to the parent 'mailman' logger, which is set up to print to stderr. This is how bin/qrunner works when not running as a subprocess of mailmanctl. 2) The driver script. I had to untwist the StampedLogger stuff and implement differently printing exceptions and such to log/error because standard logging objects don't have a write() method. So we write to a cStringIO and then pass that to the logger. 3) SMTPDirect.py because of the configurability of the log messages. This required changing SafeDict into a dict subclass (which is better than using UserDicts anyway -- yay Python 2.3!). It's probably still possible to flummox things up if you change the name of the loggers in the SMTP_LOG_* variables in mm_cfg.py. However, the worst you can do is cause output to go to stderr and not go to a log file. Note too that all entry points into the Mailman system must call Mailman.loginit.initialize() or the log output will go to stderr (which may occasionally be what you want). Currently all CGIs and qrunners should be working properly. I wish I could have tested all code paths that touch the logger, but that's infeasible. I have tested this, but it's possible that there were some mistakes in the translation. - Mailman.Bouncers.BounceAPI.Stop is a singleton, but not a class instance any more. - True/False code cleanup, PEP 8 import restructuring, whitespace normalization, and copyright year updates, as appropriate.
* Port cleaning changes forward from 2.1-maint branch.bwarsaw2005-12-301-2/+2
|
* One more little change. One day I'll learn not to commit until I'm REALLY done.msapiro2005-11-281-5/+1
|
* Fix bug 1367783 - decode base64 and quoted-printable HTML parts when passing ↵msapiro2005-11-271-1/+6
| | | | to mm_cfg.HTML_TO_PLAIN_TEXT_COMMAND
* back porting from 2.1.6tkikuchi2005-08-281-8/+46
|
* FSF office has moved. chdcking in for MAIN branch.tkikuchi2005-08-271-1/+1
|
* When content filtering, we may not always want to just discard thebwarsaw2002-10-081-3/+35
| | | | | | | | | | | message. This is especially the case when debugging your filtering rules. To support this we now have a "filter action" which can be Discard, Reject, Forward to Admin, Preserve on disk. process(): Call dispose() when we want to chuck the message. dispose(): New function which disposes of a matching message based on filter_action.
* process(): Typo detected by Michael Meltzer; mtype will never be equalbwarsaw2002-10-071-1/+1
| | | | to multipart/alternative (we meant ctype).
* process(): Correct typo: "multipart" -> "multipart/alternative".bwarsaw2002-08-151-5/+1
| | | | | reset_payload(): Don't hack on the trailing newline here. Probably do it in Decorate.py instead.
* process(): Add support for a whitelisting feature contributed by Danbwarsaw2002-08-151-32/+58
| | | | | | | | | | | | | | | Mick, hacked by Barry (so any bugs are my fault). The idea is that after the filter_mime_types pass is made, if there are any pass_mime_types defined, only parts that match these types are allowed through. reset_payload(): New function, factorization. filter_parts(): Add passtypes to the argument list and do the passtypes filtering. Also, use the new .get_content_type() / .get_content_maintype() interface everywhere.
* process(), to_plaintext(): If the message gets modified, add an X-bwarsaw2002-04-181-1/+12
| | | | header to indicate a change has been made.
* intermediatebwarsaw2002-04-141-0/+155