1. 25 Nov, 2009 1 commit
    • Barry Warsaw's avatar
      Add a development mode setting which changes the basic behavior of mailman. · a26ed5b0
      Barry Warsaw authored
      The only thing it does currently is force the recipients in the low level
      connection code to a hard-coded address.
      * Fix the inject command's --filename/-f argument
      * Make inject's LISTNAME required
      * When inject reads from stdin, capture C-c and print a nicer message
      * Extend the members command so that blank lines and lines starting with # are
      * members command should not fail when an address is already subscribed.  Just
        warn and continue.
  2. 16 Nov, 2009 1 commit
  3. 26 Aug, 2009 1 commit
  4. 21 Aug, 2009 1 commit
    • Barry Warsaw's avatar
      * Updated NEWS.txt for 3.0a3. · da566eb0
      Barry Warsaw authored
      * Use the IListManager() adapter instead of hanging the list manager off of
        config.db.  This makes the code somewhat cleaner.
  5. 17 Aug, 2009 1 commit
  6. 16 Aug, 2009 1 commit
  7. 09 Aug, 2009 1 commit
  8. 25 Jan, 2009 1 commit
  9. 17 Jan, 2009 1 commit
    • Barry Warsaw's avatar
      Several important cleanups. · ae3d0cc3
      Barry Warsaw authored
      * Turn on absolute_import and unicode_literals everywhere, and deal with the
      * Use 'except X as Y' everywhere.
      * Make the module prologues much more consistent.
      * Use '{}'.format() consistently, except for logger interface.
      * Because of the problems with calling ** args with unicode keywords, hide
        calls to Template.substitute() behind an API.
  10. 03 Jan, 2009 2 commits
    • Barry Warsaw's avatar
      "Fix" Pipermail in the sense that it doesn't traceback. · 1d0761d2
      Barry Warsaw authored
      Fix some typos in Utils.py
      Fix add_members and list_members
      Add a testing MTA.
    • Barry Warsaw's avatar
      - For command line scripts, -C names the configuration file to use. For · e5a96f14
      Barry Warsaw authored
        convenient testing, if -C is not given, then the environment variable
        MAILMAN_CONFIG_FILE is consulted.
      - Mailing lists no longer have a .web_page_url attribute; this is taken
        from the mailing list's domain's base_url attribute.
      - Incoming MTA selection is now taken from the config file instead of
        plugins.  An MTA for Postfix+LMTP is added.  bin/genaliases works again.
      - The LMTP server now properly calculates the message's original size.
      - If a message has no Message-ID, the stock archivers will return None for
        the permalink now instead of raising an assertion.
      - IArchiver no longer has an is_enabled property; this is taken from the
        configuration file now.
      - In bin/create_list, fixed a unicode problem when the language is defined in
        the configuration file.
      - Fixed bin/dumbdb, bin/list_lists, bin/remove_list, bin/unshunt, and
      - config.archivers is a property now, not a dictionary that needs
        initialization from plugins.
      - IMailTransportAgent interface has been added.
  11. 01 Jan, 2009 1 commit
  12. 25 Sep, 2008 1 commit
  13. 27 Feb, 2008 1 commit
  14. 17 Feb, 2008 1 commit
    • Barry Warsaw's avatar
      Reorganize the Handler architecture to a pipeline architecture with plugins. · 69d158b1
      Barry Warsaw authored
      Now plugins can define additional handlers and the handlers can be organized
      into named pipelines.  Modules are no longer the unit of a handler, now we use
      classes so we can assert interface conformance.
      The GLOBAL_PIPELINE is gone, replaced by the 'built-in' pipeline.  The
      OWNER_PIPELINE is not yet replaced.
      I still need a few more tests of the basic pipeline architecture, although the
      individual handlers have pretty good coverage.
      Added the IHandler and IPipeline interfaces.
      Still broken, but not yet removed: Mailman/pipeline/moderate.py.
  15. 08 Feb, 2008 1 commit
  16. 29 Sep, 2007 1 commit
    • Barry Warsaw's avatar
      Reorganize the qrunner infrastructure. First, the package has been renamed · 3e9ed398
      Barry Warsaw authored
      from Mailman.Queue to Mailman.queue (note the case change to be more PEP 8
      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.
  17. 28 May, 2007 1 commit
    • bwarsaw's avatar
      Merge exp-elixir-branch to trunk. There is enough working to make me feel · b18f632f
      bwarsaw authored
      confident the Elixir branch is ready to become mainline.  Also, fewer branches
      makes for an easier migration to a dvcs.
      Don't expect much of the old test suite to work, or even for much of the old
      functionality to work.  The changes here are disruptive enough to break higher
      level parts of Mailman.  But that's okay because I am slowly building up a new
      and improved test suite, which will lead to a functional system again.
      For now, only the doctests in Mailman/docs (and their related test harnesses)
      will pass, but they all do pass.  Note that Mailman/docs serve as system
      documentation first and unit tests second.  You should be able to read the
      doctest files to understand the underlying data model.
      Other changes included in this merge:
      - Added the Mailman.ext extension package.
      - zope.interfaces uses to describe major components
      - SQLAlchemy/Elixir used as the database model
      - Top level doinstall target renamed to justinstall
      - 3rd-party packages are now installed in pythonlib/lib/python to be more
        compliant with distutils standards.  This allows us to use just --home
        instead of all the --install-* options.
      - No longer need to include the email package or pysqlite, as Python 2.5 is
        required (and comes with both packages).
      - munepy package is included, for Python enums
      - IRosterSets are added as a way to manage a collection of IRosters.  Roster
        sets are named so that we can maintain the indirection between mailing lists
        and rosters, where the two are maintained in different storages.
      - IMailingListRosters: remove_*_roster() -> delete_*_roster()
      - Remove IMember interface.
      - Utils.list_names() -> config.list_manager.names
      - fqdn_listname() takes an optional hostname argument.
      - Added a bunch of new exceptions used throughout the new interfaces.
      - Make LockFile a context manager for use with the 'with' statement.
  18. 18 Jan, 2007 1 commit
    • bwarsaw's avatar
      Rework MailList.available_languages so that we don't need to use a PickleType · 372d4c2f
      bwarsaw authored
      column in the database for this list of strings.  We use SQLAlchemy's
      many-to-many relationship, however because of this, you cannot simply append
      new unicodes to .available_languages.  You need to wrap the language code in a
      Language instance and append that instance to the list.
      In order to handle this, I added a property MailList.language_codes which
      returns a list of the code strings (not Language instances).  Also new are
      MailList.set_languages() for setting (i.e. overriding) the set of available
      languages for the list; and add_language() which takes a single language code,
      wraps it, and appends it.  The code does not and should not use
      .available_languages directory any more.
      MailList.GetAvailableLanguages() is removed.  The 'available_languages' column
      is removed from the Listdata table.
      Add a getValue() to Mailman.Gui.Language in order to unwrap the language codes
      stored in the database's association table.  Modify _setValue() to do the
      In dbcontext.py, don't import * from the sqlalchemy package.  It contains a
      'logging' name which is not the standard Python logging package.  I also added
      essentially a bag of attributes class called Tables which will hold references
      to all the SA tables that are created.  Update the make_table() API to take an
      instance of Tables.
      Added a close() method to DBContext.  This is needed for the updated unit test
      Changed bin/import.py so that when available_languages is being set, it calls
      MailList.set_languages() instead of trying to set that attribute directly.
      Updated some language idioms while I was at it.
      More eradication of mm_cfg in favor of the config object and the Defaults
      In testall.py, call initialize() instead of loginit.initialize().
      Promote MAX_RESTARTS into a Defaults.py.in variable.  This is because the unit
      tests will knock that value down to something not so annoying should one of
      the qrunner-required tests traceback.
      Several other important changes to the unit test suite (which now completely
      succeeds again!):
      - Set the uid and gid of the temporary mailman.cfg and tmp*.db files to the
        Mailman user and group as specified in the config object.
      - Make sure that all of the tests point to a SQLite database file that was
        created with the tempfile module.  This way we don't pollute our main
        database with data that is getting created during the unit tests.
      - In the TestBase.setUp() method, be sure to close the existing dbcontext,
        clear out the mappers, and then reconnect the dbcontext with the new
        SQLALCHEMY_ENGINE_URL pointing to the tempfile.  However, we don't need to
        reload the MailList instance any more.
      - Make all tests work, except for the tests that require crypt.  That upgrade
        path will not be available in this version of Mailman.
  19. 29 Dec, 2006 1 commit
    • bwarsaw's avatar
      Merged revisions 8113-8121 via svnmerge from · f4a456a8
      bwarsaw authored
        r8114 | bwarsaw | 2006-12-06 00:16:54 -0500 (Wed, 06 Dec 2006) | 44 lines
        Initial take on using SQLAlchemy to store list data in lieu of Python pickles.
        While all the list data (including OldStyleMemberships attributes) are stored
        in the database, many attributes are stored as PickleTypes binary data.  This
        isn't idea but it gets things working until a more sophisticated schema can be
        MailList class is now a new-style class, as is required by SQLAlchemy.  This
        makes several things, er, interesting.  Rip out all the low-level pickle
        reading and writing stuff.  Hook SA transaction events into Lock() and
        Unlock().  Move the hooking of the _memberadaptor into InitTempVars(), which
        gets called by the SQLAlchemy hooks (MailList.__init__() never is).
        Add an initialize.py module which centralizes all the initialization bits that
        command line scripts have to do, including configuration, logging, and atabase
        This change also converts bin/withlist to mmshell wrapper.
        Update to SQLAlchemy 0.3.1.
        Revamp paths.py.in considerably.  There were several problems with the old
        way.  We no longer disable default loading of site-packages so we don't need
        to add Python's site-packages back to sys.path.  Also, because
        site.addsitedir() causes things like .pth paths to be /appended/ to sys.path,
        they actually won't override any site-installed packages.  E.g. if SQLAlchemy
        is installed in the system Python, our version will not override.  IIUC,
        setuptools-based packages can be configured to work properly in the face of
        package versions, however not all packages we currently depend on are
        setuptools-based.  So instead, we steal a bit of stuff from site.py but change
        things so the prepend .pth stuff to sys.path.
        Update several modules to use True/False and whitespace normalization.
        Convert from mm_cfg to config object.  Modernize a few coding constructs.
        Add a couple of exceptions to handle database problems.
        In the export script, include the widget type in the elements.  This helped in
        my stupid little throw away conversion script, but I think it will be more
        generally useful.
        Add an interact.py module which refactors interactive interpreter access.
        Mostly this is used by withlist -i, but it lets us import Mailman.interact and
        drop into a prompt just about anywhere (e.g. debugging).
        r8115 | bwarsaw | 2006-12-07 09:13:56 -0500 (Thu, 07 Dec 2006) | 22 lines
        Start to flesh out more of the SQLAlchemy mechanisms.
        Added a MailList.__new__() which hooks instantiation to use a query on
        dbcontext to get an existing mailing list.  A 'no-args' call means we're doing
        a Create(), though eventually that will change too.
        For now, disable the CheckVersion() call.  Eventually this will be folded into
        schema migration.
        list_exists(): Rewrite to use the dbcontext query to determine if the named
        mailing list exists or not.  Requires the fqdn_listname.
        Eradicate two failed member adaptors: BDBMemberAdaptor and SAMemberships.
        Change the way the DBContext holds onto tables.  It now keeps a dictionary
        mapping the table's name to the SA Table instance.  This makes it easier to
        look up and use the individual tables.
        Add 'web_page_url' as an attribute managed by SA, and remove a debugging
        r8116 | bwarsaw | 2006-12-11 07:27:47 -0500 (Mon, 11 Dec 2006) | 29 lines
        Rework the whole dbcontext and transaction framework.  SA already handles
        nested transactions so we don't have to worry about them.  However, we do have
        the weird situation where some transactions are tied to MailList
        .Lock()/.Unlock()/.Save() and some are tied to non-mlist actions.  So now we
        use an @txn decorator to put methods in a session transaction, but then we
        also hook into the above MailList methods as possibly sub-transactions.  We
        use a weakref subclass to manage the MailList interface, with a dictionary
        mapping MailList fqdn_listnames against transactions.  The weakrefs come in by
        giving us a callback when a MailList gets derefed such that we're guaranteed
        to rollback any outstanding transaction.
        Also, we have one global DBContext instance but rather than force the rest of
        Mailman to deal with context objects, instead we expose API methods on that
        object into the Mailman.database module, which the rest of the code will use.
        Such methods must be prepended with 'api_' to get exposed this way.
        bin/rmlist now works with the SA-backend.  I refactored the code here so that
        other code (namely, the test suite) can more easily and consistently remove a
        mailing list.  This isn't the best place for it ultimately, but it's good
        enough for now.
        New convenience functions Utils.split_listname(), .fqdn_listname().
        Convert testall to use Mailman.initialize.initialize().  Not all tests work,
        but I'm down to only 8 failures and 7 errors.  Also, do a better job of
        recovering from failures in setUp().
        MailList.__new__() now takes keyword arguments.
        r8117 | bwarsaw | 2006-12-11 22:58:06 -0500 (Mon, 11 Dec 2006) | 7 lines
        Unit test repairs; even though the unit tests are still pretty fragile,
        everything now passes with the SQLAlchemy storage of list data.
        Added missing 'personalize' column.  Converted mailmanctl and qrunner to
        initialize() interface.  Fixed _cookie_path() to not fail if SCRIPT_NAME is
        not in the environment.
        r8118 | bwarsaw | 2006-12-27 18:45:41 -0500 (Wed, 27 Dec 2006) | 21 lines
        Utils.list_names(): Use a database query to get all the list names.
        dbcontext.py: Added api_get_list_names() to support Utils.list_names().
        listdata.py: Added two additional MailList attributes which need to be stored
        in the database.  The first is 'admin_member_chunksize' which isn't modifiable
        from the web.  The second is 'password' which holds the list's password.
        HTMLFormatObject: item strings can now be unicodes.
        bin/list_lists.py: Must call initialize() to get the database properly
        initialized, not just config.load().  This will be a common theme.
            - Remove md5 and crypt support
            - Added mailman.debug logger, though it will be only used during
            - The 'secret' can be a unicode now.
            - A few coding style updates; repr() instead of backticks, 'key in dict'
              instead of 'dict.has_key(key)'
        r8119 | bwarsaw | 2006-12-27 19:13:09 -0500 (Wed, 27 Dec 2006) | 2 lines
        genaliases.py: config.load() -> initialize()
        r8120 | bwarsaw | 2006-12-27 19:17:26 -0500 (Wed, 27 Dec 2006) | 9 lines
        Blocked revisions 8113 via svnmerge
          r8113 | bwarsaw | 2006-12-05 23:54:30 -0500 (Tue, 05 Dec 2006) | 3 lines
          Initialized merge tracking via "svnmerge" with revisions "1-8112" from 
        r8121 | bwarsaw | 2006-12-28 23:34:52 -0500 (Thu, 28 Dec 2006) | 20 lines
        Remove SIGTERM handling from all the CGI scripts.  This messes with HTTPRunner
        because when you issue "mailmanctl stop" after the signal handler has been
        installed, the process will get a SIGTERM, the signal handler will run, and
        the process will exit with a normal zero code.  This will cause mailmanctl to
        try to restart the HTTPRunner.
        I don't think we need that stuff at all when running under wsgi with a
        SQLAlchemy backend.  If mailmanctl kills the HTTPRunner in the middle of the
        process, I believe (but have not tested) that the transaction should get
        properly rolled back at process exit.  We need to make sure about this, and
        also we need to test the signal handling functionality under traditional CGI
        environment (if we even still want to support that).
        Also, make sure that we don't try to initialize the loggers twice in qrunner.
        This was the cause of all the double entries in logs/qrunner.
        Fix a coding style nit in mailmanctl.py.
        De-DOS-ify line endings in loginit.py.
  20. 27 Aug, 2005 1 commit
  21. 02 May, 2002 1 commit
    • bwarsaw's avatar
      New architecture for email commands. Instead of the monolithic (and · ea909c05
      bwarsaw authored
      unmaintainable) MailCommandHandler.py file, we've now got a framework
      where each command is implemented in a separate file.  This means it's
      both more extensible and more flexible:
      - you can easily add new commands for things I haven't thought of
        <wink>, and the `help' command will automatically adjust
      - you can disable commands entirely by removing the appropriate file
      - you can disable, change, or add commands on a per-list (or even
        per-message or per-sender) basis
      CommandRunner.py is the module that calls into this framework.  Each
      command is implemented as a cmd_<command>.py file.  The `set' command
      is the most complicated.  The help text is currently implemented as
      module docstrings (for most commands), so the i18n catalogs must be
      updated.  Also the help.txt files will be updated.
  22. 26 Jan, 2002 1 commit
  23. 15 Feb, 2001 1 commit
  24. 26 May, 1998 2 commits
  25. 25 May, 1998 1 commit
  26. 27 Feb, 1998 1 commit