| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
Errors.HoldMessage.
|
| | |
|
| |
|
|
| |
change is a candidate for 2.0.6.
|
| |
|
|
|
|
|
|
|
| |
to come from the list owner to avoid any unnecessary bounce
processing.
Also, and more importantly, set the message's metadata "tomoderators"
flag so that the admin notification message will be sent to both the
list owners and the list moderators.
|
| |
|
|
|
| |
language, also pass in the MailList object; maketext() digs the
preferred language out of the list object.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have to play module global footsie with _() so that the rejection
notices are marked as translatable, but aren't actually translated
until later.
Administrivia.rejection_notice(), MessageTooBig.rejection_notice():
Convert to interpolating local variables.
hold_for_approval(): Conversion to the new way of i18n'ing. The
language context at this point is the user's preferred language, so we
craft his notification first before temporarily changing contexts to
the list's preferred (for the admin). We no longer need to duplicate
the code as was done before, but some things need to be re-translated
in the context of the list's preferred language.
Also, translate the exception str() and rejection_notice for real
here.
|
| |
|
|
| |
language in as a keyword argument.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
De-string-module-ify
Other Python 2.0 constructs used where appropriate.
All exceptions now use Errors.MessageHeld as their base class
(MessageHeld was moved from the obsolete HandlerAPI module to the
Errors module).
Remove the pickle imports.
|
| |
|
|
|
|
|
|
|
|
|
| |
Exception classes: Mark the `rejection' strings for translation, but
don't similarly mark the class docstrings. pygettext.py is able to
extract these strings without markings.
hold_for_approval(): Other changes to support I18N include setting
$LANG to list's preferred language; marking more strings as
translatable. There's duplicate code here which can be refactored
much better.
|
| |
|
|
|
| |
Also, use list comprehensions instead of map where appropriate. And,
wrap translatable strings in _().
|
| |
|
|
| |
GetAbsoluteScriptURL() => GetScriptURL(..., absolute=1)
|
| | |
|
| |
|
|
|
|
|
|
| |
from the gate_news cronjob is that the msgdata dictionary will contain
a `fromusenet' key. This was erroneously checking the msg object for
the `fromusenet' attribute (as was the case with the old interface),
which caused notifications to go to Usenet posters whose messages were
held. Bogus!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is used instead of the hardcoded string in the `reject explanation'
field of the admindb page. This means that the default rejection
notices are more closely tailored to the type of hold put on the
message.
Most are simple strings, although Administrivia and MessageTooBig have
more elaborate rejection_notice() methods to give some program
supplied details.
MessageTooBig holds also now include both the message body length and
the list-specific maximum body size in the hold reason.
hold_for_approval(): The rejection notice is placed in the
msgdata['rejection-notice'] key for extraction by the admindb.py
script.
|
| |
|
|
| |
process(): The argument to GetSender() is `use_envelope'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
address of the message. GetEnvelopeSender() no longer exists (and
GetSender() keys off of USE_ENVELOPE_SENDER, so it still has the same
basic functionality).
|
| |
|
|
|
| |
addresses since the matching inside FindMatchingAddresses() are
lowercased.
|
| |
|
|
|
|
|
|
|
|
| |
described below.
process(): When members_posting_only is not set, but posters /is/ set,
the semantics are that only those explicitly listed in posters can
post without admin approval. Even though I think this is AFU'd, at
least this patch fixes things so it works the same as it did in
Mailman 1.1.
|
| |
|
|
|
| |
variable wouldn't get defined for responses to the sender. (Ricardo
Kustner).
|
| |
|
|
| |
destination.
|
| |
|
|
|
|
| |
notification if a message originating on Usenet is held for approval,
even if dont_respond_to_post_requests is false. They had no idea
their message was appearing on a mailing list!
|
| |
|
|
| |
user here and not in the post script.
|
| |
|
|
|
|
|
|
| |
HandlerAPI.DeliverToUser() for fast track delivery of the
acknowledgement to the sender. We need to be a little tricky digging
the original sender out of a msg object attribute, since CookHeaders
(which sets the attribute) changes it for the outgoing message. If
msg.original_sender isn't found, use the normal msg.GetSender().
|
|
|
"""Determine whether this message should be held for approval.
This modules tests only for hold situations, such as messages that are too
large, messages that have potential administrivia, etc. Definitive approvals
or denials are handled by a different module.
If no determination can be made (i.e. none of the hold criteria matches), then
we do nothing. If the message must be held for approval, then the hold
database is updated and any administator notification messages are sent.
Finally an exception is raised to let the pipeline machinery know that further
message handling should stop.
"""
|