summaryrefslogtreecommitdiff
path: root/Mailman/Deliverer.py
Commit message (Collapse)AuthorAgeFilesLines
...
* DeliverToList(): Always remove return-receipt-to andbwarsaw1999-07-221-0/+3
| | | | | disposition-notification-to headers, which could be used to troll for list membership.
* .DeliverToOwner(): Always use the list admin address as envelopehmeland1999-05-041-16/+9
| | | | sender to avoid getting tangled up in relay-restriction problems.
* DeliverToList(): Also get rid of duplicate errors-to headersbwarsaw1999-04-021-1/+2
|
* DeliverToList(): Strip off any duplicate Sender: headers, leaving justbwarsaw1999-03-311-0/+2
| | | | the one pointing to the list-admin.
* Sweeping changes to hopefully and finally (for 1.0 at least) make sanebwarsaw1999-03-291-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* DeliverToOwner(): check the value of mm_cfg.USE_ENVELOPE_SENDER tobwarsaw1999-03-251-1/+3
| | | | decide whether to use msg.GetEnvelopeSender() or not.
* MailUserPassword(): Use `mailing list' instead of `maillist'.bwarsaw1999-03-241-1/+1
|
* MailUserPassword(): members value can be other non-string typesbwarsaw1999-03-091-1/+1
|
* MailUserPassword(): If the user's "case-preserved" address is the samebwarsaw1999-03-081-3/+3
| | | | | as their lowercased address, then the key in self.members is 0. Watch out for this situation.
* MailUserPassword(): Find the member's password by checking for thebwarsaw1999-03-051-2/+3
| | | | | | | | | lowercased match. I think the idiom is casepreservedaddr = mlist.members.get(self.FindUser(caseanyaddr)) This seems to fix the problem of getting your password mailed back to you when you've subscribed with an uppercase username part.
* On some RedHat Linuxes, there appears to be a problem with some cronsbwarsaw1999-01-131-16/+1
| | | | | | | | | | | | | | | | | | | | | | messing up their SIGCHLD handling. This would manifest as an IOError getting raised in the cmdproc.close() call of DeliverToList() in Deliverer.py. Thanks go Harald Meland for describing the real problem and giving the real fix. Thanks go to Greg Stein for testing this patch and verifying that it works. Deliverer.DeliverToList(): Undo previously checked in patch, which simply wrapped a try/except around the cmdproc.close() call and ignored errno=10 IOErrors. This was treating the symptoms, not the cause. All files in cron/: Added Harald's work around of the Linux bug by including these lines in every file: # Work around known problems with some RedHat cron daemons import signal signal.signal(signal.SIGCHLD, signal.SIG_DFL) It helps RedHat and doesn't appear to hurt on e.g. Solaris.
* DeliverToList(): Ignore ECHILD exceptions that have been reported onbwarsaw1999-01-081-1/+17
| | | | | Linux systems when we close the cmdproc pipe. We could be masking a real bug, but I can't figure it out, and it seems harmless.
* In class Deliverer, build a mechanism for adding more defaultbwarsaw1998-12-231-16/+50
| | | | | | | | | | | | | | headers. AddNonStandardHeaders(): New method to add a bunch of headers. Most of these are currently non-standard, but "Precedence: bulk" is a common wish and doesn't seem to hurt. Eventually more headers may be added here. SendTextToUser(), DeliverToUser(), DeliverToList(): Removed duplicate header adding code; call AddNonStandardHeaders() instead. Tested with both digest and non-digest deliveries.
* DeliverToOwner(), DeliverToList(): Use self.LogMsg() instead ofbwarsaw1998-12-181-6/+6
| | | | sys.stderr.write() to write error messages.
* .DeliverToOwner(): Provisional fix for when derived sender is bogus.klm1998-11-231-0/+5
| | | | | | | | | | | | | | | | | | | | Two cases, each addressed, and with reservations about the handling of both: - Sender is null, after trying both GetEnvelopeSender and GetSender. Address by using self.GetAdminEmail(). I'm not sure the right thing to do, here - this is as close as i could come. - Sender is not null, but lacks any domain spec - which can happen when the sender is on the local host. An unqualified sender seems to prevent delivery of the mail, or of bounce messages, anywhere, so it's a very bad thing. Again, i'm arbitrarily imposing @mailman-host. Both of these things needed to be patched over so the mail would be delivered (hmm, "Neither rain nor snow nor bugs that smite...-). More rational approaches (or at least, good rationales for these) would be quite welcome...
* Add new "list-id:" header to all messages sent out by the list,klm1998-10-231-7/+18
| | | | | | | | | | | | | | | | | according to, in accordance with RFC draft-chandhok-listid-02. This includes all admin messages and postings sent to members, _except_, those postings that already have a list-id header keep the original and don't get the new one. This basically conforms to the spec. However, the spec stipulates that individual users should not be able to specify a list-id, yet postings from other maillists should, and those other maillists list-id headers should not be overridden. Since there is no way to definitely tell the difference, i'm just respecting the original list-id. (It may be that the intent is to add to, rather than defer to, the existing list-id header if the message is from another list. If that's the case, we should just change the code to unconditionally add the header.)
* .DeliverTo*(): Include a header, "X-MailmanVersion: ...". The idea,klm1998-10-201-2/+6
| | | | obviously, is to improve trackability of problems.
* .CreateSubscribeAck(): ... but still forgot a close paren in the text,klm1998-10-171-1/+1
| | | | which i've now added.
* .CreateSubscribeAck(): Fixed malreference, 'umbrella_spiel' =>klm1998-10-171-2/+2
| | | | 'umbrella', and cleaned up the text a bit.
* MailList.GetMemberAdminEmail(): New routine to identify the adminklm1998-10-171-21/+12
| | | | | | | | | | | address for a member - trivially just the members regular address *unless* we're talking about the member of an umbrella list, in which case it has the umbrella_member_suffix appended to the account part of the addr. This is used everywhere that i was duplicating the functionality in my last round of checkins, including a few places in MailLists.py as well as the other files.
* .SendSubscribeAck(), .SendUnsubscribeAck(), .MailUserPassword():klm1998-10-171-5/+15
| | | | | | Accommodating change of umbrella-lists variable, "DEFAULT_REMINDERS_TO_ADMINS" => "DEFAULT_UMBRELLA_LIST". See recent checkin for Mailman/Defaults.py.in for explanation of umbrella lists.
* Nagy's send post ack patch. the subject was truncated by one too many charscotton1998-10-091-1/+1
| | | | scott
* Added DeliverToOwner to Deliverer class in Deliverer.py that passescotton1998-10-011-0/+36
| | | | | | | | | | a message to the -admin address to the owners untouched and with the sender of the original message Added a GetEnvelopeSender method to Message.py that attempts to find the envelope sender from a messages's unix from line for use by DeliverToOwner changed the mailowner script to use DeliverToOwner method instead of the DeliverToList method scott
* Added "Precedence: bulk" header to password reminders, so they don'tklm1998-08-141-1/+2
| | | | trigger 'vacation' style programs.
* .DeliverToList(): Restructured to send deliver parameters via itsklm1998-07-231-30/+21
| | | | | | | stdin, instead of as command line arguments, to avoid exposing addresses to shell. In the process, eliminated the use of the temp file for the content - it's passed via stdin as well. Also, fixed or removed some obsolete comments, etc.
* CreateSubscribeAck(): Wrap the self.welcome_msg. This is typed into abwarsaw1998-07-221-2/+3
| | | | | | | web form by the user who probably doesn't hit hard carriage returns. This looks ugly went emailed in the raw. SendUnsubscribeAck(): Likewise for self.goodbye_msg
* .SentTextToUser(): Somebody (correctly) got rid of theklm1998-07-161-1/+0
| | | | | | repr(recipient), since the underlying SendTextTouser() no longer forks a command via a shell, but left the comment in, so i'm getting rid of the comment.
* SendTextToUser(): Don't propagate removed raw flagbwarsaw1998-07-061-2/+2
|
* Convert all module names to their new names.bwarsaw1998-06-191-98/+46
| | | | | POSTACKTEXT, SUBSCRIBEACKTEXT, USERPASSWORDTEXT moved into templates/*.txt files
* Added support for send_welcome_msg.viega1998-06-121-0/+2
|
* Whoops, I forgot to check these in. They're changed to handleviega1998-06-031-4/+4
| | | | | relative paths, mainly GetScriptURL->the appropriate replacement. Now I'm done w/ checkins, and I'm going to test the current snapshot.
* No longer take a news parameter in .DeliverToList(), and no longer callviega1998-06-021-4/+1
| | | | the news posting code. That was a bad place for it to go...
* .DeliverToList calls the Mail->News gater unless a flag is passed sayingviega1998-05-311-1/+3
| | | | that the current message is inappropriate to gate.
* Several changes:bwarsaw1998-05-261-46/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Removed RCS crud In any text sent to the user, substitute `maillist' with `mailing list' SUBSCRIBEACKTEXT: All %s substitutions are replaced with $(varname)s substitutions with the corresponding dictionary interpolation added in Deliverer.CreateSubscribeAck(). With too many %s substitutions, it gets too hard to keep track of the right number of %s's and their proper substitution. Deliverer.SendTextToUser(): Added optional raw argument, defaulted to 0 (meaning default is to wrap/fill -- I know KLM and I disagree about this ;-). This argument is passed straight through to mm_utils.SendTextToUser(). Deliverer.DeliverToList(): When calculating the command to os.popen(), include as the first argument the configure calculated path to the Python interpreter to use. It is possible that `python' is not on the path when this gets executed (or that the wrong interpreter will be found). Deliverer.CreateSubscribeAck(): Use dictionary interpolation. Also, The header message seems redundant and unnecessary to me, so I removed it.
* Fixed a typo in the zipcode.viega1998-05-261-2/+2
|
* Sending the password notices (subscribe ack and reminder) to -adminmailman1998-05-261-7/+17
| | | | addr if new list option reminders_to_admins is set.
* 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?)
* .DeliverToList(): Append a sender field pointing to the list admin.klm1998-05-241-1/+2
|
* .DeliverToList(): header and footer are now optional. (Digests nowklm1998-05-011-3/+3
| | | | | take care of incorporating the header and footer, and shouldn't have to specify null ones...)
* Using new OutgoingMessage.__delitem__ method.klm1998-04-271-6/+6
|
* .SendTextToUser(): Removed debugging log message.klm1998-04-151-3/+1
|
* .DeliverToList(): Was missing a newline between message headers andklm1998-04-141-7/+5
| | | | | body, so initial body lines that looked like header would be incorporated in header.
* Whoops - i broke the subscribe acknowledgement on checkin. Fixedklm1998-04-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thanks to janne sinkkonen. Date: 14 Apr 1998 01:22:26 +0300 From: Janne Sinkkonen <janne@avocado.pc.helsinki.fi> To: klm@python.org Subject: Re: [Mailman-developers] late on new mailman release - soon I guess this patch is necessary to get sensible welcome messages: *** mm_deliver.py Tue Apr 14 01:21:27 1998 --- mm_deliver.py~ Sun Apr 12 04:37:30 1998 *************** *** 168,175 **** header = '' welcome = '' ! body = (SUBSCRIBEACKTEXT % (self.real_name, self.host_name, ! header, welcome, self.GetScriptURL('listinfo'), self.GetOptionsURL(name), self.real_name, self.host_name, --- 168,175 ---- header = '' welcome = '' ! body = (SUBSCRIBEACKTEXT % (header, welcome, ! self.real_name, self.host_name, self.GetScriptURL('listinfo'), self.GetOptionsURL(name), self.real_name, self.host_name, -- Janne Sinkkonen <janne@iki.fi> <URL: http://www.iki.fi/~janne/ >
* .MailUserPassword(): As with cron/mailpasswds, put a X-No-Archive: yesklm1998-04-121-2/+3
| | | | | header on password messages, so pranksters can't hit the button for subscribed archive services, and get an archived password.
* Darn, missing close-paren.klm1998-04-111-2/+2
|
* Put the list-specific welcome near the top of the welcome message -klm1998-04-111-12/+7
| | | | they often don't see the list-specific info, otherwise.
* DeliverToList(): same bug as DeliverToUser() - repr to escape embeddedklm1998-04-111-3/+8
| | | | quotes for the shell being forked.
* Preparing to package a distribution - add a module docstring andmailman1998-04-091-0/+5
| | | | __version__ info.
* .SendTextToUser(), .DeliverToUser() - use new, generalized add_headersklm1998-04-071-4/+7
| | | | option, instead of specific errors-to.
* Some cosmetic refinements of message text, separated themailman1998-04-031-44/+34
| | | | SendSubscribeAck and CreateSubscribeAck for easier debugging.