| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
| |
the 0.3 release. This means you must download and install the 0.3
version of mimelib to work with the current CVS snapshot!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and use the switchboard interface. Specifically,
Message class now multiply derives from mimelib.Message.Message and
mimelib.ReprMixin.ReprMixin (for __str__() and get_text()).
Other method changes:
GetSender() -> get_sender()
__init__(), __repr__(), __str__(), Enqueue(), Requeue(): removed
OutgoingMessage class removed
UserNotification class now inherits from Message and adds:
send(): A convenience method for taking an internally crafted message
and queuing it to the qfiles/virgin queue.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
newdata or kws has an item called "_whichq", this specifies the
directory to queue to, defaulting to INQUEUE_DIR.
The metadata "filebase" is always set to __filebase, not just when the
metadata is created for the first time.
When writing the .db file (i.e. containing the metadata), always write
it after the .msg text file, and always write it to a temporary file,
with an os.rename() shuffle. This should avoid race conditions when
queuing a message to another queue because the queue runners only key
off of files ending in ".db".
Requeue(): New method which calls Enqueue() after zapping
self.__filebase so it'll be recalculated.
|
| |
|
|
|
| |
contract with rfc822.Message.__init__() and also breaks news->mail
gatewaying. A different patch will be applied to fix SF bug #109220.
|
| |
|
|
|
|
| |
forces a write of the message text back to disk, even if it already
exists. This is used when the message has been changed (e.g. new or
changed header, etc.).
|
| |
|
|
|
|
|
|
|
|
|
| |
Enqueue(): Only calculate a new filebase (SHA hash) if the object
wasn't assigned one in its constructor. Go back to including the
current float time in the hash input.
Message.__init__(): Take an optional `filebase' argument which can be
restored from an enqueued message. This guarantees that a message,
once assigned a hash value for its filebase, continues to use that
filebase for its entire life.
|
| |
|
|
| |
algorithm needs to be reproducible.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
calculating the file name. If a message is sent to two lists
simultaneously and the receiving MTA doesn't distinguish them with
something like a Delivered-To: header (as Postfix does), the hashes
could be the same, prevent one or the other list from receiving the
message.
Now the hash is composed of the message's text, the destination list's
name, and a string representation of the current floating point time.
That ought to be unique enough for every message.
|
| |
|
|
|
|
| |
rfc822.Message when the first line contains a colon. A blank
header-terminating line is prepended to the given text if the first
line contains a colon.
|
| |
|
|
|
| |
elements for the value of the To: field, and assign a copy of the list
to self.recips. Otherwise do the old behavior.
|
| |
|
|
| |
underscore are volatile and don't get saved to disk.
|
| |
|
|
| |
None. The type of the return value must always be a string.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
composed of
- the unixfrom (i.e. From_ ) line
- the rfc822 headers
- a blank line
- the body of the message
This can be used to completely reconstruct the message as received by
the MTA (and as needed by Pipermail).
The __str__() still returns just the rfc822 headers and the body of
the message.
Enqueue(): Put the repr() in the .msg file, so that it can be
completely reproduced.
|
| |
|
|
|
|
| |
should fix problems where approved held messages weren't being
archived properly, and other problems. Thanks to Thomas Wouters for
tracking this problem.
|
| |
|
|
|
|
|
|
| |
for re-delivery by qrunner. This makes it very easy for other clients
to make sure a message doesn't get lost.
The interface to this method is a bit convoluted, but is convenient
for different calling conventions. See the docstring for details.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
go through this one method. This consolidates and makes consistent
the use of the From:, Sender:, and envelope-sender headers, and the
search order based on USE_ENVELOPE_SENDER. The docstring explains the
semantics of this method.
GetEnvelopeSender(): Removed.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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).
|
| |
|
|
| |
are valid.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
getallrecipients() method.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
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...
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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??
|
| | |
|
| |
|
|
|
|
| |
readline() and not readlines() as advertised.
Also, added a subclass to IncomingMessage called NewsMessage, making
it easier to add news-specific headers, etc.
|
| |
|
|
|
| |
This was motivated by the fact that nntplib expects a file object on which
it calls readlines().
|
| | |
|
| |
|
|
|
|
|
| |
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?)
|
| |
|
|
|
| |
will be used, and it uses maillist-specific digest stuff
(e.g. DIGEST_MASTHEAD).
|
| |
|
|
| |
relocate the repository.)
|
| |
|
|
| |
from .SetHeaders() so the __delitem__ can use it.
|
| |
|
|
|
| |
provided a refinement of the code that's not naive about continuation
lines.)
|
| | |
|
| |
|
|
| |
__version__ info.
|
| |
|
|
|
| |
lines. (This maybe incorporated directly in the rfc822 class, in
which case this method should eventually be removed...)
|
| | |
|
| |
|