summaryrefslogtreecommitdiff
path: root/Mailman
Commit message (Collapse)AuthorAgeFilesLines
...
* verpdeliver(): Skip all the realname -> unicode + encode conversionsbwarsaw2002-10-151-2/+4
| | | | when the member has no real name associated with their subscription.
* ForwardMessage(): The UserNotification neeeds to have its languagebwarsaw2002-10-141-1/+2
| | | | specified. Patch supplied by Tokio Kikuchi.
* __setstate__(): This plus email-2.4.3 should fix (most of) Peerbwarsaw2002-10-141-2/+33
| | | | | | | | | | | | | | | | | | Heinlein's recent problems. This patch adds several things to better update pickled Message objects to the latest email package. Specifically, __init__(): Add a version number to Message objects so that we can make __setstate__() more efficient (I don't want to do the next bit of hackery for every single unpickled Message object). __setstate__(): For Message objects older than the current email package version, we'll ensure that the data format is the same. We keep the previous updates and add one that trolls through the message headers, ensuring that if any of the headers are Header instances, that their chunks all have 2nd items as Charset instances, not strings. This is an invariant for email 2.4.3, but older Message instances might not conform.
* process(): Initialize the line local variable to the empty string, inbwarsaw2002-10-141-0/+1
| | | | case the message has an empty body.
* Whitespace normalization and some Pychecker cleanup.bwarsaw2002-10-092-9/+7
|
* ArchiveMail(): processUnixMailbox() no longer takes an article classbwarsaw2002-10-091-1/+1
| | | | argument.
* _makeArticle(): Override base class method so that we create abwarsaw2002-10-091-1/+6
| | | | | HyperArch.Article instead -- which takes two extra constructor arguments.
* Whitespace normalization and some Pychecker cleanup.bwarsaw2002-10-091-345/+340
|
* processUnixMailbox(): Small but useful refactoring. Don't pass thebwarsaw2002-10-091-4/+6
| | | | | | | | article class as an argument. Instead call out to an override-able method _makeArticle() to return the article instance. This will be overridden in HyperArch.py. Bump __version__ while we're at it.
* CheckHTMLArchiveDir(): Indentation-o pointed out by Dan Mick.bwarsaw2002-10-081-1/+1
|
* process(): I really could have sworn this was already there, butbwarsaw2002-10-081-4/+30
| | | | | | | apparently not. If the first non-whitespace line of the first text/plain subpart has an Approved or Approve header, it's checked for the admin password, but /only/ if there's no real Approved or Approve header in the message (don't use both!).
* Integrating SF patch #594771, i18n'ified pipermail.bwarsaw2002-10-081-368/+411
| | | | | | | | | | | | | | | | | | | sizeof(): Grows a lang argument. Class Article: - grows attributes _lang, _mlist - default self.charset to the server language's charset - constructor grows a lang and and mlist argument - new __setstate__() method for backcompat with older (pickled) archives - as_html(): use i18n.ctime() - in many places, use standard language templates. All inlined tqs templates in this file have been removed. - volNameToDesc(): new Code cleanup. Whitespace normalization.
* Whitespace normalization.bwarsaw2002-10-081-16/+16
|
* ArchiveMail(): Remove the corrupt archive log message. I think thisbwarsaw2002-10-081-2/+0
| | | | just confuses people and the traceback is enough information.
* Integrating SF patch #594771, i18n'ified pipermail. Changes herebwarsaw2002-10-081-3/+49
| | | | | | | | include: ctime(): An i18n'd ctime for the archiver. Whitespace normalization.
* maybe_forward(): The bounce page documents that undetected bouncesbwarsaw2002-10-081-0/+2
| | | | | should go only to the list owners. I don't think the list moderators need to be bothered.
* maybe_forward(): Refactor forwarding logic into ForwardMessage()bwarsaw2002-10-081-13/+5
| | | | method on the MailList instance.
* 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.
* GetConfigInfo(): Add description for filter_action, and flesh out abwarsaw2002-10-071-2/+34
| | | | few of the other descriptions.
* When content filtering, we may not always want to just discard thebwarsaw2002-10-071-0/+1
| | | | | | | | 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. NewVars(): Add 'filter_action' if missing.
* When content filtering, we may not always want to just discard thebwarsaw2002-10-071-1/+1
| | | | | | | | 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. Bump DATA_FILE_VERSION to pick up the new filter_action attribute.
* When content filtering, we may not always want to just discard thebwarsaw2002-10-071-0/+1
| | | | | | | | 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. InitVars(): Set the default filter action.
* ForwardMessage(): Refactor the various places where we're forwardingbwarsaw2002-10-071-0/+21
| | | | messages into a single method.
* When content filtering, we may not always want to just discard thebwarsaw2002-10-071-0/+8
| | | | | | | | | 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. Here, set the default action to discard. Also set the flag that allows owners to preserve filtered messages on disk to true.
* send_i18n_digests(): Chuq politely reminds me that in MM2.0, digestsbwarsaw2002-10-071-0/+2
| | | | | had their Reply-To header pointing at the posting address, and that there was no good reason not to continue this tradition <wink>.
* _setValue(): Tighten the rules for accepting filter_mime_types andbwarsaw2002-10-071-2/+16
| | | | | pass_mime_types entries. They have to look more like a content maintype or maintype/subtype.
* process(): Typo detected by Michael Meltzer; mtype will never be equalbwarsaw2002-10-071-1/+1
| | | | to multipart/alternative (we meant ctype).
* process_request(): Catch BadListNameError's that can get raised if thebwarsaw2002-10-061-2/+6
| | | | proposed list name is invalid.
* ValidateEmail(): Include the string argument in the MMBadEmailErrorbwarsaw2002-10-061-3/+3
| | | | exception.
* Create(): Test the list name to make sure that it will yeild a validbwarsaw2002-10-061-0/+10
| | | | | | | posting address. If not, reject the proposed new list. We use DEFAULT_EMAIL_HOST because at this point we don't know what the host_name of the list is (and in fact the attribute isn't set), but it doesn't matter anyway.
* BadListNameError: New exception for when the list name is invalid.bwarsaw2002-10-061-0/+1
|
* process(): Watch for RFC 2047 encoded From headers and decode thebwarsaw2002-10-051-0/+10
| | | | | realname either to a byte string if it contains just ascii characters, or to a unicode.
* subscription_confirm(): Patch by Tokio Kikuchi, we need to pass thebwarsaw2002-10-051-1/+1
| | | | language into the canonstr() call to properly display the fullname.
* _dispose(): Possibly forward the message in two situations: if thebwarsaw2002-10-051-16/+36
| | | | | | | | | message did not bounce match, or if no member addresses could be extracted from it. maybe_forward(): MIME Forward the given message to the list owner + list moderator, if bounce_unrecognized_goes_to_list_owner is true. Otherwise it discards the message. Write a log entry in either case.
* verpdeliver(): I think I've (finally!) nailed the full name encodingbwarsaw2002-10-041-16/+18
| | | | | | | | problem reported a few weeks ago. We do here largely what we do in CookHeaders.py for encoding non-ascii Subject prefixes. First, we convert the string to Unicode (possibly throwing out characters if necessary), then we use the Header class to properly RFC 2047 encode the name.
* uncanonstr(): We always want this to return a byte string, but itbwarsaw2002-10-041-5/+17
| | | | | | | | | | | | needs to be "safe" for the given charset, which will be the charset for the list's language, and the charset the page will be rendered in. If it's a Unicode and can be encoded in the desired charset, fine, just return the encoded byte string. If it's already a byte string encoded in the charset, again that's fine, just return the string. Otherwise, html-ify the string and return it as a byte string.
* membership_options(): Slight code re-arrangement so we're always surebwarsaw2002-10-041-2/+2
| | | | | that the member's name gets encoded safely for the list's language's charset, which is the charset the page is going to be rendered in.
* Better support for "funny" characters in subject prefixes.bwarsaw2002-10-021-42/+32
| | | | | | | | | | | | | | | encode_p(): Removed. _isunicode(): Helper for unicode type testing. prefix_subject(): Better algorithm for handling unicode subject prefixes. Now we always set the Subject header to a Header instance if we're adding the prefix. Always convert the prefix and all previous Subject header bits to unicode (possibly with character replacements) so that the Header class does the right thing, i.e. does the us-ascii, charset hint, utf-8 encoding. Because of this, if the list's charset is us-ascii, we'll substitute iso-8859-1 for a slightly wider character coverage.
* Better support for "funny" characters in subject prefixes.bwarsaw2002-10-021-0/+10
| | | | | | | | | | | | CookHeaders.py will now be aware that subject_prefix can be a unicode string. _setValue(): Capture changes to subject_prefix and canonstr() it, meaning convert html references to unicode characters. getValue(): Capture access of subject_prefix and uncanonstr() it, meaning convert any non-list-charset characters to their html refs for error free display.
* is_administrivia(): Change slightly the way the administrivia searchbwarsaw2002-10-021-3/+9
| | | | | | | | | | text is calculated. Because msg['subject'] could be a Header instance, we need to str-ify it before appending it to the body lines. uncanonstr(): Coerce the return value to a byte string when html ref substitution is done. Note that this code probably needs to be converted to a type test of s (unicode vs. str).
* subscription_prompt(), subscription_confirm(): Two more places wherebwarsaw2002-09-191-3/+5
| | | | | | we have to convert strings to or from unicode. Given by Tokio Kikuchi, modified slightly by Barry (if it's still broken, it's my mistake).
* change_options(): Patch by Tokio Kikuchi, we need to canonicalize thebwarsaw2002-09-181-0/+1
| | | | realname string.
* canonstr(): With help from Tokio Kikuchi, this patch should make forbwarsaw2002-09-181-3/+13
| | | | | | | | | | better Japanese support. If we're converting to &#XYZ; form, use chr() if the integer is < 256 otherwise use unichr(). If the resulting joined string is already a Unicode, don't convert it. uncanonstr(): Use u'' instead of '' as the string when s is None. The Japanese codecs require a Unicode string as its argument, not an 8-bit string.
* process(): If a member has enabled their DontReceiveDuplicates option,bwarsaw2002-09-171-4/+23
| | | | | we'll also strip their addresses from CC headers in the list copy. This helps keep the CC lines from growing astronomically.
* Fixes for logging of non-ascii messages. We have a default encodingbwarsaw2002-09-171-1/+17
| | | | | | | | | | for the log file (defaults to iso-8859-1, which works for xterms and xemacs buffers, although we may have to change this to us-ascii for release). We try to open the log file using the codecs module so output will be encoded by the proper stream writer. I'm not 100% sure about these changes, but they seem right and work for me.
* verpdeliver(): When including the member's full name in a verp'dbwarsaw2002-09-171-2/+19
| | | | | | | | | | | | outgoing message, we must be sure to properly MIME encode the header, otherwise if the name has non-ascii characters in it, we'll be sending illegally formatted messages. So if the name has non-ascii characters in it, we'll encode it using the character set of the language of the outgoing message. Kludge: if the charset is us-ascii, we'll use iso-8859-1 for a slightly wider utility (more non-ascii names can be used in English lists). Closes SF bug # 601082 by Tokio Kikuchi.
* process_form(): When getting the member's full name out of the webbwarsaw2002-09-171-2/+2
| | | | | form, we need to convert it to a unicode string using the charset of the language of the page.
* main(): When getting the member's full name out of the web form, webwarsaw2002-09-171-10/+9
| | | | | | | | need to convert it to a unicode string using the charset of the language of the page. options_page(): When printing the member's full name, be sure to encode it to the charset of the language of the page.
* unsubscription_prompt(), addrchange_prompt(), reenable_prompt(): Whenbwarsaw2002-09-171-1/+12
| | | | | | showing the unsub'ing (or changing, or re-enabling) member's name, use the version converted to the charset of the web page (or with &#XYZ; conversion).
* show_pending_unsubs(): When showing the unsub'ing member's name, usebwarsaw2002-09-171-4/+3
| | | | | the version converted to the charset of the web page (or with &#XYZ; conversion).