summaryrefslogtreecommitdiff
path: root/Mailman/Digester.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* InitVars(): For new lists, set one_last_digest to {}. Found by bothbwarsaw2001-09-081-0/+1
| | | | Mentor Cana and Michael Totschnig.
* All:bwarsaw2001-07-181-82/+0
| | | | | | | | | | | | | | | | | | | | | | | | GetConfigInfo(): Removed. All admin ui gui elements are moved into components in the Mailman/Gui subdirectory. All membership related attribute access should use the MemberAdaptor API instead, e.g. IsMember() -> isMember() GetUserOption() -> getMemberOption() SetUserOption() -> setMemberOption() Also use ApprovedDeleteMember() instead of DeleteMember(). Deliverer.py: Remove last vestiges of os.environ['LANG'] Digester.py: SetUserDigest(): Removed. This is replaced by OldStyleMemberships's setMemberOption() method when flag == mm_cfg.Digests
* bump_digest_volume(): Fixed cut-n-paste typos (mlist => self).bwarsaw2001-07-101-2/+2
|
* Add missing import of the 'errno' module.twouters2001-06-061-0/+1
|
* SetUserDigest(): Do not do a self.Save() at the end of this. Ibwarsaw2001-05-311-2/+0
| | | | | | | | believe all calls to SetUserDigest() should be wrapped in the standard lock-munge-save-unlock fences. If not, they should be! This should radically improve performance when many of these calls are made sequentially.
* GetConfigInfoy(): Instead of passing in the list's preferred language,bwarsaw2001-05-181-4/+3
| | | | | | | | simple pass in self; maketext() digs the preferred language out of the list object. SetUserDigest(): Add a note about the (possibly) redundant self.Save() call.
* GetConfigInfo(): Two new configuration variables have been added:bwarsaw2001-05-011-0/+44
| | | | | | | | | | | | | | | | | - digest_volume_frequency describes how often a new digest volume should be started. Values are Yearly, Monthly, Quarterly, Weekly, Daily. When a new digest volume is started, the volume number is incremented and the next_digest_number is reset to 1 - digest_last_sent_at records when the last digest was sent, used to calculate when a new digest volume should be started. In addition, two new pseudo-variables are added which allow the list admin to start a new volume with the next outgoing digest, and to send the current digest right now, if it isn't empty. send_digest_now(), bump_digest_volume(): New methods to encapsulate sending a digest and bumping the volume number.
* Added missing import.bwarsaw2001-02-281-1/+2
|
* Latest round of jcrey's I18N patches. Specifically,bwarsaw2000-12-261-2/+6
| | | | | GetConfigInfo(): Set $LANG to the list's preferred language. Pass the desired language to the maketext() call.
* First integration patch for Juan Carlos's translatable string changesbwarsaw2000-12-071-17/+17
|
* GetConfigInfo(): Use Utils.maketest() to get the extra html forbwarsaw2000-09-171-5/+6
| | | | | digest_header and digest_footer. Closes SF bug #114167, Jitterbug PR #209.
* SetUserDigest(): Added new `force' flag, so that setting the digestbwarsaw2000-09-111-3/+3
| | | | | | | | mode from the admin page won't check for digestable/nondigestable setting on the mailing list. Presumably the admin knows what s/he is doing. Fixes SF bug #114089 / Jitterbug PR# 166.
* Update the copyright lines to include the years 1999 & 2000.bwarsaw2000-03-211-1/+1
|
* GetConfigInfo(): Use TEXTFIELDWIDTH for all string input fieldsbwarsaw2000-03-031-2/+4
| | | | (including text areas).
* Rip out great gobs of unused stuff. Most of the functionality is nowbwarsaw1999-11-101-381/+3
| | | | in Handlers.ToDigest
* SatisfyRefs(): Add `cgiext' key with value taken from mm_cfg.CGIEXT.bwarsaw1999-07-181-0/+1
| | | | This gets the proper URL into digest footers.
* Fixed ordering of MIME boundaries.hmeland1999-06-131-4/+5
|
* eradicate "maillist" as a noun (sorry Ken :-)bwarsaw1999-05-051-2/+2
|
* Sweeping changes to hopefully and finally (for 1.0 at least) make sanebwarsaw1999-03-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | address case matching. These changes require the DATA_FILE_VERSION to be bumped, which should auto-update your config.db files. I sure hope this works correctly! Details of changes: MailList.GetUserSubscribedAddress(): New method. If the address is a member, this returns the case-preserved address the user is subscribed with. If not a member, None is returned. MailList.GetUserCanonicalAddress(): New method. If the address is a member, this returns the lowercased address the user is subscribed with. If not a member, None is returned. MailList.FindUser(): Wrote down, in a big comment, the constraints for the dictionaries self.members, self.digest_members, self.passwords. This wasn't always followed, but now it should be. FindUser() is now also guaranteed to return the lowercased version of the subscribed email address. This wasn't always the case. FindUser() also provides a shortcut for the common case. ApprovedAddMember(): Guarantee that passwords stored in self.passwords are keyed off the lowercased address. Deliverer.MailUserPassword(): Find the user's password using the lowercased version of their address. However, be sure to use their case-preserved address for the recipient of the password email. Digester.SetUserDigest(): Fixed a fairly old bug where a user switching from regular to digest membership (or vice versa) would get their case-preserved address blown away. I don't think there's any way to recover this information, but at least now we properly save it. SecurityManager.ConfirmUserPassword(): Simplified address matching stuff, since we now guarantee that FindUser() will return a lowercased address, and that the passwords dictionary has lowercased keys. FindUser() will return None if the address isn't found, and it also has a built-in shortcut so that the more expensive FindMatchingAddresses() isn't called in the common case. I eliminated the case-insensitive password comparision that Ken rightly questioned in his comment. admin.py: In the list of members, display a member's case-preserved address instead of their lowercased address. Also, obscure the URL in the hyperlink (probably not terribly necessary). handle_opts.py: When the password can't be found (when emailing it), put the address we tried to find in the result message. Makes for better debugging. options.py: Use a better mechanism for finding if the member has a case-preserved address different from their lowercased address.
* SetUserDigest(): When turning digests off, stick the entry forbwarsaw1999-03-091-5/+13
| | | | | | | | | | | digest_members onto one_last_digest attribute. This attribute is checked in SendDigest(). SendDigest(): Add the members in one_last_digest attribute to the digest recipients. This means that folks who turn digests off at least don't lose messages. This is a kludge but it was much harder to send the digest to the user when they undigest, so this is a workable compromise.
* These changes represent the changes that make mailman's addressingcotton1998-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | work like unix mail: username portions of addresses are case-preserved for delivery only. All other address comparisons are lowercase. up'd data version in Defaults to 13 ** MailList.py: added an __AddMember method that takes an address and whether or not it is a digest address as args and populates the member dictionary like this: if string.lower(addr) == LCDomain(addr): member_dict[addr] = 0 else: member_dictp[string.lower(addr)] == LCDomain(addr) added .GetDeliveryMembers() and .GetDigestDeliveryMembers() methods for use by posting and digest delivery mechanisms. changed a nested def portion in Post to use an explicit loop. **Digester.py: uses .GetDigestDeliveryMembers instead of .GetDigestMembers(). **Utils.py: address comparisons are lc. **versions.py: populate the member dicts according to the above formula. **Cgi/admin.py: fixed a bug introduced from the first change to using member dictionaries: all members were showing up as digest members on the admin membership page. changed a dict.get to dict.has_key to fix this. NOTE: this code is tested only insofar as I posted and poked around on the cgi's a bit, and let lists do the versions code. These changes should be tested more, but I *have* to go now and wanted to check them in before someone made it difficult to do so by changing stuff tomarrow, cause i'm gone all day tomarrow. scott
* This change implements storing list members and digest members ascotton1998-11-191-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dicts instead of lists, which optimizes Utils.FindMatchingAddresses and general membership management, especially for large lists. MailList.py now supplies .GetMembers() and .GetDigestMembers() to supply the data in list form to anything that needs it that way. An new install showed this worked fine with some cursory testing of the cgi's and interactive poking around. A detailed listing of the changes follows: Mailman/Defaults.py.in: change data version to 11 Mailman/Digester.py: initvars now instantiates digest_members as {} instead of [] lines 113-114 and 121-122 now use del This change implements storing list members and digest members as dicts instead of lists, which optimizes Utils.FindMatchingAddresses and general membership management, especially for large lists. MailList.py now supplies .GetMembers() and .GetDigestMembers() to supply the data in list form to anything that needs it that way. Though INSTALL shows up on the changed files section, a diff a few seconds ago didn't show any differences in that file, so I hope nobody changed it in the interim. An new install showed this worked fine with some cursory testing of the cgi's and interactive poking around. A detailed listing of the changes follows: Mailman/Defaults.py.in: change data version to 11 Mailman/Digester.py: initvars now instantiates digest_members as {} instead of [] lines 113-114 and 121-122 now use del list.[digest_]member instead of list.[digest_]members.remove when figuring who to actually send digests to, use list.GetDigestMembers() instead of list.digest_members. Mailman/HTMLFormatter: now uses list.Get[Digest]Members to get subscribers, and length of digested subscribers and regular members MailCommandHandler, SecurityManager,Cgi/handle_opts, Cgi/options: all simple replacements of list.[digest_]members with list.Get[Digest]Members(). Mailman/Cgi/admin.py: mostly simple replacements of list.[digest_]members with the Get..() methods, however, the membership management section now works much quicker and changes digest->nodigest subscriptions via dictionary manipulations. Mailman/versions.py: updates lists to use dicts and changed list.[digest_]members to use the list.Get[Digest]Members() methods. Mailman/Utils.py: added a function "GetPossibleMatchingAddresses" which when fed an address, returns the list of addresses that "smart" address matching would match. changed FindMatchingAddresses(name, list) to use a new signature: FindMatchingAddresses(name, *dicts), where dicts is a list of dictionaries keyed by addresses. Just realized that this would better be FindMatchingAddresses(name, dict, *dicts) so that it enforces atleast 2 args... I'll make that change in a sec. All uses of FindMatchingAddresses have been changed to fit the new arguments. scott ----:**-F1 cvs30458aaa 1:12PM 0.98 Mail (Text Fill)--L59--32%------------------------------------------- ?
* For plain digests we now filter the headers to remove everything butklm1998-07-131-4/+54
| | | | | the really interesting ones, as specified with defaults setting, 'mm_cfg.DEFAULT_PLAIN_DIGEST_KEEP_HEADERS'.
* Digester.InitTempVars(): Add setting of self._mime_separator here,klm1998-07-011-0/+3
| | | | since it's really the purview of Digester.
* Convert all module names to their new names.bwarsaw1998-06-191-11/+17
| | | | | | Removed RCS crud Note: DIGEST_MASTHEAD still needs pulling out into a templates/*.txt file
* digest_send_periodic now uses a Radio button instead of a number box, sinceviega1998-06-111-2/+3
| | | | it is currently a boolean variable.
* Whoops, I forgot to check these in. They're changed to handleviega1998-06-031-2/+3
| | | | | relative paths, mainly GetScriptURL->the appropriate replacement. Now I'm done w/ checkins, and I'm going to test the current snapshot.
* No longer pass in the stupid news parameter to DeliverToList(), sinceviega1998-06-021-3/+3
| | | | that parameter is dead.
* Pass the flag to .DeliverToList() that says, "don't repost this mailviega1998-05-311-5/+5
| | | | to news".
* Fixed a typo in the zipcode.viega1998-05-261-2/+2
|
* Added copyright notices to all source files where I am legally entitled to ↵viega1998-05-251-1/+18
| | | | | | | do so. Added a copy of the GNU GPL. Added information about mailman-users in README, and reworded some text in there (made the credits less verbose... perhaps they should move to a credits file?)
* Removed constant i added but didn't use (SUBJ_REGARDS_PREFIX).klm1998-05-031-3/+1
|
* .SaveForDigest():klm1998-05-021-18/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Digest messages now keep all headers except 'received', 'errors-to', and all 'x-*' ones (and any continuations of these). - Mime digest messages now properly (i believe) contain mime attachments. (The key was preserving the original content-type header.) - It may be that some more headers should be trimmed, ie for the sake of the non-mime recipients - but actually, it doesn't look cluttered, for the few sample messages i tried. - The entries in the table-of-contents have the redundant subject-prefix string removed. Digest: Redundant "Vol" in masthead string removed. I took a look at rfc 934 (thanks, barry), which is the pre-Mime standard for encapsulating (nesting) messages in other messages, and it looks like the key is to have an "encapsulation boundary" that starts with a "-" dash - looks like mime extended from this. However, the old rule for nesting an encapsulated message within another encapsulated message is to insert a "- " space in front of the original encapsulation boundary. Unfortunately, this would break mime encapsulation, so i'm not implementing this part of the old burstable-digests standard. The rest of it *may* be ok, though, in case anyone has the old-style bursting readers... Anyway, i've done about as much as i was hoping to do with the digests format - i don't forsee devoting much more attention to features, just to ironing out bugs.
* .SendDigest(): digest_text wasn't defined - had to read the file.klm1998-05-011-2/+2
|
* Digest(): new class which represents a digest in a presentation-klm1998-05-011-79/+134
| | | | | | | | | | | | | neutral format, and then can present as either plain or mime format. Much cleaner than when the digest structure and layout was combined with the other logic in .SendDigest(). .SendDigest(): Use new Digest() class to compose the digest and then present it in either (or both) formats. Much simplified as the digest structure and layout logic is now in the digest class. Added DIGEST_MASTHEAD, removed DIGEST_HEADER_TEMPLATE and DIGEST_CLOSE_TEMPLATE.
* For mime digests, substitute the result of mimetools.chooseboundary()klm1998-04-271-67/+82
| | | | | | | | | instead of the ad-hoc one. This should be more robust and more likely to not break sendmails out there... (There actually has been lots of restructuring, in preparation for using a digest object that will provide for better mixed multipart mime presentation...)
* .SaveForDigest(): When reply_goes_to_list is set, add a reply-to:klm1998-04-231-6/+11
| | | | list to each digest entry. (From janne sinkkonen, more or less.)
* Add the number of messages to the digest subject lines.klm1998-04-221-12/+21
| | | | Regularize the digest header list info section slightly.
* (First checkin after release tagged mailman-1_0b2.)klm1998-04-141-29/+34
| | | | | | | | | Changed digest header format slightly, but changed the code more to use keyword format strings instead of order-dependent ones, to make reorganizing the text a lot less fragile. (I'm coming to think that having a footer is mostly undesirable, so mm_cfg.DEFAULT_DIGEST_FOOTER should be the empty string.)
* Send messages by connecting directly to port 25 and talking SMTP toklm1998-04-131-3/+19
| | | | whatever mail delivery agent is there.
* Track move of MESSAGE_DECORATION_NOTE from mm-defaults to mm_err.mailman1998-04-091-3/+3
|
* Preparing to package a distribution - add a module docstring andmailman1998-04-091-0/+4
| | | | __version__ info.
* Added new-format descriptive header, as string in options list.klm1998-04-071-8/+11
| | | | Elaborated some options with supplementary description.
* Do *not* sort the members (digest or non) in the list record - sortmailman1998-03-271-2/+0
| | | | them before presenting an ordered list.
* If the lists are going to remain sorted, they must be sorted whenmailman1998-03-261-0/+2
| | | | digestification status changes.
* Changed sense of plain vs mime default digest format buttons, to agreemailman1998-03-241-1/+1
| | | | with default setting.
* Moved truncate and close of digest_file and topics_file to *just*mailman1998-03-241-15/+20
| | | | | | | before the delivery, so the accumulated messages are not removed until the first copies are about to be sent. Refined digesting log messages.
* Log a message if digest file is unlocatable.mailman1998-03-201-14/+32
| | | | In general, use .LogMsg() instead of arbitrary digest.log file.
* Added periodic (with help of senddigest cron job) digest transmissionmailman1998-03-131-23/+48
| | | | | | | | | | | | | | | | | in addition to size-threshhold triggering, and periodic mechanism enabled by new option DEFAULT_DIGEST_SEND_PERIODIC - by default, active. New methods SendDigestOnSize() and SendDigestIfAny() - the latter used by new script (in ../cron dir) senddigests. Made mime mode the default for digests. New option digest_is_default allows moderator change. (Took a lot of changes all over, since the user options are much more abstruse than the list options, and weren't formerly hooked up with a list option.) Some reduction of text added to mime formatted messages (i might say clutter:) - some whitespace, and particularly the "** Message %d:..." ... "** End of message..." message body brackets - mime maillists i use don't include that kind of thing and look quite fine.
* Resolving digest header and footer formats against list.__dict__ (justklm1998-03-081-6/+10
| | | | | | | | | | | | before posting). Getting digest header and footer from (new) default settings. Changed subject of footer message from "Reminder" to "Digest Footer". (NOTE that the mime seems to be kinda funky - my mua, a fairly current version of Unix pine, does not recognize it as mime, and it tends to be pretty good about that kind of thing.)