summaryrefslogtreecommitdiff
path: root/Mailman
Commit message (Collapse)AuthorAgeFilesLines
...
* __convert(): Another bow to Python 2.1; move the import ofbwarsaw2001-12-311-1/+1
| | | | | add_error_message into the nested error() function so Python 2.1 won't complain about shadows.
* HandleForm(): Python 2.1 doesn't have nested scopes enabled bybwarsaw2001-12-311-1/+2
| | | | | default. Fix the nested convert() method args to work for versions of Python before 2.2.
* removeMember(): Clear the bounce info before deleting the memberkeybwarsaw2001-12-291-2/+2
| | | | | from the various dictionaries, otherwise the __assertIsMember() in setBounceInfo() will fail.
* main(): The last fix wasn't correct; it should have been fixed inbwarsaw2001-12-291-6/+1
| | | | OldStyleMemberships.py. Backing it out.
* patterns: Python 2.2 is more strict about duplicate group names inbwarsaw2001-12-291-2/+2
| | | | regular expressions.
* Massive rewrite, for which I'm too tired to detail (yeah, I'll regretbwarsaw2001-12-291-90/+370
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this five years from now ;). In brief, We now organize held postings by sender address and this "summary" is what's presented when .../mailman/admindb/listname is visited. The pending subs and unsubs don't change, but the preamble is shorted (with links to more detailed instructions). For each group of held messages, you can click on one link to see the details of the all the messages sent by a single address, or you can click on a different link to view the details of just a single message. A third link lets you view the details of all the held messages, just like the old admindb page used to give you. The details page is just like the old admindb in form and function, except that ADMINDB_PAGE_TEXT_LIMIT now works ;) and there are links back to the summary page. One additional neat hack is that on the summary page, there's an option to add an email address to one of the auto sender filter lists (viewable in the admin/privacy/sender screen). This is only visible if the address isn't already on one of the four filter lists. Where this should be a boon is if you've got a bunch of messages being held that are coming from the same address, and they all appear to be spam. You can discard them all in one fell swoop (no click-'n'-scroll necessary!), and add them to the auto-discard list, so you never have to worry about them again. Note that if what you wanted to do was add a regexp to say the auto-discard list, you'd have to first add this address, then go to the admin/privacy/sender page and edit the address into a regexp filter. Easily done, while reducing the complexity of the admindb summary page, which already pushes the edge of "too busy".
* main(): Small bug fix for when the admin has checked the unsub box andbwarsaw2001-12-291-1/+6
| | | | | accidently changed an option for the same user. We just ignore the NotAMemberError that can get raised.
* __handlepost(): Slight modification in the way the forwarded messagebwarsaw2001-12-291-2/+3
| | | | | is composed. Be sure to add a MIME-Version: header and use set_payload() instead of add_payload() to include the forwarded copy.
* Added ACCEPT and HOLD, a couple of useful constants for the redesignedbwarsaw2001-12-291-0/+2
| | | | admindb.py pages.
* __doperiodic(): RegisterBounce() -> registerBounce()bwarsaw2001-12-271-4/+4
|
* __verpbounce(): RegisterBounce() -> registerBounce()bwarsaw2001-12-271-2/+2
|
* The long-awaited rewrite of the bounce processing system. We'vebwarsaw2001-12-271-21/+101
| | | | | | | | | | | | | | | | | | | | | (hopefully) managed to make this both more understandable and much simpler. Simpler even than recent mailman-developer threads (and yet, I still believe this will work :). The algorithm is explained in the Mailman/Gui/Bounce.py, i.e. admin/bounce category, help string. Specifically here, GetConfigInfo(): Explain the new bounce scoring algorithm, and provide for configuration attributes bounce_processing, bounce_score_threshold, bounce_info_stale_after, bounce_you_are_disabled_warnings, and bounce_you_are_disabled_warnings_interval. Get rid of the old bounce configuration attributes. HandleForm(), GetValue(): Handle the setting and getting of the gui configuration variables, specifically the conversion from float-seconds to days. The former type is used internally, while the latter is presented to the user.
* Added support for the RE_ENABLE confirmation (i.e. thru-the-webbwarsaw2001-12-271-1/+115
| | | | | | | | re-enabling of a disabled membership). Specifically, reenable_cancel(), reenable_confirm(), reenable_prompt(): New functions to prompt for, cancel (i.e. defer) and confirm thru-the-web re-enabling of a disabled membership.
* Make it easier for gui components to implement specializations of thebwarsaw2001-12-271-13/+16
| | | | | | | | | | category form data processing. The intention is to eventually push most of the special casing out of this script, where it's simply too hard to maintain. Specifically, get_item_gui_value(): If the gui component has a GetValue() method, call it to get the current value of the attribute. This lets us implement the seconds<->days mapping in the Bounce.py gui component.
* ScanMessages(): Call registerBounce() now to register a bounce. Webwarsaw2001-12-271-1/+1
| | | | | still don't implement weighted scoring, but we could if we improved the bounce detection framework.
* ZapOldVars(): Get rid of old bounce processing attributesbwarsaw2001-12-271-0/+16
| | | | | | | | | | | | minimum_removal_date, minimum_post_count_before_bounce_action, automatic_bounce_action, and max_posts_between_bounces. NewVars(): Add new bounce scoring attributes bounce_score_threshold, bounce_info_stale_after, bounce_you_are_disabled_warnings, bounce_you_are_disabled_warnings_interval. UpdateOldVars(): Clear out bounce_info. We don't need to migrate any of this data. Instead we'll just start bounce scoring from scratch.
* DATA_FILE_VERSION: Bump up a few notches to pick up the schemabwarsaw2001-12-271-1/+1
| | | | changes.
* Added RE_ENABLE key for thru-the-web re-enabling of disabledbwarsaw2001-12-271-0/+2
| | | | memberships.
* ProcessConfirmation(): Add handling of Pending.RE_ENABLE to the bigbwarsaw2001-12-271-0/+5
| | | | | confirmation processing switch. This sure does call out for an object-oriented approach. ;)
* FormatDisabledNotice(): If the user has been disabled due to bounces,bwarsaw2001-12-271-0/+12
| | | | | | | they'll have a bounce info record, and if that record has a score above 0, we'll add a little bit of information to their options page explaining their current bounce score and some advice for fixing the problem.
* The long-awaited rewrite of the bounce processing system. We'vebwarsaw2001-12-271-19/+37
| | | | | | | | | | | | | | | | | | | (hopefully) managed to make this both more understandable and much simpler. Simpler even than recent mailman-developer threads (and yet, I still believe this will work :). The algorithm is explained in the Mailman/Gui/Bounce.py, i.e. admin/bounce category, help string. Specifically here, Get rid of DEFAULT_MINIMUM_REMOVAL_DATE, DEFAULT_MINIMUM_POST_COUNT_BEFORE_BOUNCE_ACTION, DEFAULT_AUTOMATIC_BOUNCE_ACTION, and DEFAULT_MAX_POSTS_BETWEEN_BOUNCES. Add an explanation of the new bounce scoring algorithm. Add DEFAULT_BOUNCE_SCORE_THRESHOLD, DEFAULT_BOUNCE_INFO_STALE_AFTER, DEFAULT_BOUNCE_YOU_ARE_DISABLED_WARNINGS and DEFAULT_BOUNCE_YOU_ARE_DISABLED_WARNINGS_INTERVAL.
* The long-awaited rewrite of the bounce processing system. We'vebwarsaw2001-12-271-223/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (hopefully) managed to make this both more understandable and much simpler. Simpler even than recent mailman-developer threads (and yet, I still believe this will work :). The algorithm is explained in the Mailman/Gui/Bounce.py, i.e. admin/bounce category, help string. Specifically here, _BounceInfo: New class which encapsulates information about a member's bounce status -- not delivery status. This holds information about their bounce score, the date (YYYY, MM, DD) of their last detected bounce, the number of "you-have-been-disabled" notices remaining to be sent, the date of the last sent notice, and the confirmation cookie for thru-the-web/email-cmd re-enabling. InitVars(): Throw away old attributes minimum_removal_date, minimum_post_count_before_bounce_action, automatic_bounce_action, max_posts_between_bounces, and add new attributes bounce_score_threshold, bounce_info_stale_after, bounce_you_are_disabled_warnings, and bounce_you_are_disabled_warnings_interval. See schema migration code in versions.py. ClearBounce(), RegisterBounce(), HandleBouncingAddress(), DisableBouncingAddress(), RemoveBouncingAddress(): Gone. registerBounce(): New method which other bounce detection code can call to register a bounce on a member. The other code can supply a weight (hard bounces = 1.0, soft bounces = 0.5), defaulting to 1.0. This method handles all the bounce scoring policy, including registering only one bounce per member per day, and throwing away residual bounce information for members who are already disabled. __sendAdminBounceNotice(): Send a disabled-due-to-bounce notice to the list administrator. Used when a member is actually disabled. This uses the existing bounce.txt template, but in unusual ways, avoiding requiring the translators to provide new templates. sendNextNotification(): If a disabled member is still due some notification, then send another to the user, decrementing the noticesleft count. If noticesleft is <= to 0, then they haven't re-enabled their account in time and they get deleted.
* getDeliveryStatusMembers(): New interface method which returns a listbwarsaw2001-12-272-9/+27
| | | | | | | | | | | | | | | | of members whose delivery status is in the given argument. This can be used to e.g. find all the members who have been disabled due to excessive bounces. removeMember(): Use setBounceInfo(..., None) to clear a just-removed member's bounce information. MailList.ClearBounceInfo() is gone. setDeliveryStatus(): When setting the member's status to ENABLED, clear all the bounce information by calling setBounceInfo(..., None). This also deletes the member's entry in self.__mlist.delivery_status. setBounceInfo(): Fixed typo, also when info is None, delete the member's entry in the delivery_status dictionary.
* GetArchLock(), DropArchLock(): Get rid of posixfile locking, which isbwarsaw2001-12-241-16/+7
| | | | deprecated in Python 2.2, in favor of our good ol' standard LockFile.
* Sigh. I think BerkeleyDB support is just plain broken in standardbwarsaw2001-12-241-1/+9
| | | | | | | Python. Fall back to the PyBSDDB module (a.k.a. bsddb3) if bsddb fails. Note to self: we need to fix the BerkeleyDB module for Python 2.3.
* makealiases(): To avoid name clashes with other MLM's, rename thebwarsaw2001-12-241-1/+1
| | | | wrapper program to `mailman'.
* send_i18n_digests(): Use getDeliveryStatus().bwarsaw2001-12-191-1/+2
|
* save_attachment(): Why not actually /use/ the baseurl local variable?bwarsaw2001-12-191-1/+1
| | | | It's sanitize to make sure it ends in a slash.
* process(): Simplify the calculation of the List-Archive: header.bwarsaw2001-12-191-4/+1
|
* process(): Use getDeliveryStatus().bwarsaw2001-12-191-1/+2
|
* ProcessOptionsCmd(): Use getDeliveryStatus() instead ofbwarsaw2001-12-191-2/+20
| | | | | | | | getMemberOption(). Also, tailor the disable notification based on the actual status -- gives more detail about how the membership was actually disabled. ProcessSetCmd(): Set delivery status by setDeliveryStatus().
* FormatUsers(), FormatOptionButton(), FormatDisabledNotice(): Usebwarsaw2001-12-191-8/+22
| | | | | | getDeliveryStatus() instead of getMemberOption(). Also, tailor the disable notification based on the actual status -- gives more detail about how the membership was actually disabled.
* main(), global_options(): Use getDeliveryStatus() andbwarsaw2001-12-191-8/+29
| | | | | setDeliveryStatus() to change the delivery status -- instead of the member options. When disabling, do it BYUSER.
* membership_options(): Implement user-selected disabled delivery. Usebwarsaw2001-12-191-9/+25
| | | | | | | | | | getDeliveryStatus() instead of getMemberOption(). Fix the FIXME code which was doing a direct key search in mlist.members. This code is less efficient but plays nice with the MemberAdaptor API. change_options(): Handle the <user>_nomail option through the setDeliveryStatus() method instead of the setMemberOption() method. Disable BYADMIN.
* CanonicalizeUserOptions(): Implement the schema update frombwarsaw2001-12-191-1/+11
| | | | DisableDelivery member option to the new delivery_status dictionary.
* DATA_FILE_VERSION: Bump it up to get the delivery_status schemabwarsaw2001-12-191-1/+1
| | | | changes.
* First step on the bounce processer sanity road. These changes fixbwarsaw2001-12-191-2/+47
| | | | | | | | | | | | | | | | | | Mailman to keep track of why (and when) delivery is disabled. New list attribute delivery_status and new MemberAdaptor interface methods are added. Delivery status has the following states: ENABLED, BYUSER (disabled by user selection), BYADMIN (disabled by admin selection), BYBOUNCE (disabled by excessive bouncing), UNKNOWN (legacy disable). We no longer use the DisableDelivery user option. Also, for status changes from <anything> -> <anything-but-ENABLED>, we record the time.time(). This information gets thrown away when the delivery is re-enabled. Specific changes here: getDeliveryStatus(), getDeliveryStatusChangeTime(), getBounceInfo(), setDeliveryStatus(), setBounceInfo(): New implementations matching the interface changes.
* First step on the bounce processer sanity road. These changes fixbwarsaw2001-12-191-0/+78
| | | | | | | | | | | | | | | | | | | | Mailman to keep track of why (and when) delivery is disabled. New list attribute delivery_status and new MemberAdaptor interface methods are added. Delivery status has the following states: ENABLED, BYUSER (disabled by user selection), BYADMIN (disabled by admin selection), BYBOUNCE (disabled by excessive bouncing), UNKNOWN (legacy disable). We no longer use the DisableDelivery user option. Also, for status changes from <anything> -> <anything-but-ENABLED>, we record the time.time(). This information gets thrown away when the delivery is re-enabled. Specific changes here: Added delivery status ENABLED, UNKNOWN, BYUSER, BYADMIN, BYBOUNCE. getDeliveryStatus(), getDeliveryStatusChangeTime(), getBounceInfo(), setDeliveryStatus(), setBounceInfo(): New methods -- note the *BounceInfo() methods may change.
* First step on the bounce processer sanity road. These changes fixbwarsaw2001-12-191-1/+1
| | | | | | | | | | | | | | | | Mailman to keep track of why (and when) delivery is disabled. New list attribute delivery_status and new MemberAdaptor interface methods are added. Delivery status has the following states: ENABLED, BYUSER (disabled by user selection), BYADMIN (disabled by admin selection), BYBOUNCE (disabled by excessive bouncing), UNKNOWN (legacy disable). We no longer use the DisableDelivery user option. Also, for status changes from <anything> -> <anything-but-ENABLED>, we record the time.time(). This information gets thrown away when the delivery is re-enabled. Specific changes here: Add a comment that DisableDelivery is obsolete.
* First step on the bounce processer sanity road. These changes fixbwarsaw2001-12-191-2/+5
| | | | | | | | | | | | | | | | | | | | Mailman to keep track of why (and when) delivery is disabled. New list attribute delivery_status and new MemberAdaptor interface methods are added. Delivery status has the following states: ENABLED, BYUSER (disabled by user selection), BYADMIN (disabled by admin selection), BYBOUNCE (disabled by excessive bouncing), UNKNOWN (legacy disable). We no longer use the DisableDelivery user option. Also, for status changes from <anything> -> <anything-but-ENABLED>, we record the time.time(). This information gets thrown away when the delivery is re-enabled. Specific changes here: InitVars(): Add delivery_status attribute for new lists. DisableBouncingAddress(): Test getDeliveryStatus() against ENABLED to see if the address is already disabled or not. Also, when disabling, use the BYBOUNCE status.
* Mailman re-uses connections to the SMTP server when deliveringbwarsaw2001-12-161-8/+4
| | | | | | | | | | | | | | | | | multiple chunks. Marc Merlin points out that multi-transaction sessions aren't handled correctly; this fixes the problem. Specifically, process(): In the non-threaded delivery stanza, be sure to quit the connection when finished delivering instead of just closing it. This ensures an SMTP QUIT command is sent. threaded_deliver(): Same for thread-shared connections; quit instead of just close. deliver(): Get rid of the try/finally wrapper around the conn.sendmail() call. We definitely don't want to QUIT the session here.
* __verpbounce(): Dan Mick points out that we were still hardcoding thebwarsaw2001-12-071-27/+26
| | | | VERP decoding. Use mm_cfg.VERP_REGEXP instead.
* Updates to work better with virgin invocation.bwarsaw2001-12-061-23/+33
| | | | | | | | | | | | | | | | | _zapfile(), _zapdb(): Only truncate the file if it already exists (so we don't accidently create it before we're ready to). addlist(): Make this robust for when mlist == None, as it will when there are no lists yet, but we want the preamble and minimal aliases and aliases.db files to get created. Moved the YP_* key settings up before the predicate shortcircuit. do_create(): Do the hashopen() before the built-in open() so it gets created properly by bsddb when it doesn't yet exist. create(): Check for mlist == None before digging out more attributes. Also, rewrote the big comment at the top concerning locking.
* genaliases interface conformance:bwarsaw2001-12-061-1/+17
| | | | | | makelock(), clear(): no-ops create(): Add an optional (ignored) nolock argument.
* makealiases(): Generate the new set of alias to script mappings.bwarsaw2001-11-301-10/+17
|
* show_post_requests(): cgi.escape() the full text of the messagebwarsaw2001-11-301-1/+2
| | | | | excerpt so that it can't sneak in table breaking HTML or evil Javascript. Fixes SF bug #486340. Patch and report by Greg Lindahl.
* main(): Move the setting of the language to up above the login page,bwarsaw2001-11-301-8/+19
| | | | | | | | so that the selected language is propagated from the listinfo page to the options login page. Also, grab the default language setting from the form field. loginpage(): Add a language selection widget.
* list_listinfo(): Code reorg.bwarsaw2001-11-301-1/+3
|
* FormatEditingOptions(): Let's actually /use/ the lang argument to addbwarsaw2001-11-301-14/+19
| | | | | | | | | | | | a hidden field so that the language choice can be propagated to the options page. RosterOption(): Same, for the roster page. GetLangSelectBox(): Factor out the creation of the language selection widget, since other code will need the same thing. GetStandardReplacements(): Use GetLangSelectBox().
* process(): Teach the scrubber about message/rfc822 types, which arebwarsaw2001-11-301-3/+41
| | | | | | | | | | | | | | | | | | | | not multipart, but don't contain a string payload. They have a single Message instance payload so they need to be scrubbed. I don't know whether what we do is the best thing, but we strip out the contained message, store it as an attachment (with very little processing), and include a link/info block of text with the subject, sender, date, size, and url. save_attachment(): When calculating an extension for an unknown type, default to .txt for message/rfc822 types and .bin for everything else. Also, if we're saving a message/rfc822 type as an attachment, all we do is take the raw text of the message, cgi.escape() it for safety, and store it in the attachment file. We could probably do better. Finally, adjust the baseurl for private archives so we don't get a double slash.