| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
only if it has no prior value), is encoded into the file name so that
we can guarantee FIFO order on the processed files. We can't encode
the received time in the file attributes because there isn't enough
precision (and I suspect that stat'ing all those files will be too
much of a disk I/O drain).
Instead, the filebase is composed of the string representation of the
current time in float seconds, the symbol `+', and the SHA1 hexdigest
of a hash of the uniquifying data. This makes it easy and quick to
decode received time for FIFO sorting, but retains the "random" digest
for bitrange slicing. Note that the received_time metadata value is
never changed once its set so the first part of the filebase will
remain unchanged as it moves between queues (while the hexdigest will
almost definitely change on each queue move).
dequeue(): Be more robust about missing .msg or .db files when the
other exists (usually, it'll be the .msg file that's missing). Return
None for either the msg or data part of the 2-tuple return value,
where None means "missing".
files(): Utililize the new file naming convention to break apart the
file name and sort the files in FIFO order, while still retaining the
bitrange random hash feature.
MarshalSwitchboard: All Python versions up to and including Python 2.1
have a bug in the marshal representation of binary floating point
numbers. Specifically, it loses precision that Mailman requires. The
solution in this class is to have a hardcoded list of known float
attributes, convert them to strings via repr() before marshaling the
dictionary, and convert them back to floats -- via a safe eval() --
when reading the marshal back from file.
|
| |
|
|
|
|
|
|
|
|
| |
assume that the list of files coming back from Switchboard.files() is
sorted by received time, so we don't need to randomize this list.
Also, it's now possible for Switchboard.dequeue() to return None for
either or both of msg and msgdata (say if the .msg file for a .db file
got lost somehow). Check that both are not None before proceeding
(but if either is None, log an error).
|
| |
|
|
| |
since this is guaranteed to be filled in by the runner.
|
| |
|
|
|
| |
the os.waitpid() call. This means there are no children left so we
can just clear the dictionary and return.
|
| |
|
|
| |
them to plain text first.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
mail scripts simply add metadata `tojoin' or `toleave' respectively,
which tell CommandRunner which operation to perform.
This is a bit crufty since MailCommandHandler.ParseMailCommands()
still handles the actual job of adding or deleting the member.
CommandRunner hacks the Subject: line of the message to add just the
specific desired command, and it empties the message's payload
(effectively ignoring any additional commands or useless text in the
email message).
|
| | |
|
| | |
|
| |
|
|
|
|
| |
drop an exclusive advisory lock on it, so Postfix doesn't try to read
the file while we're updating it. See the comment at the top of the
file for a discussion of why we have to do this so cruftily.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`aliases' and dbhash file `aliases.db' in sync. Specifically,
_addlist() => addlist()
_rmlist(): Removed.
addlist(): This now takes both a dbhash file and a file pointer to the
plain text file and adds the new list entries into both. If the plain
text file is empty (seek to end, tell() == 0), then an informative
comment is added to the top. In the plain text file, `stanza' marker
comments are used around the list alias entries. A trailing blank
line is always added after the stanza.
create(): This is now just a wrapper for addlist() (since addlist() is
now used by bin/genaliases).
remove(): Does the bulk of what _rmlist() used to do, plus it keeps
the plain text file in sync. It searches for the appropriate stanza
marker and removes every line between it and the stanza end marker.
(Actually, it does this by copying to a tmp file and shuffling the tmp
file to the real file.)
|
| | |
|
| |
|
|
|
| |
aliases.db file is perm'd 066x and that it's owned by root. The
group-ownership by mailman is already checked by check_perms.
|
| |
|
|
| |
delete a list: list-owner, list-creator, site-admin.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
be 8 characters long. If auto-gen is selected, the password and
confirm fields MUST be empty.
process_request(): Get the autogen value out of the cgi data. Also,
change the sanity checks to ensure that if autogen is selected,
password and confirm are empty, and only do the other password &
confirm sanity checks when autogen is false.
request_creation(): Support the auto-gen of list passwords.
|
| | |
|
| |
|
|
|
| |
Also, Postfix.py which contains the Postfix-specific code to run when
creating or removing a mailing list.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
time that Mailman received the message. This header only goes into
the archived copy of the message (header name and semantics were
discussed on mailman-developers).
|
| |
|
|
| |
Utils.get_domain().
|
| |
|
|
| |
data `automatically' instead of in this function.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
creating new mailing lists.
show_results(): Under "Other Administrative Activities", add a little
bit of space before the Logout entry. Also, if
OWNERS_CAN_DELETE_THEIR_OWN_LISTS is true, add a link just above
Logout to the rmlist cgi script for deleting the mailing list.
get_item_gui_description(): Use the new Label widget instead of
inlining the <div> tags.
password_inputs(): The PasswordBox widget now has a default size of
TEXTFIELDWIDTH, which is too big for these particular fields. Crank
the size down to 20.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
elements on the right edge.
PasswordBox: contructor now takes a size argument, which defaults to
mm_cfg.TEXTFIELDWIDTH.
TextBox: constructor's size argument now defaults to
mm_cfg.TEXTFIELDWIDTH instead of 10.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
argument `siteadmin' which if true reads the SITE_PW_FILE (default is
true). When false, it reads the LISTCREATOR_PW_FILE.
CheckSiteAdminPassword() -> check_global_password(): Same addition of
argument.
rmdirhier(): Like "rm -r" and unlike os.removedirs(), this recursively
deletes everything under a specified directory.
get_domain(): Returns the URL hostname/domain as pulled out of
HTTP_HOST or SERVER_NAME, and is VIRTUAL_HOST_OVERVIEW aware.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
into MMUnknownListError.
ProcessConfirmation(): Fix unpacking of the data coming back from
Pending.confirm(). op is always the first element, but data is the
1st through nth elements.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MTA_ALIASES_STYLE: Removed.
MTA: This names a module in Mailman/MTA which contains the
MTA-specific code to make the mailer aware of new mailing lists
automatically.
OWNERS_CAN_DELETE_THEIR_OWN_LISTS: This flag controls whether list
owners can delete their mailing lists through the web. If set to
false, only the site administrator can delete mailing lists using the
command line script.
LISTCREATOR_PW_FILE: Specifies where the list creator's password is
saved.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
main(): When the user hits the stop button on their browser during a
long running operation, Apache 1.3/mod_cgi will eventually catch a
SIGPIPE when output is written to the client. It then turns around
and SIGTERMs the cgi process, waits three seconds, then SIGKILLs the
cgi process. This patch fixes the stale lock file that can result
under this situation.
Since Python by default doesn't catch SIGTERM, and SIGKILL is
uncatchable, either signal would cause the cgi process to exit without
raising an exception, giving no chance for the script to clean up
after itself. We now open the MailList object in two phases: first,
open it unlocked, then lock it and install a SIGTERM handler. The
SIGTERM handler unlocks the list and exits, aborting any changes that
may have taken place. This is the safest way to ensure that stale
locks won't be left around causing other hits on the list to become
wedged for a long time.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
main(): When the user hits the stop button on their browser during a
long running operation, Apache 1.3/mod_cgi will eventually catch a
SIGPIPE when output is written to the client. It then turns around
and SIGTERMs the cgi process, waits three seconds, then SIGKILLs the
cgi process. This patch fixes the stale lock file that can result
under this situation.
Since Python by default doesn't catch SIGTERM, and SIGKILL is
uncatchable, either signal would cause the cgi process to exit without
raising an exception, giving no chance for the script to clean up
after itself. We now open the MailList object in two phases: first,
open it unlocked, then lock it and install a SIGTERM handler. The
SIGTERM handler unlocks the list and exits, aborting any changes that
may have taken place. This is the safest way to ensure that stale
locks won't be left around causing other hits on the list to become
wedged for a long time.
Also, de-string-modulification.
|
| |
|
|
|
| |
that race conditions can't trick us into trying to Save() when we
don't have the list lock.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
main(): Set up a signal handler to catch SIGTERM, and unlock the
mailing list when this happens. This has the side effect of aborting
any changes to the MailList object that this web hit may have made.
This is necessary due to semantics of Apache's mod_cgi: when the
browser closes the socket, eventually Apache receives a SIGPIPE (on
output to the closed socket). This causes Apache to SIGTERM the cgi
process, wait three seconds, then SIGKILL it. We want to be able to
clean up the locks, so the best we can do is try to unlock the list on
the SIGTERM. Once we get SIGKILLed, there's nothing we can do.
This change also moves the Save() call into the try: block so that the
finally: block /only/ unlocks the list. Thus, the list gets unlocked
in most situations. There are still race conditions where 1) the
config.db file could be corrupted; 2) list locks could still be
unreleased. Given the semantics of signals in Python, the interaction
of Apache's mod_cgi, and other factors, this is the best we can do,
and it should be better than the old situation.
XXX What do other web servers or cgi execution environments do?
|
| |
|
|
|
|
|
|
|
| |
_dispose(): Support for new site-wide date clobbering policy. No
longer is the Date: header clobbering a list-specific option, instead
ARCHIVER_CLOBBER_DATE_POLICY and ARCHIVER_ALLOWABLE_SANE_DATE_SKEW
control how Date: munging happens site-wide (this makes the most sense
since the choice of Pipermail vs. external archiver is also made
site-wide). See Defaults.py.in for more details.
|
| |
|
|
|
|
|
|
|
|
| |
"Regular-member (non-digest) Options" -> "Regular delivery
(non-digest) Options"
"Digest-member Options" -> "Digest Options"
change_options(): Support for pseudo-variables _new_volume and
_send_digest_now.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
digest_volume_frequency configuration attribute. Default is to rotate
volume numbers monthly.
ARCHIVER_CLOBBER_DATE_POLICY: New site-wide configuration variable to
control when the Date: header is modified for the archiver. Legal
values are 0 (retain original Date), 1 (always override with received
date), 2 (only override if the date is outrageous -- see below).
Default is to only override outrageous dates. The clobber_date
list-specific configuration attribute has been removed.
ARCHIVER_ALLOWABLE_SANE_DATE_SKEW: How far away a date must be from
current time to be considered outrageous. Default is 15 days.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the 0.3 release. This means you must download and install the 0.3
version of mimelib to work with the current CVS snapshot!
ReprMIME => StringableMIME
send_digests(): Added support for auto-bumping of digest volume
numbers based on the digest_volume_frequency configuration attribute.
send_i18n_digests(): After creating the mimedigest container, set its
payload to the empty list. This ensures that subsequent
add_payload()s will succeed. mimelib 0.3 will raise an exception
otherwise when appending to a scalar payload.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
configuration variable.
|
| |
|
|
|
|
|
| |
variable.
NewVars(): MailList objects grow a digest_volume_frequency and
digest_last_sent_at attributes.
|
| |
|
|
| |
configuration attributes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- digest_volume_frequency describes how often a new digest volume
should be started. Values are Yearly, Monthly, Quarterly,
Weekly, Daily. When a new digest volume is started, the volume
number is incremented and the next_digest_number is reset to 1
- digest_last_sent_at records when the last digest was sent, used
to calculate when a new digest volume should be started.
In addition, two new pseudo-variables are added which allow the list
admin to start a new volume with the next outgoing digest, and to send
the current digest right now, if it isn't empty.
send_digest_now(), bump_digest_volume(): New methods to encapsulate
sending a digest and bumping the volume number.
|
| |
|
|
|
| |
the 0.3 release. This means you must download and install the 0.3
version of mimelib to work with the current CVS snapshot!
|