summaryrefslogtreecommitdiff
path: root/Mailman/Message.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* GetSenderName(): Removed.bwarsaw1999-12-161-7/+1
|
* OutgoingMessage.__init__(): take an optional text argument, and passbwarsaw1999-11-241-2/+17
| | | | | | | | | that to the StringIO constructor. Useful for subclassing. UserNotification: Very useful subclass of OutgoingMessage which takes a recipient, a sender, a subject, and the message text, and sets the appropriate headers and `recips' attribute for use in the message pipeline.
* Greatly simplified by basing all this on the up-to-date rfc822.Messagebwarsaw1999-11-101-200/+33
| | | | | | | | | | | | | | object, which supports a writeable interface. Lots of cruft can go. Message.Message: Some of the API methods from previous incarnations are kept for convenience, notably: GetSender(), GetEnvelopeSender(), GetSenderTame. Message.__str__(): Flatten the message by concatenating its headers, adding a newline, and the message's body. OutgoingMessage(): convenience class for creating a Message object out of thin air.
* OutgoingMessage.SetDate(): removebwarsaw1999-07-211-3/+0
| | | | | | Utils.DeliverToUser(): Don't add a Date: header even if one is missing in the message. The MTA will always insert an RFC822 compliant header (and we weren't compliant anyway).
* IncomingMessage.GetSender(): Don't assume addresses taken from headershmeland1999-07-011-4/+8
| | | | are valid.
* Changed import of rfc822 to always get the version we distribute withhmeland1999-05-221-47/+8
| | | | | | | | | Mailman. IncomingMessage.SetHeader(): This messed up when changing headers that spanned multiple lines -- changed it to use rfc822.Message's emulation of a mapping type, which seems to get this right. IncomingMessage.__delitem__(): Removed, inherit from rfc822.Message instead.
* minor code formattingbwarsaw1999-03-091-2/+2
|
* More import games. Make sure we get an rfc822.Message with our newbwarsaw1999-01-121-1/+10
| | | | getallrecipients() method.
* Added some XXX comments for later:bwarsaw1998-12-101-0/+2
| | | | | | | | 1) OutgoingMessage.__delitem__() when name is missing probably ought to raise an exception instead of returning None. 2) There probably ought to be at least also an OutgoingMessage.__setitem__() too.
* .SetHeader(): Removed dubious line "name = "%s%s" % (name[0], name[1:])"klm1998-10-061-1/+3
| | | | | and added note about change to distributed rfc822.py as of 1.5.2 - but we'll want to wait a good while before we switch over to that...
* Added DeliverToOwner to Deliverer class in Deliverer.py that passescotton1998-10-011-0/+25
| | | | | | | | | | 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
* .SetHeader(): New headers would not show in resulting message unlessklm1998-09-301-5/+7
| | | | | | | | | | | | | | | | | | | | | | optional "crush_duplicates" was set to 0, because the msg.dict would get the new entry, but the msg.headers would not. I've changed the code so that the non-crush_duplicates addition to msg.headers would happen whenever the header is new, regardless of crush_duplicates setting. (Of course, the newness of the header means there are no duplicates to crush...) Incidentally! John, there's a line at the top of this routine whose purpose i don't understand - i think it was there when i got the code, so i'm wondering if you know about it. It's the first line of code in the routine: name = "%s%s" % (name[0], name[1:]) The only thing i can think this would serve is to establish that the length of the name is at least 1 - seems to me it would be more efficient and clear to make the check explicit, if that's the purpose, avoid the assignment, etc. I suspect i'm missing something here - can you shed any light??
* Removed RCS crudbwarsaw1998-06-191-2/+0
|
* Added a readline() method to classes, since it turned out nntplib usedviega1998-06-021-2/+46
| | | | | | readline() and not readlines() as advertised. Also, added a subclass to IncomingMessage called NewsMessage, making it easier to add news-specific headers, etc.
* Add .readlines() to both message classes.viega1998-05-311-2/+13
| | | | | This was motivated by the fact that nntplib expects a file object on which it calls readlines().
* 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?)
* Digest class moved to mm_digest, because that is the only place itklm1998-05-011-19/+1
| | | | | will be used, and it uses maillist-specific digest stuff (e.g. DIGEST_MASTHEAD).
* Beginning of Digest class. (Premature checkin forced by need toklm1998-04-281-1/+19
| | | | relocate the repository.)
* OutgoingMessage: Add a __delitem__, extracting .CacheHeaders() methodklm1998-04-271-7/+23
| | | | from .SetHeaders() so the __delitem__ can use it.
* Use __delitem__ discipline for deleting headers by name. (Guidoklm1998-04-131-13/+22
| | | | | provided a refinement of the code that's not naive about continuation lines.)
* Add comment mentioning prospect of using StringIO instead of FakeFile.klm1998-04-101-1/+2
|
* Preparing to package a distribution - add a module docstring andmailman1998-04-091-0/+5
| | | | __version__ info.
* Add IncomingMessage.delitem() method, to remove approved headermailman1998-04-021-0/+15
| | | | | lines. (This maybe incorporated directly in the rfc822 class, in which case this method should eventually be removed...)
* Just some long-line wraps.mailman1998-03-191-5/+5
|
* Initial revisionmailman1998-02-271-0/+150