| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Rename all handlers to be more PEP 8 friendly, i.e. lowercased.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from Mailman.Queue to Mailman.queue (note the case change to be more PEP 8
compliant).
The Switchboard and Runner classes have been moved into the package
__init__.py and the previous class modules have been removed.
The switchboard cache is removed; I don't think it was ultimately buying us
much. Now, just import the Switchboard class and instantiate it directly.
Added an IRunner interface.
Renamed the ArchRunner to ArchiveRunner.
bin/qrunner and bin/mailmanctl are updated accordingly. For the former, it no
long accepts -r=All to run all qrunners. You can still use the short name
(e.g. --runner=incoming) to run the built-in queue runners, but this design
will eventually allow for plugin qrunners by allowing them to be run
specifying the full package path to the class. It also now accepts a leading
dot to indicate a qrunner class relative to the Mailman.queue package.
|
| |
|
|
| |
cleanup (really, not much was necessary).
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and fixing the invocation and shutdown of mailmanctl. While the tests in this
module work individually, they do not yet work as a group.
-C added to testall.py, and mailmanctl now passes that flag on to qrunner.
UserNotification sets reduced_list_header in the msgdata, but the behavior of
this flag has changed. It used to suppress List-Help, List-Subscribe, and
List-Unsubscribe as well as List-Post and List-Archive. However, List-Help,
List-Subscribe and List-Unsubscribe should definitely be included in
UserNotifications, and List-Post has a different variable controlling it now.
Therefore, always add List-Help, List-Subscribe, and List-Unsubscribe.
Some style updates to Message.py
|
| |
|
|
| |
because it is overwrapped in Mailman.Message.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
presence is enough to avoid archiving the message.
|
| |
|
|
| |
module.
|
| |
|
|
| |
since this is guaranteed to be filled in by the runner.
|
| |
|
|
|
|
| |
metadata if it's not already there. Usually it will be since
scripts/post and scripts/auto add it. Python 2.x's {}.setdefault()
does this nicely.
|
| |
|
|
|
|
|
|
|
| |
De-string-module-ify
Other Python 2.0 constructs used where appropriate.
Delete the Date: field kludge for mlist.clobber_date. This is now
handled in the ArchRunner.
|
| | |
|
| |
|
|
| |
get an annoying exception.
|
| |
|
|
|
|
| |
message to the archive. Retain "X-Archive: no" for backwards
compatibility with my own hallucinations :). Resolves SF bug
#115644.
|
| |
|
|
|
|
|
|
| |
Archiver/Archiver.py, because We want clobber_date to affect what goes
in Pipermail or the external archiver. Be sure to restore the
original date after the archiver gets its hands on the message. If
clobber_date is turned on, set the X-Original-Date: header to the
original Date: field value.
|
| |
|
|
| |
will get filled with the pids of any children that get forked.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
failures, bugs, and lock acquisition timeouts. Instead of storing
information about the progress of the delivery on the Message object,
we pass around a parallel data structure called `msgdata' (current
just a dictionary). All calculated information is passed through this
object, but this changes the API to handler modules. They now take
three arguments: the mailing list, the message object, and the
msgdata. WARNING: This may change before 2.0 final.
Specific changes include:
HandlerAPI
DiscardMessage(), HandlerAPI.SomeRecipientsFailed(): New shared
exceptions.
pipeline_deliver(): removed
LIST_PIPELINE: global containing the primary list delivery
pipeline
DelivertoList: Revamped main entry point into message delivery to
list membership. Takes three arguments: the mailing list, the
message object, and the msgdata dictionary. This digs the
pipeline to use out of the msgdata (allowing resumption of
prematurely interrupted pipeline deliveries).
Then each module is called in turn, and the shared exceptions are
caught. As each module is completed successfully, it is removed
from the head of the pipeline. This function returns the number
of pipeline modules remaining to be executed (i.e. a return of 0
means DeliverToList() is done with this message and it can be
dequeued).
A catch-all is included in case some unexpected exception occurs
(say a bug or typo in one of the delivery modules). Such an error
will queue the message, so at least it doesn't just get lost. We
try to never just lose a message.
RedeliverMessage(), DeliverToUser(): reimplemented in terms of
DeliverToList().
Acknowledge, AfterDelivery, CalcRecips, Cleanse, CookHeaders,
Decorate, Replybot, ToArchive, ToUsenet
Fix the function signature to match the new API (three arguments),
and changed the implementations to extract delivery information
from msgdata instead of as attributes of the message object.
Approved
Same as above, but also removed NotApproved exception. LoopError
is now multiply derived from HandlerAPI.DiscardMessage and
Errors.MMLoopingPost.
Hold
Same as above, but also changed slightly the way an exception is
raised when a message is held. hold_for_approval() now takes four
arguments (the msgdata parameter has been added), and the exc
object can be a class or instance. If it's a class, it is simply
zero-arg'd instantiated. We also use the str() of the exception
to get us the reason for the hold. This allows us to override
HandlerAPI.MessageHeld.__str__() for MessageToBig so that we can
include the size of the message being held.
SMTPDirect
Same as above, but instead of explicitly enqueuing the messages
when some or all of the recipient deliveries failed, just raise a
HandlerAPI.SomeRecipientsFailed exception and let DeliverToList()
manage the enqueuing. Thus queue_message() is removed.
Sendmail
Same as above, but if any chunks fail delivery, those recipients
are queued by raising SomeRecipientsFailed.
SpamDetect
Same as above, except that if a regexp matches, a SpamDetect
exception is raised directly. The DeliverToList() framework
discards these spam messages instead of holding them for
approval.
ToDigest
Same as above, except that if a digest is prepared for delivery,
it is not sent directly via mlist.Post(). Instead, the message is
queued for delivery, thereby relinquishing the lock soon. This
means that digests will only be sent the next time qrunner runs.
|
| | |
|
| |
|
|
| |
`archive' is false (i.e. archiving was disabled by the list admin).
|
| |
|
|
|
| |
insensitive of course), then mlist.ArchiveMail() is not called, and
the message doesn't go to the archive.
|
|
|
"""Add the message to the archives."""
|