summaryrefslogtreecommitdiff
path: root/Mailman
Commit message (Collapse)AuthorAgeFilesLines
...
* AddMember(), ConfirmUnsubscription(): We have to handle the confirmbwarsaw2002-03-011-4/+8
| | | | | | | | cookie Subject: header the same way we do for ChangeMemberAddress(). That is, we can't set this header in the UserNotification constructor, but have to add it in afterwards, so the header doesn't get encoded (a reply to the encoded confirm header will bollux up MailCommandHandler).
* __sendAdminBounceNotice(): Because the UserNotification constructorbwarsaw2002-02-281-4/+8
| | | | | | | | | | | already sets the Content-Type: and MIME-Version: headers, don't do it explicitly (it'll add multiple headers). Instead just call set_type() to set the type to multipart/mixed. (Must do that before attempting to attach.) sendNextNotification(): Because we do not want the Subject: to be encoded, don't pass the subject into the UserNotification constructor. See MailList.ChangeMemberAddress() for details.
* ChangeMemberAddress(): Pass the member's language into thebwarsaw2002-02-281-4/+14
| | | | | | | | | | | | | | | | | UserNotification constructor so that the verification message gets encoded correctly. There's one gotcha that affects all confirmation messages (and I will audit this next). From the comment: # BAW: We don't pass the Subject: into the UserNotification # constructor because it will encode it in the charset of the language # being used. For non-us-ascii charsets, this means it will probably # quopri quote it, and thus replies will also be quopri encoded. But # MailCommandHandler doesn't yet grok such headers, and I'm avoiding # fixing that until a future version which will completely rewrite the # mail command handling. So, just set the Subject: in a separate # step, although we have to delete the one UserNotification adds. Sigh.
* process_form(): i18n fixes. The privacy alert message should be sentbwarsaw2002-02-281-6/+13
| | | | | | to the user in his/her own language, but as this may be different than the list's preferred language, we have to wrap the message creation in a try/finally which sets and restores the list's language.
* create(), remove(): Use -unsubscribe as the longest string to pad thebwarsaw2002-02-281-6/+10
| | | | | | | | alias field against. Also, send all alias file change requests to mailman-owner (actually the site email's -owner address) so that it has a better chance of getting to a human. Finally, in the UserNotification constructors, use the DEFAULT_SERVER_LANGUAGE (hmm, I wonder if this should use the language of the site list?).
* hold_for_approval(): Instead of using add_header to set to set thebwarsaw2002-02-281-4/+3
| | | | | | | Content-Type: header, and since we should be setting the charset anyway, on the message that goes to the admin, set the lang argument to the UserNotification, and then just set the type (via set_type()) to multipart/mixed.
* UserNotification.__init__(): If there's no text argument given, butbwarsaw2002-02-281-1/+4
| | | | | | | | | there was a lang argument given, call self.set_charset() instead of doing nothing. Note that when a text argument is given, set_charset() is called implicitly by set_payload(). Otherwise, given lang but no text results in no MIME-Version: header being set.
* __sendAdminBounceNotice(), sendNextNotification(): Bothbwarsaw2002-02-281-2/+3
| | | | | | | | | | | UserNotification constructor calls were passing in the language as a positional argument, in the position where the text should have been. But because both instances has no text, the proper fix is to use the `lang' keyword argument. This fixes one i18n related crash, and the last one I'm going to commit tonight. I've audited all the other UserNotification call sites and there are more fixes coming down the pike.
* Urg. Bump copyright years.bwarsaw2002-02-281-1/+1
|
* patterns: Added a recognition of HotPop bounces. Donated by Dan Mick.bwarsaw2002-02-281-0/+4
|
* _getValidValue(): Fix the tests for EmailList and EmailListEx, andbwarsaw2002-02-281-9/+17
| | | | | also add a sanity check for any regular expressions (i.e. make sure that re.compile() doesn't fail on them).
* add_error_message(): Removed as a duplicate of Document.addError().bwarsaw2002-02-281-30/+32
| | | | | | | | | | | Change all calls of add_error_message() to doc.addError(). main(): Fix the error reporting when no email address is given. Also, rework the error reporting for when the login page's unsub or remind buttons are used. Specifically, when rosters are public, we should provide error messages when the given address is not a member, but when rosters are private, lie about the confirmation message or password reminder.
* Document.addError()'s tag argument's default value is now "Error: " sobwarsaw2002-02-281-10/+7
| | | | change the call sites accordingly.
* Document.addError(): Make the default tag be "Error: " since that'sbwarsaw2002-02-281-1/+1
| | | | the most commonly used tag.
* __verpbounce(), __scanbounce(): Make sure that we don't try to lock abwarsaw2002-02-281-4/+12
| | | | | | | | list that's already locked, e.g. the site list that we know we're processing for! Bug reported by Dan Mick. BAW: The loop in these two methods should really be factored out, but there's a bit of an impedance mismatch for the inner logic.
* Set DEFAULT_PRIVATE_ROSTER to 1 since that's just too tempting abwarsaw2002-02-271-1/+1
| | | | | | | target for harvesters, and we have doubts as to how much this feature is used. Note: this does not change anything for existing lists.
* send_digest_now(): Return a boolean flag specifying whether a digestbwarsaw2002-02-271-1/+3
| | | | | was sent out or not. This lets the admin page for example, display a nice status message.
* get_valid_value(): Removed. This has all been moved into thebwarsaw2002-02-271-116/+4
| | | | | | | | | | | | | | | Mailman/Gui/GUIBase.py module. get_item_gui_value(): The gui component API has changed; use getValue() instead of GetValue(). change_options(): We can really simplify a lot of this method because the actual changing of the properties, value verification, and special overrides are now all handled in the gui components themselves. We now need only call out to the gui.handleForm() method. Eventually, the membership management page should use the same mechanism.
* Somehow (and I'm not sure how), the GUIBase class gets exposed in thebwarsaw2002-02-271-1/+4
| | | | | package scope. Delete it, because it messes up the automatic instantiation policy in MailList.InitTempVars().
* Use GUIBase as the base class.bwarsaw2002-02-271-2/+11
| | | | | _setValue(): New overridden method which handles the special "do immediately" attribute.
* Use GUIBase as the base class.bwarsaw2002-02-271-5/+7
| | | | | HandleForm() -> handleForm(). Also, if a topic definition is rejected for being incomplete, add an error message to the page.
* Use GUIBase as the base class.bwarsaw2002-02-271-1/+10
| | | | | _setValue(): New overridden method which handles the special case when ALLOW_OPEN_SUBSCRIBE is set.
* Use GUIBase as the base class.bwarsaw2002-02-271-3/+4
| | | | HandleForm() -> handleForm()
* Use GUIBase as the base class.bwarsaw2002-02-271-57/+16
| | | | | | | | | HandleForm(): Remove, obsolete API. Also removed handle_form() module global. _setValue(): New overridden method for handling the conversion from $-strings to %-strings and doing substitution variable verification. Most of the functionality is in the base class now.
* Use GUIBase as the base class.bwarsaw2002-02-271-3/+13
| | | | | _setValue(): New overridden method which handles setting the global i18n context when the list's preferred_language changes.
* Use GUIBase as the base class.bwarsaw2002-02-271-2/+14
| | | | | | _setValue(): New overridden method which handles the assertion that the real_name attribute may differ from the internal name by case only.
* Use GUIBase as the base class.bwarsaw2002-02-271-5/+30
| | | | | | | HandleForm(): Remove, obsolete API. _setValue(): New overridden method which handles the special "do immediately" attributes.
* Use GUIBase as the base class.bwarsaw2002-02-271-32/+25
| | | | | | | | | HandleForm(): Remove, obsolete API. Also remove __convert() as obsolete. _setValue(): New overridden method converting the bounce values from the web presentation units to the internal units. GetValue() -> getValue()
* Use GUIBase as the base class.bwarsaw2002-02-271-46/+14
| | | | | | | | HandleForm(): Remove, obsolete API. _setValue(): New overridden method for handling the conversion from $-strings to %-strings and doing substitution variable verification. Most of the functionality is in the base class now.
* Use GUIBase as the base class.bwarsaw2002-02-271-3/+3
|
* intermediatebwarsaw2002-02-261-0/+183
|
* _dispose(): We need to use msg.as_string() to flatten the message tobwarsaw2002-02-261-2/+2
| | | | | | plain text instead of msg.__str__(), otherwise we'll get the Unix From_ header in the output, which will bollux up NNTP. Bug discovered and fix verified by Ron Jarrell.
* process(): Ignore all values of X-No-Archive: header; it's merebwarsaw2002-02-261-5/+5
| | | | presence is enough to avoid archiving the message.
* Untabbification. :(bwarsaw2002-02-231-188/+188
|
* WHITESPACE -> whitespace everywhere.bwarsaw2002-02-231-8/+72
| | | | | | | | | | | | | | | | | | | ValidateEmail(): Add Dan Mick's suggestion to throw out email addresses with embedded spaces in the (although the calculation of such is done a bit differently). This may not be a complete solution because any address that's first sent through email.Utils.parseaddr() will have embedded spaces collapsed anyway by rfc822.py's similarly named function. That latter is a bug that needs to be fixed in Python, but that's not a high priority right now. Also note that "this is an email address"@dom.ain is (probably) legal and is handled correctly by parseaddr() but will still be rejected by ValidateEmail(). I think that's fine, as anybody who's got embedded spaces in their address is probably going to have a miserable life anyway. to_dollar(), to_percent(), dollar_identifiers(), percent_identifiers(): New functions to support experimental $-string substitutions, and conversions between %-strings and $-strings.
* add_error_message(): Converted to Document.addError().bwarsaw2002-02-231-26/+12
|
* Bump copyright years.bwarsaw2002-02-231-1/+1
|
* handle_form(): We break the handling of the header and footerbwarsaw2002-02-232-0/+65
| | | | | | | | | | | | | | | | attributes into a special method which does some sanity checking on the interpolation strings. First, it checks to see if we're using the new experimental $-strings, and then depending on the style of interpolation being used, it extracts the identifiers (variables) in the string and compares them against a known valid list. Any invalid variables are flagged and the changes are discarded. If the user simply left off a trailing `s' (as in %(foo)s), then this can be corrected, but a warning is still printed. Note: In NonDigest.py we're using a module level function which is imported by Digest.py's HandleForm(). Makes it convenient to share code, but this should really be refactored along with Autoresponse.py's HandleForm().
* GetConfigInfo(): Update the description of the interpolation stringsbwarsaw2002-02-231-7/+56
| | | | | | | | | | | | | | | | | to not include the %()s chrome. We might be using the new experimental $-strings. This leaves the instructions with a something left to be desired, but it should be okay for now, and I don't want to add two descriptions, one for %-strings and another for $-strings. HandleForm(): We break the handling of the Autoresponse attributes into a special method which does some sanity checking on the interpolation strings. First, it checks to see if we're using the new experimental $-strings, and then depending on the style of interpolation being used, it extracts the identifiers (variables) in the string and compares them against a known valid list. Any invalid variables are flagged and the changes are discarded. If the user simply left off a trailing `s' (as in %(foo)s), then this can be corrected, but a warning is still printed.
* decorate(): When the mailing list object has a true attributebwarsaw2002-02-231-2/+16
| | | | | | | | | | | | use_dollar_strings, this means the list has been converted from the traditional (and error prone) %-substitution strings to the new experimental $-substitution strings. We need to internally convert the $-strings back into (safe) %-strings to utilize Python's string mod operator. process(): Apply Ben Gertzfield's patch to only add the header via text/plain concatenation when the character set of the list's default language matches the charset of the message.
* process(): When the mailing list object has a true attributebwarsaw2002-02-231-0/+3
| | | | | | | | use_dollar_strings, this means the list has been converted from the traditional (and error prone) %-substitution strings to the new experimental $-substitution strings. We need to internally convert the $-strings back into (safe) %-strings to utilize Python's string mod operator.
* _addlist(): Do some better formatting. -unsubscribe is now thebwarsaw2002-02-231-2/+2
| | | | longest alias. Also, there's no need to add 1 to the field size.
* makealiases(): Add -subscribe and -unsubscribe as aliases for -joinbwarsaw2002-02-231-1/+2
| | | | and -leave respectively.
* Deprecate the Mailman/pythonlib directory. First, most if not all ofbwarsaw2002-02-237-2464/+0
| | | | | | | | the modules are now unnecessary because we're going to require at least Python 2.1.x and it should have relatively bug-free versions of these modules. Second, if we find we need to override standard modules, we have a different way of doing it now (by path-hacking in a pythonlib directory one level up into the front of sys.path).
* show_post_requests(): Be sure to cgi.escape() the header text we'rebwarsaw2002-02-231-3/+3
| | | | | | | displaying so that nasty HTML can't sneak in. Also, set the readonly attribute to true when creating the Message Headers and Message Excerpt text boxes. This avoids the misperception that you can edit the message before it's approved.
* addError(): New method added to class Document, which is essentially abwarsaw2002-02-231-5/+18
| | | | | | | | | | | | replacement for the function in the admin.py module. This makes it much easier for gui component HandleForm() methods to add an error or warning to the admin page. TextArea.__init__(): Add a `readonly' argument, which translates to the TEXTAREA tag getting a READONLY attribute. We'll use this to turn the header and body excerpt text boxes in the admindb pages to read-only (avoiding the common misperception that you can edit the message before it's approved).
* __setstate__(): When unpickling Message instances, check to make surebwarsaw2002-02-231-0/+6
| | | | | | | | | | | | | | they have a _charset attribute, adding a default one if not. This should fix a problem I think Dan Mick had, which I believe is caused by a Message object being pickled w/ version 0.96 of the email package, and unpickled by 0.97/1.1 of the email package. Why doesn't this go into email.Message.Message? Because I don't want to clutter its code up with something that should both be transient and assumes that Message is pickled. Mailman seems more responsible for the pickle consistency (if every Python class that grew an attribute had to have such schema migration code, we'd be up sh*ts creek).
* Remove `pythonlib' from SUBDIRS. We're getting rid of thebwarsaw2002-02-231-2/+2
| | | | | Mailman/pythonlib subdirectory in favor of an alternate location when/if necessary.
* Bump copyright years.bwarsaw2002-02-231-1/+1
|
* Use the mailbox module from the Python standard library, instead ofbwarsaw2002-02-231-1/+1
| | | | | | our Mailman/pythonlib version. We don't use the extra hack in our version anyway, AFAICT (i.e. the addition of a seek() method which just deferred to the underlying file object).