summaryrefslogtreecommitdiff
path: root/Mailman/pythonlib
Commit message (Collapse)AuthorAgeFilesLines
* Use convenience StringIO modulebwarsaw1999-11-101-1/+1
|
* An import wrapper around cStringIO/StringIObwarsaw1999-11-101-0/+22
|
* In helo() and ehlo(), Don't fail when gethostbyaddr() fails -- justguido1999-10-221-2/+10
| | | | keep whatever gethostname() returns. After a suggestion by Doug Wyatt.
* Merge with Python 1.5.2+ version of this module. Also includebwarsaw1999-07-121-4/+42
| | | | | | | | | | potential fix for bogus recip header bug... e.g., when To: : you get a traceback from m.getaddrlist('to')
* Patch by Per Cederqvist:guido1999-06-091-3/+6
| | | | | | | I've found two places where smtplib.py sends an extra trailing space on command lines to the SMTP server. I don't know if this ever causes any problems, but I'd prefer to be on the safe side. The enclosed patch removes the extra space.
* Patch by Per Cederqvist, seemingly approved by The Dragon:guido1999-04-211-3/+6
| | | | | | | Two problems: The SMTPRecipientsRefused class should not inherit SMTPResponseException, since it doesn't provide the smtp_code and smtp_error attributes. My patch for not adding an extra CRLF was apparently forgotten. The enclosed patch fixes these two problems.
* Changes by Per Cederquist and The Dragon.guido1999-04-071-49/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per writes: """ The application where Signum Support uses smtplib needs to be able to report good error messages to the user when sending email fails. To help in diagnosing problems it is useful to be able to report the entire message sent by the server, not only the SMTP error code of the offending command. A lot of the functions in sendmail.py unfortunately discards the message, leaving only the code. The enclosed patch fixes that problem. The enclosed patch also introduces a base class for exceptions that include an SMTP error code and error message, and make the code and message available on separate attributes, so that surrounding code can deal with them in whatever way it sees fit. I've also added some documentation to the exception classes. The constructor will now raise an exception if it cannot connect to the SMTP server. The data() method will raise an SMTPDataError if it doesn't receive the expected 354 code in the middle of the exchange. According to section 5.2.10 of RFC 1123 a smtp client must accept "any text, including no text at all" after the error code. If the response of a HELO command contains no text self.helo_resp will be set to the empty string (""). The patch fixes the test in the sendmail() method so that helo_resp is tested against None; if it has the empty string as value the sendmail() method would invoke the helo() method again. The code no longer accepts a -1 reply from the ehlo() method in sendmail(). [Text about removing SMTPRecipientsRefused deleted --GvR] """ and also: """ smtplib.py appends an extra blank line to the outgoing mail if the `msg' argument to the sendmail method already contains a trailing newline. This patch should fix the problem. """ The Dragon writes: """ Mostly I just re-added the SMTPRecipientsRefused exception (the exeption object now has the appropriate info in it ) [Per had removed this in his patch --GvR] and tweaked the behavior of the sendmail method whence it throws the newly added SMTPHeloException (it was closing the connection, which it shouldn't. whatever catches the exception should do that. ) I pondered the change of the return values to tuples all around, and after some thinking I decided that regularizing the return values was too much of the Right Thing (tm) to not do. My one concern is that code expecting an integer & getting a tuple may fail silently. (i.e. if it's doing : x.somemethod() >= 400: expecting an integer, the expression will always be true if it gets a tuple instead. ) However, most smtplib code I've seen only really uses the sendmail() method, so this wouldn't bother it. Usually code I've seen that calls the other methods usually only calls helo() and ehlo() for doing ESMTP, a feature which was not in the smtplib included with 1.5.1, and thus I would think not much code uses it yet. """
* Patch by Per Cederqvist, who writes:guido1999-03-291-6/+15
| | | | | | | | | | | | | | | | """ - It needlessly used the makefile() method for each response that is read from the SMTP server. - If the remote SMTP server closes the connection unexpectedly the code raised an IndexError. It now raises an SMTPServerDisconnected exception instead. - The code now checks that all lines in a multiline response actually contains an error code. """ The Dragon approves.
* VERSION is no longer set in configure because it's too hard tobwarsaw1999-01-151-2/+0
| | | | | | | | | | | | propagate version string changes to the public (you have to autoreconf, then reconfigure and reinstall). Now, VERSION is set directory in Defaults.py.in and the Release.py script updates that file directly. Now we just need to run ./config.status and do a re-install. I hope this will make things easier. I'm also bumping the version to 1.0b8, so I can do a release tomorrow.
* Patch by Piers Lauder: make exceptions classes.guido1999-01-151-14/+13
| | | | Take opportunity to add more explanatory messages to exceptions.
* Installing latest editions from the Python development tree. Thisbwarsaw1999-01-141-13/+13
| | | | fixes several bugs uncovered in Mailman and other testing.
* In rcpt(), avoid a space after the TO: address when the option list isguido1999-01-141-2/+2
| | | | empty. Make sure there is a space when there are options.
* getaddrlist(): fixes to handle continuation lines, and watching forbwarsaw1999-01-141-1/+7
| | | | already existing commas. Should do a better job.
* New proposed change to standard library module. Get rid ofbwarsaw1999-01-131-24/+11
| | | | | | | getallrecipients() and just make getaddrlist() do the right thing (scan all matching headers, not just the first one). Patch submitted to Guido.
* getallrecipients(): returns a tuple list of all To: and Cc: headerbwarsaw1999-01-121-0/+16
| | | | recipients, parsed with AddressList()
* Copied from Python 1.5.2 since we'll need the new interface.bwarsaw1999-01-121-0/+904
|
* Copied from the Python 1.5.2 distribution.bwarsaw1999-01-091-0/+107
|
* Changes to workaround some bogus clients which either don't include abwarsaw1999-01-081-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | content-type header, or include a bogus one. cgi.py FieldStorage.__init__(): if there is no content-type header, use text/plain for inner parts, but application/x-www-form-urlencoded for outer parts. Honor any existing content-type header. Lower down, if the content-type header is something we don't understand, default to text/plain for inner parts, but application/x-www-form-urlencoded for outer parts. This patch will be proposed for Python 1.5.2 driver run_main(): Play some games to get Mailman's special cgi.py module. We import it from Mailman.pythonlib.cgi, but then we jam this module into sys.modules['cgi'] so all those imports in all those Mailman.Cgi scripts get our special one (without having to hack all those scripts!)
* Added cgi.py from Python 1.5.2 distribution.bwarsaw1999-01-081-0/+1341
|
* TemporaryFile(): Divergence from Python 1.5.2 version. Can't use barebwarsaw1999-01-051-1/+6
| | | | | | `raise' here since we may be running under Python 1.5. I don't use Utils.reraise() because I don't want to import Utils, so just do the manual sys import and raise.
* Copied from the Python 1.5.2b1 distribution, this version implementsbwarsaw1998-12-291-0/+141
| | | | safe filename generation across fork() related children.
* Small, and final docstring merge with Dragon's version.bwarsaw1998-12-221-1/+5
|
* New infrastructure for alleviating version skew with deployedbwarsaw1998-12-223-0/+75
| | | | | | | | | | Pythons. When Mailman requires a newer version of a standard Python library than can be required to already be installed, we copy the .py file to this directory. This makes it easier to remove later when that version of Python is required. Other than the standard package and CVS boilerplate, smtplib.py is the latest almost-Python-1.5.2 version.
* A few other docstring fixes, most importantly to be a little nicer tobwarsaw1998-12-221-54/+59
| | | | Emacs ;-)
* Nothing earthshattering, just some fixes to typos and other formattingbwarsaw1998-12-221-49/+52
| | | | bugs in various docstrings.
* Change interface to sendmail: if the destination address is a stringjhylton1998-08-131-1/+6
| | | | | | | instead of a list, turn it into a list containing that string. This avoids an apparently common newbie mistake -- passing in a single string for the destination and have it treated as a sequence of characters.
* Untabified and deleted trailing blank lines.guido1998-08-101-9/+7
|
* Latest version by The Dragon, who writes:guido1998-08-041-66/+120
| | | | | | | | I did some bugfixes, and fixed a major problem with the esmtp suport (I think the person who did that part misunderstood RFC1869) Some of the interface fer esmtp-related things has changed as a result. I also added some documentation to the SMTP class' docstring.
* Better RFC 821 compliance (MAIL and RCPT, and CRLF in data)guido1998-07-131-15/+37
| | | | by Carey Evans <c.evans@clear.net.nz>, for picky mail servers.
* Eric Raymond added support for ESMTP protocol and corrected some typosguido1998-06-251-33/+113
| | | | in comments and doc strings.
* Add optional argument to help().guido1998-04-031-2/+2
|
* Mass check-in after untabifying all files that need it.guido1998-03-261-71/+71
|
* Sez The Dragon:guido1998-01-291-24/+25
| | | | | Ok, I fixed the quotes, along with a bug or two. Also added another exception.
* SMTP client by The Dragon De Monsyne <dragondm@integral.org>.guido1998-01-291-0/+278