| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
use the rule check instead of handler processing. Add a test for stripping
the header from the text/html part to the doctest.
Add Mailman.app.rules.find_rule() to return a named rule.
Fix a few typos.
|
| |
|
|
|
|
|
|
|
|
| |
model. Specifically, where a mailing list used to have both a
password and a moderator password, both of which could be used in the
Approved header, now a mailing list has only a shared moderator
password. This moderator password's only purpose in life is to allow
for Approved header posting.
test_handlers.py is now completely ported to doctests, so it's removed.
|
| |
|
| |
before looking for/deleting the Approve(d): line.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
case the message has an empty body.
|
| |
|
|
|
|
|
| |
apparently not. If the first non-whitespace line of the first
text/plain subpart has an Approved or Approve header, it's checked for
the admin password, but /only/ if there's no real Approved or Approve
header in the message (don't use both!).
|
| | |
|
| |
|
|
|
|
| |
`adminapproved' metadata key. This is the only unspoofable way for
the list owners to get a message through while the emergency hold is
on.
|
| |
|
|
| |
the field is missing, we get a valid list object.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
this isn't a web auth, we just use Authenticate() and pass in the
appropriate authcontext.
In this case, we're allowing either the list moderator or the list
owner to approve messages. We're specifically /not/ allowing the site
administrator in order to reduce the urge to send the site password
through email in the clear.
Also, accept either "Approved: password" or "Approve: password"
headers.
|
| |
|
|
|
|
|
|
|
|
| |
De-string-module-ify
Other Python 2.0 constructs used where appropriate.
Get rid of HandlerAPI references -- this module is obsolete.
LoopError is moved to the Errors module.
|
| |
|
|
|
| |
filterfunc(): Get rid of this too, since we can use a list
comprehension instead (which I think is just as clear).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
x-beenthere's. I'm hoping this was a transcription error on my part,
otherwise this never worked, and we've been lucky!
|
| |
|
|
| |
elsewhere.
|
|
|
"""Determine whether the message is approved for delivery.
This module only tests for definitive approvals. IOW, this module only
determines whether the message is definitively approved or definitively
denied. Situations that could hold a message for approval or confirmation are
not tested by this module.
"""
|