summaryrefslogtreecommitdiff
path: root/Mailman/MailList.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed bug 1435722 by encoding the i18n subject in the character set of themsapiro2006-02-221-3/+5
| | | | | translation rather that that of the list language. (The subscribers language may be different.)
* Port cleaning changes forward from 2.1-maint branch.bwarsaw2005-12-301-4/+5
|
* Improving banned subscription logic to cover all invites, subscribes, ↵msapiro2005-12-031-23/+59
| | | | address changes and confirmations of same.
* back porting from 2.1.6tkikuchi2005-08-281-93/+192
|
* FSF office has moved. chdcking in for MAIN branch.tkikuchi2005-08-271-1/+1
|
* __save(): Flush the file and (depending on SYNC_AFTER_WRITE) fsync itbwarsaw2003-10-101-0/+3
| | | | before closing the config.pck file. Should improve robustness.
* MailList.__init__(): When trying to execfile extend.py, we ignorebwarsaw2003-09-281-1/+5
| | | | | | | ENOENT but log all other IOErrors instead of propagating them up. Closes a tiny exploit found by Ned Dawes. Backport candidate.
* InviteNewMember(): Add a call to ValidateEmail() to make sure we can'tbwarsaw2003-06-061-0/+1
| | | | invite invalid addresses. Backport candidate.
* ApprovedChangeMemberAddress(): When changing an address globally,bwarsaw2003-04-081-0/+2
| | | | | | check to make sure the old address is a member of the list before calling changeMemberAddress(). Bug report # 717096 and fix by Joe Peterson.
* Another booleanbwarsaw2003-03-311-1/+1
|
* InviteNewMember(): Set the .invitation hack to the name of the listbwarsaw2003-03-161-4/+18
| | | | | | | | | | being invited to, in order to prevent cross-list invitation confirmation attacks. ProcessConfirmation(): Check that the .invitation attribute matches the name of the list confirming to. Closes SF bug # 703941 by Stuart Bishop, who also suggested the basic fix.
* __init__(): Don't call out to extend.py if name is None. This will bebwarsaw2003-02-241-7/+9
| | | | | the case when creating the mailing list, in which case fullpath() will be None so we won't be able to locate the list directory.
* Application of SF patch # 690448 by Tokio Kikuchi, closing SF bug #bwarsaw2003-02-241-5/+15
| | | | | | | | | | | | | 677668. Specifically, ApprovedAddMember(): Make sure the admin notification is i18n safe by temporarily setting the language to the list's preferred language, and str-ifying the full name to the list's language, replacing any wacky characters. :) DeleteMember(): Set admin_notify default value to None instead of 0, so that the list's admin_notify_mchanges takes precedence in most cases.
* __init__(): Call the extension mechanism before attempting to lock thebwarsaw2003-02-241-13/+13
| | | | database.
* ChangeMemberAddress(): Don't raise MMAlreadyAMember if we're doing abwarsaw2003-01-021-13/+4
| | | | | | | | | | global change. ApprovedChangeMemberAddress(): Don't worry about trying to reduce the amount of work by testing on isMember(). This doesn't work anyway when we're changing an address for case only. Just do the changeMemberAddress() call and be done with it. Same goes for when deciding whether to do the change in the other lists.
* Inconsequential change since I forgot a checkin message on the last mod:bwarsaw2002-12-311-1/+1
| | | | | | | | ProcessConfirmation(): In the Pending.SUBSCRIPTION section, move the concatenation of the context with the userdesc to before we extract the addr, fullname, password, digest, and lang. This is so we can correctly pick up any changes made in the confirmation page, e.g. the user's preferred language.
* ApprovedDeleteMember(): Get the user's language /before/ webwarsaw2002-12-311-8/+8
| | | | | | unsubscribe them, and then pass this to the SendUnsubscribeAck() call. This is so the notification message can get sent in the correct language -- i.e. the user's language while they were a member.
* ApprovedAddMember(): The administrator notice should go out in thebwarsaw2002-12-241-1/+1
| | | | list's preferred language. Closes SF #629616.
* AddMember(), ApprovedAddMember(): Use email.Utils.formataddr() to formbwarsaw2002-12-121-6/+3
| | | | | the name/address of the person being pending subscribed or subscribed, as written to logs/subscribe.
* InitVars(), CheckValues(): Set host_name and web_page_url based onbwarsaw2002-12-021-8/+11
| | | | | | | | | whether the old variable names have been overridden in mm_cfg.py or not. If not, use the new variable names. ApprovedDeleteMember(): Don't check for isMember() here since the removeMember() call will raise the appropriate NotAMemberError if necessary. Besides MMNoSuchUserError is removed now.
* __getstate__(), __setstate__(): Remove the hackery to avoid picklingbwarsaw2002-11-041-17/+0
| | | | | | | | | | the lock object. The real problem, as sleuthed out by Dan Mick, was that the archiver i18n patches added a _mlist attribute to Article objects, which caused the MailList instances to get pickled into the *-article pickles. See fixes to HyperArch.py and HyperDatabase.py for additional important fixes.
* ProcessConfirmation(): When doing a Pending.UNSUBSCRIPTION, set whencebwarsaw2002-10-251-1/+6
| | | | based on whether the context is a Message or not.
* ApprovedDeleteMember(): The signature of the OwnerNotificationbwarsaw2002-10-231-8/+2
| | | | | | | | | | | constructor is changing. We no longer pass the sender in since that's calculated to be the site list's -bounces address to prevent mail loops when a list's owner bounces. ApprovedAddMember(): Change the UserNotification to an OwnerNotification for the admin_notif section. Problem diagnosed by Peer Heinlein.
* Create(): include the full posting address in the error message forbwarsaw2002-10-201-2/+3
| | | | when the posting address is invalid.
* __getstate__(), __setstate__(): Get rid of the lock object attributebwarsaw2002-10-201-2/+13
| | | | on both pickling and unpickling, for legacy archive pickles.
* __getstate__(self): Never pickle the lock object! I believe thisbwarsaw2002-10-191-0/+6
| | | | fixes SF bug # 625516, but more testing needs to happen.
* Remove a useless comment.bwarsaw2002-10-151-1/+0
|
* ApprovedDeleteMember(): Use the new OwnerNotification class to sendbwarsaw2002-10-151-3/+4
| | | | | | the admin_notify_mchanges notice. This also fixes the bug Chuq saw where the notification message was sent to the list owners via a roundtrip through the mta. We now send it directly to the owners.
* 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.
* 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.
* __init__(): Don't try to run the extend() function from extend.py ifbwarsaw2002-09-051-1/+3
| | | | | it's not there. It could be that all the interesting bits get executed as a side effect of the execfile().
* ProcessConfirmation(): Fixed SF bug #596456, similar problem tobwarsaw2002-08-231-2/+2
| | | | | #593454 in that typed_subpart_iterator must be converted to a sequence #for subscripting.
* InitVars(): Added pass_mime_types.bwarsaw2002-08-151-9/+10
| | | | Also, whitespace normalization.
* InitVars(): Set the new config variable encode_ascii_prefixes whichbwarsaw2002-08-091-0/+6
| | | | | controls whether the Subject: prefix gets encoded when it's ASCII and the list's preferred language uses a non-ASCII character set.
* ApprovedChangeMemberAddress(): Watch out for situations where the newbwarsaw2002-07-111-1/+6
| | | | | | address is already a member and don't make the address change in that case. However, if the old address is still a member, we'll just delete it.
* autorespondToSender(): Implement MAX_AUTORESPONSES_PER_DAY = 0 meansbwarsaw2002-07-091-0/+3
| | | | no limit.
* InviteNewMember(): Prepend any text given in the mass subscribe pagebwarsaw2002-05-281-5/+13
| | | | | | | | | | | | | | | | to the invitation notification. Also, set an `invitation' attribute on the UserDesc record stored in the pending database. This is a hack so that ProcessConfirmation() can figure out if the subscription request was an invitation or not (easier than adding an INVITATION type to the Pending module). ApprovedAddMember(): Option text argument for passing in prepended text for subscription notifications. ProcessConfirmation(): If the SUBSCRIPTION action was an invitation (based on the magic existance of the `invitation' attribute on the UserDesc record), don't do additional approvals. If the user was invited, we /know/ the admin had to approve of that!
* InitVars(): Add a new attribute hold_and_cmd_autoresponses which is abwarsaw2002-05-281-0/+46
| | | | | | | | | | | | | | dictionary mapping sender addresses (they don't have to be members) to a 2-tuple of information (date, count). date is a 3-tuple of (year, month, day) and count is the number of auto-responses sent to the sender today. autorespondToSender(): This method is called whenever we're about to send a response to a -request message, or a hold notification. It returns 1 if the caller should send a normal autoresponse, and 0 otherwise. When we've just exceeded the maximum number of autoresponses, we send a message indicating that no more responses will be sent today (instead of the normal autoresponse).
* Load(): The order of CheckVersion()/CheckValues() call needed to bebwarsaw2002-05-071-1/+1
| | | | reversed, or lists created with 2.0.x won't migrate correct to 2.1b2.
* MailList: Remove MailCommandHandler from the list of base classes;bwarsaw2002-05-021-6/+4
| | | | it's obsolete now. Also, update some comments.
* ProcessConfirmation(): When checking the subscribe_policy, be sure tobwarsaw2002-04-191-1/+4
| | | | | | compare it to 2 and 3 (approval & approval+confirm). It's possible the policy was changed in the middle of the confirmation process. Reported by Dale Newfield.
* InitVars(): Added include_list_post_header which controls whetherbwarsaw2002-04-191-0/+1
| | | | | List-Post: is added or not. Announce-only lists should set this to "No".
* CheckValues(): Watch for bad patterns in topics and discard them ifbwarsaw2002-04-181-1/+11
| | | | | found. The Topics gui will catch these for newly defined patterns, but there may be some legacy topic patterns in the list config.
* Port of Les Niles' patch to do de-mime. Specifically,bwarsaw2002-04-141-0/+4
| | | | | InitVars(): Add attributes filter_mime_types, filter_content, and convert_html_to_plaintext.
* CheckValues(): It's possible that some how the following bogusbwarsaw2002-04-111-0/+11
| | | | | | | | situation got set: there's an empty (after stripping) reply_to_address, and reply_goes_to_list is set to "explicit address". This isn't a legal combination (but could have gotten this way through legacy settings or bad bin/withlist manners), so reset both values.
* ApprovedAddMember(): dump_address_pair() -> formataddr().bwarsaw2002-04-111-2/+2
|
* CheckVersion(): We have to force a reload of the database even if ourbwarsaw2002-04-091-1/+3
| | | | timestamp implies we're up-to-date. Otherwise our state gets zapped!
* __load(): Big dummy, os.path.getmtime() can raise an OSError if thebwarsaw2002-04-051-5/+12
| | | | file doesn't exist. Need to catch that.
* Make it much cheaper to call Load(), especially when the state hasn'tbwarsaw2002-04-011-5/+20
| | | | | | | | | | | | | | | | | | | | changed since the last Load(). This means it will be cost effective to reload the state when necessary in qrunners which don't lock the list (e.g. OutgoingRunner). Specifically, InitTempVars(): Set a temporary timestamp attribute, which gets the mtime of the config.pck file upon successful load. __save(): When we save the file, set the timestamp to the file's mtime (we just saved it so it must be up-to-date -- since this is done with the list lock acquired, there shouldn't be a race). __load(): If the file's mtime is <= the current timestamp, then we've got the most current state. This method can now return (None, None) meaning we didn't need to load anything. Load(): Watch for dict is None and e is None, meaning we didn't need to load anything.
* GetAdminEmail() eradication campaign.bwarsaw2002-03-261-6/+5
| | | | | | | | | | | GetBouncesEmail(): Return the list's -bounces address. GetAdminEmail(): Obsolete, removed. AddMember(), ChangeMemberAddress(), ConfirmUnsubscription(): Make the notification email appear to come from the -bounces address. When the sender is for human consumption, make it the -owner address (or in the case of Cleanse.py for anonymous lists, the list posting address).