| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
Slight style nit, too: code is using 'oct()' to convert mode to a string,
instead of a '0%(mode)o' format. Changing this to make more sense would
break translations, though :P
|
| |
|
|
|
|
| |
ToUsenet.py (where it is.) This is probably a glitch in the functionality
split, anyway, and moving around the global saves on creation and
destruction costs. Very important, that!
|
| |
|
|
| |
it, and we don't have it to start with!
|
| |
|
|
| |
passwords.
|
| |
|
|
|
|
|
|
|
| |
default, we can't use a StringableMIME class here, otherwise it won't
have a get_sender() method when unpickled. So instead, use a
Message.Message class and just set Content-Type: and MIME-Version:
headers manually.
StringableMIME: Removed.
|
| |
|
|
| |
Errors.HoldMessage.
|
| |
|
|
|
| |
RejectMessage: New base exception class, used to signal messages that
should be bounced back to the original sender.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
will calculate recipients based on the Urgent: header, while the
latter removes the Urgent: header from the original message (so it
wouldn't be there by the time CalcRecips see it!).
BOUNCEQUEUE_DIR: New variable in preparation for a separate bounce
processing queue.
|
| |
|
|
|
|
|
| |
message sender (calculated with msg.get_sender()). It actually wraps
the original message up in a message/rfc822 MIME document and stuffs
that into a multipart/mixed with the first part being the bounce
message.
|
| |
|
|
|
| |
runner.stop() method call to break the __oneloop() loop after any
single message is processed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sub-qrunners to cleanly exit themselves instead of potentially
stopping them in the middle of processing a message. Specifically,
sighup_handler(): Send SIGHUPs to the child processes instead of
SIGINTs.
start_lock_refresher(): Install our own SIGHUP handler, which simply
toggles off an instance-based loop flag. The signal kicks us out of
the sleep, so the next while test will return false and break us out
of the loop, existing the lock refresher. No need to deal with
KeyboardInterrupts.
start_runner(): In the parent, just return the pid of the child. In
the child, do the syslogging, and also install our own process's
SIGHUP handler, which will call the qrunner's stop() method. This
lets the qrunner break out of its loop at the next convenient place
(i.e. after processing one of its files). Again, no need to deal with
KeyboardInterrupts.
master(): More accurate syslog messages. Also, make sure the children
receive SIGHUP instead of SIGINT.
|
| |
|
|
|
|
| |
change_options(): Fixed the call to ApprovedAddMembers() so that we're
correctly passing through the values of the form variables
send_welcome_msg_to_this_batch and send_notifications_to_list_owner.
|
| |
|
|
|
|
|
|
|
|
|
| |
cause None to be returned from self.__getitem__(). Keep looking
through headers if that happens (this avoids a bug reported by Mentor
Cana on messages with no Sender: header and USE_ENVELOPE_SENDER set to
true).
send(): If the message doesn't have a Message-ID (and it probably
won't), craft one. This aids in debugging because the message-id will
get logged to logs/smtp.
|
| | |
|
| |
|
|
|
|
| |
implied by syslog.__call__()), passing in the MsgSafeDict instance to
the kws argument. This works around the Python limitation that **kws
in extended calls must be concrete dictionary objects.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
write(): Just call new function write_ex(), passing arguments through.
write_ex(): Use explicit arguments to pass in the args tuple and kws
dictionary. This is because Python requires **kws in extended calls
to be concrete dictionary objects, not generic mapping objects.
SMTPDirect wants to pass in an instance of (subclassed) UserDict, so
it calls write_ex() directly.
Also, stash the msg argument in local variable origmsg, which is used
if we get an exception during string interpolation.
|
| |
|
|
|
|
|
|
| |
Message-ID header.
mcre: Message-ID headers crafted by Mailman now include a serial
number. Recognize this, and also use a verbose regular expression so
it's not so cryptic.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
main(): If the WebAuthenticate() fails, search for the form key
`adminpw' -- not `admlogin' -- to decide whether to include the error
message or not. The former is the cgi key for the password field,
while the latter is the key for the submit button, which isn't
included in a Mozilla posted form if the Enter key is hit instead of
clicking on the button.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
AuthContextInfo(): Allow `user' argument to be optional; default to
None.
Authenticate(): Re-install backwards compatibility for pre-MM2.1 list
passwords. For AuthListAdmin context only, if the sha check fails,
fallback to crypt (if the crypt module could be imported) and md5
checks. If either of the latter two matches, assume that the list
password is "old style" and auto-upgrade it to the sha password, based
on the matching plain text response. This way, MM2.0.x list passwords
won't just be broken upon an upgrade.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
try to deal with deferred permanent failures.
_doperiodic(): It can be a bit expensive to actually deal with
permanent failures every time through this loop, and we don't need
that level of accuracy. So now we keep a counter and only process
permanent failures every DEAL_WITH_PERMFAILURES_EVERY times. (Okay,
so this variable defaults to 1, but you get the idea. :)
Also, move the Save() inside the try clause. I've decided that
finally clauses should only unlock the list, not try to save it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file processed. This would allow for example, a throttling algorithm
which limited the number of files processed per time period, or when
load averages were too high. Specifically,
run(): Allow __oneloop() to return any false value, not just zero, to
trigger the snooze alarm.
__oneloop(): After each file is processed, call _shortcircuit() and
break out of the file loop if that returns a true value. This way,
_shortcircuit() is executed for each file processed, and gives
subclasses a chance to do some per-file calculation. _doperiodic()
is at a finer granularity, since it conflates per-file and
per-processing-loop calculations.
_cleanup(), _dispose(), _doperiodic(), _snooze(), _shortcircuit(): Add
docstrings describing their interface.
_shortcircuit(): Default is to return 0, meaning don't shortcircuit.
|
| |
|
|
|
| |
argument defaults to None. Only set the payload when the text
argument is not None.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parse and generate the plain text message each time it's enqueued or
dequeued, we now use a binary cpickle as the message representation
file. This is controlled by a module global SAVE_MSGS_AS_PICKLES
which defaults to 1. When a message is saved as a pickle, its
extension will be .pck instead of .msg. dequeuing will automatically
recognize the different message formats and load accordingly.
Specific changes include:
enqueue(): If SAVE_MSGS_AS_PICKLES is set and the message metadata
does not have a "_plaintext" key, then the message object is stored as
a binary cpickle dump for speed. The incoming scripts post, join,
leave, etc. will set the _plaintext key because they funnel the text
straight from stdin to the .msg file, and the message text is only
parsed on the first dequeue from qfiles/in.
dequeue(): First try to load and unpickle the .pck file, falling back
to loading and parsing the .msg text file if the former is missing.
|
| |
|
|
|
| |
first try to get the index of the explicit argument, falling back to
the list's preferred language, and the server's default.
|
| |
|
|
|
|
|
|
|
| |
is retrieved out of the cgidata early on, so as to catch any new
language setting the user is making. Falls back to using the last
stored user preference.
Also, fixed indentation bug which prevented user's language setting to
take effect unless they had set some other option as well.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
have been added:
SMTP_LOG_EVERY_MESSAGE
SMTP_LOG_SUCCESS
SMTP_LOG_REFUSED
SMTP_LOG_EACH_FAILURE
The usage and format of these variables are described in
Defaults.py.in.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
module. Four new variables have been added:
SMTP_LOG_EVERY_MESSAGE
SMTP_LOG_SUCCESS
SMTP_LOG_REFUSED
SMTP_LOG_EACH_FAILURE
The usage and format of these variables are described in detail in the
preceding comment block.
Also, HTML_DIR and CGI_DIR are removed since they are unused.
|
| |
|
|
|
|
|
| |
_dispose(): Remove the "except Exception" class which allows any
exceptions to percolate up to Runner.__oneloop()'s catch-all exception
handler. Runner properly implements the log-and-shunt procedure for
any such exceptions.
|
| | |
|
| | |
|
| |
|
|
| |
as translatable.
|
| |
|
|
| |
`mischief' instead of `error'.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
syslog format strings to include information from the message
headers.
|
| |
|
|
| |
Also, syslog messages should not be marked as translatable.
|
| | |
|
| |
|
|
|
|
| |
nicer and more robust. String interpolation is now done here instead
of at callee site, so exceptions like TypeError and ValueError can be
caught and dealt with better.
|
| |
|
|
|
|
| |
doc.suppress_head to 1. This is because the output generated from
this function comes largely from the subscribe.html template, which
includes those tags.
|
| |
|
|
|
|
| |
doc.suppress_head to 1. This is because the output generated from
this function comes largely from the options.html template, which
includes those tags.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that the former adds <head><body> tags, while the latter suppresses
them. Document should be used for pages that are created by the
scripts out of whole cloth, while HeadlessDocument should be used for
any template-based page (which must supply its own head & body tags,
although not all of them do, I think).
It turns out to be useful to transform a Document into a
HeadlessDocument, so the trigger to output the head & body tags is the
instance variable "suppress_head" which Document defaults to 0 and
HeadlessDocument defaults to 1. All the real work is performed in
Document.Format().
Document.get_content_type(): Add the extra newline here, for
convenience.
|
| |
|
|
| |
alternatively highlight the list rows.
|
| |
|
|
| |
alternatively highlight the list rows.
|
| |
|
|
| |
401452.
|