| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attributes into a special method which does some sanity checking on
the interpolation strings. First, it checks to see if we're using the
new experimental $-strings, and then depending on the style of
interpolation being used, it extracts the identifiers (variables) in
the string and compares them against a known valid list. Any invalid
variables are flagged and the changes are discarded. If the user
simply left off a trailing `s' (as in %(foo)s), then this can be
corrected, but a warning is still printed.
Note: In NonDigest.py we're using a module level function which is
imported by Digest.py's HandleForm(). Makes it convenient to share
code, but this should really be refactored along with
Autoresponse.py's HandleForm().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to not include the %()s chrome. We might be using the new
experimental $-strings. This leaves the instructions with a something
left to be desired, but it should be okay for now, and I don't want to
add two descriptions, one for %-strings and another for $-strings.
HandleForm(): We break the handling of the Autoresponse attributes
into a special method which does some sanity checking on the
interpolation strings. First, it checks to see if we're using the new
experimental $-strings, and then depending on the style of
interpolation being used, it extracts the identifiers (variables) in
the string and compares them against a known valid list. Any invalid
variables are flagged and the changes are discarded. If the user
simply left off a trailing `s' (as in %(foo)s), then this can be
corrected, but a warning is still printed.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
use_dollar_strings, this means the list has been converted from the
traditional (and error prone) %-substitution strings to the new
experimental $-substitution strings. We need to internally convert
the $-strings back into (safe) %-strings to utilize Python's string
mod operator.
process(): Apply Ben Gertzfield's patch to only add the header via
text/plain concatenation when the character set of the list's default
language matches the charset of the message.
|
| |
|
|
|
|
|
|
| |
use_dollar_strings, this means the list has been converted from the
traditional (and error prone) %-substitution strings to the new
experimental $-substitution strings. We need to internally convert
the $-strings back into (safe) %-strings to utilize Python's string
mod operator.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
should be able to filter on nomail (i.e. delivery disabled) as well as
the kind of digest being received.
I liked the idea, but wasn't keen on the new command line switches, so
I reimplemented it using optional arguments on the switches. Sadly,
this means we can't use getopt, but still, it's not that hard to hand
code. getopt-sig to the rescue!
Specifically, -d/--digest grow an optional argument, and added the
-n/--nomail switch.
statusp(): Returns a boolean specifying whether the nomail filter
matches the delivery status of the member.
main(): New option parsing code, and added the filters described
above.
|
| |
|
|
|
| |
interpolation strings from %-style to the new experimental (but less
error prone) $-style.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
modules. Specifically, import the email package /after/ we've
imported paths.
Also, in add_members: change the import of StringIO to use the Python
standard cStringIO module, which we can now pretty much guarantee to
be there.
|
| |
|
|
|
| |
modules. Specifically, import the email package /after/ we've
imported paths.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Stick $prefix/pythonlib on the front of sys.path. I've gone back
and forth about this for a long time; the question is: for modules
that Mailman provides which override the ones in the Python standard
library, should they explicitly import our overrides or implicitly
import them due to sys.path hacking?
I used to want the former, but now I want the latter because it
makes code maintenance easier (we don't have to modify a bunch of
files when we add or get rid of a shadow module). Yes, this
violates explicit over implicit, but I think it's for a good cause.
I may regret this some day <wink>.
- Go back to appending site-packages to sys.path instead of prepending
it. This makes it semantically more similar to the hacking that
goes on in site.py. We also don't need for site-packages to be
earlier in the path because of the above new rules for shadowing.
Remember that we start up the CGI scripts with python -S, so we
still need to get site-packages on sys.path (probably).
|
| | |
|
| | |
|
| |
|
|
| |
todo.html list from the new TODO file.
|
| | |
|
| |
|
|
| |
longest alias. Also, there's no need to add 1 to the field size.
|
| |
|
|
| |
and -leave respectively.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
give some hints about how to install Python itself from source.
Second, remove all the cruft about having to manually install the
email package; we'll do that for them now.
Fix some typos (can't remember who reported these, sorry).
--with-ownername change to --with-username, and --with-ownergroup
changed to --with-groupname.
Also, update for information about the `mailman' init script which is
now installed to scripts/mailman. And fix a couple of
$prefix/mail/wrapper->.../mailman typos.
|
| |
|
|
|
|
|
|
|
| |
package into $prefix/pythonlib, which we will arrange to be at the
head of sys.path, so as to override the standard package even in
Python 2.2.
The human installer now should no longer need to install the email
package manually for any version of Python.
|
| |
|
|
|
|
|
|
| |
the modules are now unnecessary because we're going to require at
least Python 2.1.x and it should have relatively bug-free versions of
these modules. Second, if we find we need to override standard
modules, we have a different way of doing it now (by path-hacking in a
pythonlib directory one level up into the front of sys.path).
|
| |
|
|
|
|
|
| |
displaying so that nasty HTML can't sneak in. Also, set the readonly
attribute to true when creating the Message Headers and Message
Excerpt text boxes. This avoids the misperception that you can edit
the message before it's approved.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
replacement for the function in the admin.py module. This makes it
much easier for gui component HandleForm() methods to add an error or
warning to the admin page.
TextArea.__init__(): Add a `readonly' argument, which translates to
the TEXTAREA tag getting a READONLY attribute. We'll use this to turn
the header and body excerpt text boxes in the admindb pages to
read-only (avoiding the common misperception that you can edit the
message before it's approved).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
they have a _charset attribute, adding a default one if not. This
should fix a problem I think Dan Mick had, which I believe is caused
by a Message object being pickled w/ version 0.96 of the email
package, and unpickled by 0.97/1.1 of the email package.
Why doesn't this go into email.Message.Message? Because I don't want
to clutter its code up with something that should both be transient
and assumes that Message is pickled. Mailman seems more responsible
for the pickle consistency (if every Python class that grew an
attribute had to have such schema migration code, we'd be up sh*ts
creek).
|
| |
|
|
|
| |
Mailman/pythonlib subdirectory in favor of an alternate location
when/if necessary.
|
| | |
|
| |
|
|
|
|
| |
our Mailman/pythonlib version. We don't use the extra hack in our
version anyway, AFAICT (i.e. the addition of a seek() method which
just deferred to the underlying file object).
|
| |
|
|
| |
suffix like all the others.
|
| | |
|
| | |
|
| |
|
|
| |
treated like all the other scripts now.
|
| |
|
|
| |
compatibility.
|
| |
|
|
|
| |
mail program. The installation procedure will copy the bounces script
to the admin script. This is for backwards compatibility.
|
| |
|
|
| |
2.1.
|
| |
|
|
|
| |
we path-hack before we try to import any email module. We'll need to
do an audit of all the command line scripts.
|
| |
|
|
|
|
|
|
|
| |
run(): After once through the loop, look at the freshen flag and if
true, clear the cache. Thus all subsequent MailList objects will get
updated state, but we'll gain the performance benefits of the cache
for each iteration the the big loop.
_open_list(): Return this function to its original state.
|
| |
|
|
|
| |
_open_list(): If we've pulled the list object from the cache, then
freshen the state by re-Load()-ing it.
|
| |
|
|
|
|
|
|
| |
class knows to reload the state when pulling the object from the
cache. Hmm, why do we even have a cache now?
_dispose(): Don't do the `verp' key calculation here; it's done
earlier and better in the ToOutgoing.py handler.
|
| |
|
|
|
|
|
| |
and VERP_DELIVERY_INTERVAL. We used to do this in OutgoingRunner, but
that was inconvenient due to the latter never freshing the state of
MailList objects (that's fixed, but this is still a better place to
set this key).
|
| |
|
|
|
|
|
|
| |
in Defaults.py, we need to arrange for this script to import paths.py
to pick up the correct site-packages prefixed sys.path.
Because we do this, we can delete the sys.path.insert() call, which
was redundant.
|
| |
|
|
|
|
|
|
|
| |
from Defaults.py.in. The problem is that even for Python 2.2, we need
site-packages to appear /before/ the standard library so that we can
pick up the newer version of the email package. Defaults.py/mm_cfg.py
is usually imported too late in the game to work, but paths.py is
about right (although we'll have to audit the command line scripts to
make sure they import paths.py before they import email.*).
|
| |
|
|
|
|
|
|
|
| |
paths.py.in file. The problem is that even for Python 2.2, we need
site-packages to appear /before/ the standard library so that we can
pick up the newer version of the email package. Defaults.py/mm_cfg.py
is usually imported to late in the game to work, but paths.py is about
right (although we'll have to audit the command line scripts to make
sure they import paths.py before they import email.*).
|
| | |
|
| |
|
|
|
|
|
|
| |
language for the email message that's sent out. Then do the
translation and UserNotification generation, then reset the language
context and send the message.
Patch by Ben Gertzfield, modified by Barry.
|
| |
|
|
|
|
|
|
| |
list's preferred language for the email message that's sent out. Then
do the translation and UserNotification generation, then reset the
language context and send the message.
Patch by Ben Gertzfield, modified by Barry.
|
| |
|
|
|
|
|
| |
the language that the message should be in. This allows us to get the
character set and header encodings right.
Patch by Ben Gertzfield.
|
| |
|
|
|
|
|
|
| |
UserNotification message object, pass in the language that the message
should be in. This allows us to get the character set and header
encodings right.
Patch by Ben Gertzfield.
|
| |
|
|
| |
character sets.
|
| |
|
|
|
|
|
| |
pass in the language that the message should be in. This allows us to
get the character set and header encodings right.
Patch by Ben Gertzfield.
|