summaryrefslogtreecommitdiff
path: root/Mailman/MailCommandHandler.py
Commit message (Collapse)AuthorAgeFilesLines
* This file has been replaced with the new email command framework.bwarsaw2002-05-021-783/+0
|
* GetAdminEmail() eradication campaign.bwarsaw2002-03-261-8/+8
| | | | | | | ParseMailCommand(), ProcessSubscribeCmd(), AddApprovalMsg(), ProcessHelpCmd(): For human consumption, we should point people at the -owner address as the contact address, but when sending the message out, it should come from the -bounces address for bounce processing.
* ProcessSubscribeCmd(): If the address isn't given in the command, trybwarsaw2002-03-151-3/+10
| | | | to dig the full name out of the From: header.
* Patches to support duplicate suppression for explicit recipients,bwarsaw2002-03-051-7/+13
| | | | | | | | | | written by Ben Gertzfield, ported to MM2.1 by Marc MERLIN. Specifically, NODUPES: Description of the nodupes option. option_desc, option_info, options: Add nodupes.
* __init__(), ParseMailCommands(), __makedispatch(): Don't set up thebwarsaw2002-03-011-1/+6
| | | | | | | __dispatch table in the constructor, as this creates some circular references that are unnecessary most of the time. Only when ParseMailCommands() is run and the dispatch table is empty do we create the table. This should only happen in the CommandRunner.
* ParseMailCommands(): When creating the UserNotification messagebwarsaw2002-02-111-10/+4
| | | | | | | object, pass in the language that the message should be in. This allows us to get the character set and header encodings right. Patch by Ben Gertzfield, with modifications by Barry.
* ParseMailCommands(): There were a couple of places where thebwarsaw2002-01-061-0/+2
| | | | responsemsg wasn't getting the MIME-Version: header set.
* ProcessSubscribeCmd(): Catch MembershipIsBanned exceptions whenbwarsaw2002-01-061-1/+7
| | | | | calling AddMember(). This exception is raised when the subscribing address is banned.
* 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().
* ParseMailCommands(): Dang, this is /really/ the way to guarantee thatbwarsaw2001-11-271-1/+6
| | | | the thing we muck about with is a concrete list object.
* ParseMailCommands(): Work around a difference in email 1.0 and 0.96.bwarsaw2001-11-271-1/+1
| | | | | In Python 2.2, email 1.0, body_line_iterator() returns a generator, which has no insert() method, so be sure to turn it into a list.
* ProcessConfirmCmd(): Need to define listname and url local vars forbwarsaw2001-11-211-1/+4
| | | | | | the i18n string interpolation. Also, rewrite the MMBadConfirmation message, since they may be confirming something other than a subscription request.
* ProcessUnsubscribeCmd(): We need to have a specific case wherebwarsaw2001-10-211-2/+14
| | | | | unsubscribe_policy is true (i.e. admin must approve). This calls DeleteMember() instead of ApprovedDeleteMember().
* ProcessUnsubscribeCmd(): Should use DeleteMember() instead ofbwarsaw2001-10-211-1/+1
| | | | | ApprovedDeleteMember() so that the request can go through admin approval if required.
* ProcessConfirmCmd(): Rename argument `mail' to `msg', and pass it asbwarsaw2001-10-151-2/+2
| | | | the second argument to ProcessConfirmation().
* ParseMailCommands(): addheader() -> add_header().bwarsaw2001-10-051-4/+4
|
* Convert from mimelib to email.bwarsaw2001-10-011-11/+3
| | | | | Also, use cStringIO directly instead of our own hack-around StringIO module.
* Convert lots of split-line strings to triple-quoted strings. Yes,bwarsaw2001-08-171-53/+52
| | | | | | | this is ugly, but it makes the job much easier for translators of certain languages. Also, consistancy for strings which have similar messages.
* ProcessSubscribeCmd(): Use keyword arguments for all parameters to thebwarsaw2001-08-161-1/+3
| | | | | | UserDesc constructor. Previously, we were assigning the password to the fullname, and the digest to the password, so users were ending up with a password of the integer 0. Very bogus.
* Another step towards conversion to MemberAdaptor API.bwarsaw2001-07-291-5/+7
| | | | | | | | GetPreferredLanguage() -> getMemberLanguage() ProcessSubscribeCmd(): Update for new AddMember() signature (requires a UserDesc instance). This still needs to be fixed so that the real name is extracted from the From: line.
* ProcessConfirmCmd(): Slightly improved response message.bwarsaw2001-07-201-1/+1
|
* All membership related attribute access should use the MemberAdaptorbwarsaw2001-07-191-109/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | API instead, e.g. IsMember() -> isMember() self.passwords.* -> getMemberPassword() ConfirmUserPassword() -> [do the comparison ourselves] ChangeUserPassword() -> setMemberPassword() GetUserOption() -> getMemberOption() GetDigestMembers() -> getDigestMemberKeys() GetMembers() -> getRegularMemberKeys() DeleteMember() -> ApprovedDeleteMember() option_info: Make order agree w/ option_desc. ProcessPasswordCmd(): Fix the response string so that it isn't broken on two lines. Remove unnecessary exception handlers. be raised. ProcessOptionsCmd(), ProcessSetCmd(), ProcessUnsubscribeCmd(): Rewrite and simply to use the new membership API. Remove unnecessary exception handlers. ProcessSetCommand(): Split usage printing into __setcmd_usage() method.
* __NoMailCmdResponse => __noresponsebwarsaw2001-07-111-20/+29
| | | | | | | | | | | | | | | | | | AddToResponse(): Use augmented assignment where appropriate. ParseMailCommands(): Set the __noresponse flag to 0 at the top of this method, so there's no chance that a previously handled command will mess up sending a response to this command. ProcessConfirmCmd(): Save the results from ProcessConfirmation() and check the operation in the first element. If it's a Pending.SUBSCRIPTION and the mailing list already sends out welcome messages, then don't send a "succeed" confirmation ourselves. Also, in the big except clause, catch MMNoSuchUserError which can happen if the user has made two unsub requests and confirmed them both (the second will trigger the exception). Do something more sensible than letting the exception trickle all the way back up. ;)
* MailCommandHandler.ProcessOptionCmd() and MailCommandHandler.ProcessSetCmd():twouters2001-07-101-2/+2
| | | | 'option_descs' -> 'option_desc', as that is what the global is named.
* Use better syslog() calling convention.bwarsaw2001-06-271-9/+8
| | | | Also, syslog messages should not be marked as translatable.
* AddApprovalMsg(), ProcessHelpCmd(): Instead of passing in the list'sbwarsaw2001-05-181-2/+2
| | | | | preferred language, simple pass in self; maketext() digs the preferred language out of the list object.
* __init__(): "join" is now a synonym for "subscribe". "remove" andbwarsaw2001-04-021-19/+51
| | | | | | | | | | | | | | | "leave" are synonyms for "unsubscribe". ProcessUnsubscribeCmd(): It is now legal to omit both the password and email address when unsubscribing via the -request address. If the password is omitted, a removal confirmation message is generated. However if the password was given, it must match the user's password or the removal fails. If the password matches, the removal is performed immediately. Note that there's an ambiguity if exactly one argument is given: is it a password or an email address? Use FindUser() to decide giving preference to email address.
* ProcessConfirmCmd(): Confirmation cookie is now a string, not abwarsaw2001-03-261-26/+12
| | | | | number. Also, rewrite slightly the error message string, and other messages.
* Untabify.bwarsaw2001-03-241-165/+165
|
* Various fixes for better handling of confirmation messages,bwarsaw2001-03-241-25/+31
| | | | | | | | | | | | | | | | | | | | | | specifically: ParseMailCommands(): Use a mimelib MsgReader idiom to get just the body of the message, sans headers. This could be made easier with Python 2.1's xreadlines module or a better interface on Message objects. Substitute one crufty parsing of the Subject: line for another. Actually now, any command can appear anywhere on the Subject: line, and confirmation messages are just another form of that (by changing the Subject: text from "request" to "confirm" -- same as the body command). Fixed typos in language support (mlist -> self). Rewrite the "errors-in-command" string so that the substitution keys are actually the correct ones! AddError(): Python 2.0-isms.
* A start on updating i18n support -- still needs work.bwarsaw2001-03-021-15/+23
| | | | | | | | | | | | | | ParseMailCommands(): add an extra argument `msgdata' since it's convenient to have access to the message's metadata. Mark some more strings as translatable. Make sure messages getting sent back to the user have the proper Content-Type: based on the language context. msg.GetSender() -> msg.get_sender() Close SF bug #405131, submitted by Chris Ryan.
* Next round of big i18n patches.bwarsaw2001-02-281-79/+98
| | | | | | | | | | | | | Better formatting of command descriptions. _ function should come from Mailman.i18n not from gettext. ParseMailCommands(): Convert to using mimelib interface. Fix the Utils.maketext() calls to pass the language in as a keyword argument. Fix some _() wrappings to use local variables.
* De-string-module-ify.bwarsaw2001-02-151-30/+30
| | | | | | | | | | References to HandlerAPI module removed. Use new mimelib and switchboard interfaces. Use other Python 2.0 features as appropriate. NOTE: This whole module really needs a good rewrite.
* Latest round of jcrey's I18N patches. Specifically,bwarsaw2000-12-261-4/+17
| | | | | | Mark various strings as translatable. ParseMailCommands(): Set $LANG to the user's preferred language.
* First integration patch for Juan Carlos's translatable string changesbwarsaw2000-12-071-114/+116
|
* ProcessInfoCmd(), ProcessHelpCmd(): GetAbsoluteScriptURL() =>bwarsaw2000-08-011-2/+2
| | | | GetScriptURL(..., absolute=1)
* ParseMailCommands(): Use mm_cfg.LIKELY_BOUNCE_SENDERS instead ofbwarsaw2000-06-231-3/+1
| | | | hard-coded list (see change in qrunner).
* Convert all uses of mlist.LogMsg() to the new syslog() interface.bwarsaw2000-06-021-14/+12
|
* ParseMailCommands(): Use the new Replybot.process() API. This isbwarsaw2000-05-091-1/+10
| | | | | | | | slightly bogus -- see the TBD comments in the code. ProcessUnsubscribeCmd(): Catch MMBadUserError which can happen when the user has a None entry in mlist.passwords (how can that happen? legacy code?)
* ProcessSubscribeCmd(): Fixed small typo in previous checkinbwarsaw2000-04-081-1/+1
|
* ProcessSubscribeCommand(): Use MailList.GetAdminEmail() for obtaininghmeland2000-04-081-4/+4
| | | | | list admin contact address, instead of trusting the MMNeedApproval exception to have been raised with the correct address as argument.
* ProcessPasswordCmd(), ProcessSetCmd(), ProcessUnsubscribeCmd(),bwarsaw2000-04-041-4/+4
| | | | ProcessSubscribeCmd(): MMListNotReady => MMListNotReadError
* ProcessListsCmd(): Catch base class MMListError.bwarsaw2000-04-041-1/+2
|
* Update the copyright lines to include the years 1999 & 2000.bwarsaw2000-03-211-1/+1
|
* ParseMailCommands(): Simply return if the message has an X-BeenTherebwarsaw2000-02-261-0/+6
| | | | | header or a List-ID header. This should break most common listserv infloops, and addresses PR#206.
* ParseMailCommands(): Handle autoresponding to the -request address.bwarsaw2000-02-261-0/+7
| | | | | | If autorespond_requests is turned on, then send the original message through the Replybot.process()'ing. Here's where we handle whether to "reply and discard" or "reply and forward".
* ParseMailCommands(): The message object gets constructed and passed inbwarsaw1999-12-161-2/+1
| | | | by scripts/mailcmd
* ParseMailCommands(): typo that caused a very interesting (and subtle)bwarsaw1999-11-251-1/+1
| | | | bug
* AcknowlegePosts => AcknowledgePostsbwarsaw1999-11-241-30/+31
| | | | Some rewording of the notification messages.
* ProcessListCmd(): Avoid circular importsbwarsaw1999-11-101-1/+1
|