| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
| |
through Utils.ParseAddrs() to get the real email address out of the
name argument.
|
| |
|
|
|
|
|
|
|
|
| |
referenced; these should be Errors.
This was in response to an attempt to subscribe a list to itself by
sending an subscribe email command and faking the From: field. Now we
don't get a crash, but I'm not sure the current behavior is correct.
The address (properly) doesn't get subscribed, but a message stating
this *is* sent to the list!
|
| |
|
|
|
| |
awkward 'posters' option description so its interaction with
member_posting_only is easier to understand.
|
| |
|
|
|
|
|
|
|
|
|
| |
resurrect the old one and then reraising the error. (Just before he
left for the Usenix conference, John encountered a partition filling
with a large config.db, and the old config.db not being resurrected.)
I created a little utility function to move a file aside and
optionally create a new one - this (aside_new()) may belong in Utils,
if it's useful elsewhere. We're all in minimal-time mode, so that'll
have to wait...
|
| |
|
|
|
|
|
| |
in ApprovedAddMember, new confirmed subscriptions were being only
partially saved - the password entry was being left out. Which is a
problem. (In the five hours this has been happening on my site, i
wonder how many broken accounts there are? Not good.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
work like unix mail: username portions of addresses are
case-preserved for delivery only. All other address comparisons are
lowercase.
up'd data version in Defaults to 13
** MailList.py: added an __AddMember method that takes an address and
whether or not it is a digest address as args and populates the member
dictionary like this:
if string.lower(addr) == LCDomain(addr):
member_dict[addr] = 0
else:
member_dictp[string.lower(addr)] == LCDomain(addr)
added .GetDeliveryMembers() and .GetDigestDeliveryMembers() methods
for use by posting and digest delivery mechanisms.
changed a nested def portion in Post to use an explicit loop.
**Digester.py: uses .GetDigestDeliveryMembers instead of
.GetDigestMembers().
**Utils.py: address comparisons are lc.
**versions.py: populate the member dicts according to the above
formula.
**Cgi/admin.py: fixed a bug introduced from the first change to using
member dictionaries: all members were showing up as digest members
on the admin membership page. changed a dict.get to dict.has_key to
fix this.
NOTE: this code is tested only insofar as I posted and poked around on
the cgi's a bit, and let lists do the versions code. These changes
should be tested more, but I *have* to go now and wanted to check them
in before someone made it difficult to do so by changing stuff
tomarrow, cause i'm gone all day tomarrow.
scott
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix and one addition. Sorry, i realized that too late.
This change adds another list conifg variable "admin_notify_mchanges",
which is a boolean 0 or 1 and specifies whether or not the list admin
gets notifications of subscriptions and unsubscriptions.
The functions MailList.DeleteMember and MailList.ApprovedAddMember
trigger the delivery if it is turned on for the list or passed in as
an optional argument. This way, it is the duty of programs/code that
do mass subscriptions/unsubscriptions where this notification may not
be appropriate to specify that in the call to .DeleteMember or
.ApprovedAddMember.
There are 2 new templates, adminsubscribeack.txt and
adminunsubscribeack.txt which are used in sending these
notifications.
Defaults.py.in has a variable "DEFAULT_ADMIN_NOTIFY_MCHANGES" which is
set to 0 so that old lists will act the same by default, and the data
version is up'ed to 12. versions.py sets the variable if it's not
already there for a list. The config info for the admin cgi program
for this new variable is set right after the variable for immediate
notifications.
The second change is a fix where ApprovedAddMember was calling a
"self.Save()", which made mass subscribe situiations really far too
slow. I removed the .Save() from there and added it to the more outer
level code in the following places:
bin/convert_list
Mailman/ListAdmin.py
Mailman/MailCommandHandler.py
Mailman/Cgi/admin.py
Note that since AddMember can trigger a call to ApprovedAddMember, all
the places where AddMember is called needed a .Save() added as well.
I need to add a call to .Save() for Mailman/Cgi/subscribe.py as well
and will do that in a moment.
scott
|
| |
|
|
|
|
|
|
| |
case if the list died during birth. Otherwise, an AttributeError
exception during __del__ was leaving kruft in the error log.
Wrapped a bunch of long lines and did some typo/grammatic refinement
in some options descriptions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
didn't translate Utils.FindMatchingAddresses properly!
in MailList.Post(), FindMatchingAddresses was applied to list.posters
and list.forbidden_posters which are lists and not dicts, so I added a
function in Utils called List2Dict that takes a list and retuns a dict
keyed by the items in the list (it doesn't check for whether the items
are hashable). All values are 1.
This function is now used in MailList.Post(): where the
FindMatchingAddresses was applied to an address list, it is now
applied to Utils.List2Dict(address list).
scott
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dicts instead of lists, which optimizes Utils.FindMatchingAddresses
and general membership management, especially for large lists.
MailList.py now supplies .GetMembers() and .GetDigestMembers() to
supply the data in list form to anything that needs it that way.
An new install showed this worked fine with some cursory testing of
the cgi's and interactive poking around.
A detailed listing of the changes follows:
Mailman/Defaults.py.in: change data version to 11
Mailman/Digester.py: initvars now instantiates digest_members as {}
instead of []
lines 113-114 and 121-122 now use del
This change implements storing list members and digest members as
dicts instead of lists, which optimizes Utils.FindMatchingAddresses
and general membership management, especially for large lists.
MailList.py now supplies .GetMembers() and .GetDigestMembers() to
supply the data in list form to anything that needs it that way.
Though INSTALL shows up on the changed files section, a diff a few
seconds ago didn't show any differences in that file, so I hope nobody
changed it in the interim.
An new install showed this worked fine with some cursory testing of
the cgi's and interactive poking around.
A detailed listing of the changes follows:
Mailman/Defaults.py.in: change data version to 11
Mailman/Digester.py: initvars now instantiates digest_members as {}
instead of []
lines 113-114 and 121-122 now use del
list.[digest_]member instead of
list.[digest_]members.remove
when figuring who to actually send digests to,
use list.GetDigestMembers() instead of
list.digest_members.
Mailman/HTMLFormatter: now uses list.Get[Digest]Members to get
subscribers, and length of digested subscribers
and regular members
MailCommandHandler, SecurityManager,Cgi/handle_opts, Cgi/options: all
simple replacements of list.[digest_]members with
list.Get[Digest]Members().
Mailman/Cgi/admin.py: mostly simple replacements of
list.[digest_]members with the Get..() methods, however, the
membership management section now works much quicker and changes
digest->nodigest subscriptions via dictionary manipulations.
Mailman/versions.py: updates lists to use dicts and changed
list.[digest_]members to use the list.Get[Digest]Members() methods.
Mailman/Utils.py: added a function "GetPossibleMatchingAddresses"
which when fed an address, returns the list of addresses that "smart"
address matching would match.
changed FindMatchingAddresses(name, list) to use a new signature:
FindMatchingAddresses(name, *dicts), where dicts is a list of
dictionaries keyed by addresses. Just realized that this would better
be FindMatchingAddresses(name, dict, *dicts) so that it enforces
atleast 2 args... I'll make that change in a sec.
All uses of FindMatchingAddresses have been changed to fit the new
arguments.
scott
----:**-F1 cvs30458aaa 1:12PM 0.98 Mail (Text Fill)--L59--32%-------------------------------------------
?
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the envelope sender and use it if it is found, otherwise, use
msg.GetSender().
This is one of the many places where mailman checks the "sender" by
looking for the sender header, which isn't as authoritative as the
envelope sender if that's available from the unixfrom line. the
sender is a header, the envelope sender is from the smtp transaction.
Got bit hard by this one because a profane message posted to a 3k list
through a forwarding address that should have been flagged as
requiring approval wasn't because the forwarding address set the
sender header to something other than the envelope sender, and what it
set that too happened to be an approved address.
scott
|
| |
|
|
|
|
|
|
| |
format setting, according to the lists default. (This fix follows
from one suggested by gergely madarasz, with the difference that the
setting is made whether or not they're registering to start with
digest mode. The idea is the initial mime format setting is the one
that will be offered to them if/when they do switch over...)
|
| |
|
|
|
|
|
| |
there are posters listed.
I realized that it was impossible to set up a list so that only people
listed in posters can post when i tried to set up a list this way!
scott
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GetAbsoluteScriptURL:
os.path.join would change a result like this:
some//where
to
some/where
but the "%s/%s" replacement wouldn't perform that fix,
so I made it do the same thing in GetAbsoluteScriptURL.
note: this problem may recur elsewhere, though i haven't seen it yet.
If it does, it may be wise to add a Utils.urljoin function that takes
care of this tidbit and use it universally where urls are joined with
"%s/%s".
scott
|
| |
|
|
| |
scott
|
| |
|
|
|
|
| |
changed GetAbsoluteScriptURL
changed options for admin/archives (line 442)
scott
|
| |
|
|
|
|
|
|
| |
member_posting_only variable. made it so that old lists not
expecting this behavior will have member_posting_only turned off in
the event that they have posters defined (preserving the old behavior
where defining posters made the list act as if member_posting_only was
set to "no" whether or not it was set as such).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variable (admin_member_chunksize). this is not yet settable by means
of cgi, but you can set it at an interactive python session. This is
a start on making the membership management part of the admin cgi
scalable for really big lists.
details:
* up'd DATA_FILE_VERSION in Mailman/Defaults.py.in
* replaced ADMIN_MEMBER_CHUNKSIZE with DEFAULT_ADMIN_MEMBER_CHUNKSIZE in
Mailman/Defaults.py.in.
* added a list variable assignment in Mailman.MailList.InitVars
* added code to add the admin_member_chunksize attribute to a list
when versions change in Mailman/versions.py
* made admin.py format members according to
list.admin_member_chunksize instead of mm_cfg.ADMIN_MEMBER_CHUNKSIZE
scott
|
| |
|
|
|
| |
header, according to RFC draft-chandhok-listid-02. Changes to
Deliverer.py use this in the header.
|
| |
|
|
| |
(Also, relocated some comments so they don't wrap beyond 80 chars.)
|
| |
|
|
|
|
|
|
|
|
| |
moved the archivery directory checking code to
Archiver.Archiver.CheckHTMLArchiveDir() and call that from
MailList.Save().
Also changed the archiving perms so that they are setgid mailman, as a
start to letting people with accounts that belong to group mailman run
archiving stuff by hand.
scott
|
| |
|
|
|
|
|
|
|
|
|
|
| |
if the sender has norcv set, the code does a
recipients.remove(sender), but the sender per se may not be
in the list of recipients. this may be because the sender's
address has caps in it that mailman has downcased in the
recipient list, or it may be because of mailman's preserving
case of usernames. to verify what all may cause this, i added
a try: except ValueError around the recipients.remove(sender)
line and log the sender and recipient list to the error log
scott
|
| |
|
|
|
|
|
| |
it back in when we find a need to implement it.
Elaborate the web_page_url explanation, including relevance to virtual
host stuff.
|
| |
|
|
|
| |
changed Post() so that it checks the correct variable for this.
scott
|
| |
|
|
|
|
|
|
|
|
|
| |
address for a member - trivially just the members regular address
*unless* we're talking about the member of an umbrella list, in which
case it has the umbrella_member_suffix appended to the account part of
the addr.
This is used everywhere that i was duplicating the functionality in my
last round of checkins, including a few places in MailLists.py as well
as the other files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"DEFAULT_REMINDERS_TO_ADMINS" => "DEFAULT_UMBRELLA_LIST". See recent
checkin for Mailman/Defaults.py.in for explanation of umbrella lists.
.AddMember(): Direct confirmation request to admin for member, rather
than member, if this is an umbrella list. Also, indicate such in the
log.
.InitVars(): Added initialization of .umbrella_list and
.umbrella_member_suffix.
.GetConfigInfo(): Added configuration descriptions for the change and
the new options.
.GetConfigInfo(): Took care of (lots) of misspellings in administrivia
option description.
Generally, manually folded lots of long lines so they don't wrap on
the screen, and cleaned up some verbiage.
|
| |
|
|
|
|
| |
the posters variable includes members addresses.
fixed typo in previous checkin for administrivia (setatrr instead of setattr).
scott
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is editable via the admin cgi to turn the filter on and off.
I'm sure that the filter could catch more things, but it will have
less false positives than majordomo anway :)
a listing of the specific changes follows:
Defaults.py.in changed data file version and added
DEFAULT_ADMINISTRIVIA
Utils.py added a function IsAdministrivia(msg) that does the filtering
replaced re.sub with string.replace(much faster) in
(Un)ObscureEmail.
MailList.py: added the config info for the administrivia variable, and
made the post method check it if the list has the
variable set.
versions.py: make new lists have an administrivia variable
scott
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
list members. I have yet to look at handling of -admin addresses.
Also, there is a configurable variable in Defaults.py that allows the
site admin to decide whether or not to do "smart address matching" -
where scott@chronis.pobox.com matches scott@pobox.com as the same
address (these addresses are in reality different addresses ;).
A listing of the changes to the files follows:
Defaults.py.in - added SMART_ADDRESS_MATCH variable and a short
description, defaulting to 1.
MailCommanHandler: removed string.lower(address) in
processSubscribeCmd and replaced it with
Utils.LCDomain(address)
MailList.py: made AddMember and ApprovedAddMember use
Utils.LCDomain(address) instead of string.lower(address)
Utils.py: got rid of top level domain listing and commented out
corresponding code in ValidEmail since it seems clear that
we have no intention of using this anymore.
added LCDomain(address) which lowercases only the domain
part of an address if there is a domain part.
made AddressesMatch use LCDomain instead of string.lower,
made it check LCDomain(addr1) == LCDomain(addr2) if
mm_cfg.SMART_ADDRESS_MATCH is set to 0, and do the match it
used to do if that variable is set to 1.
scott
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
was in (which was largely my fault from before).
Before:
1) web_subscribe_requires_confirmation was showing in the
admin cgi, but not working.
2) all subscribes that required admin approval were going
through the confirmation process.
3) the code implementing the confirmation process was
distributed between the subscribe cgi and
MailCommandHandler, duplicated in places and disrupting
the previous interface to list.AddMember.
4) the open_subscribe variable was confusing because
it didn't pay any attention to confirmations.
Now, things are organized a little differently, but in a much cleaner
way. there is one variable that deals with subscription policy, called
"subscribe_policy". It's setting determines what happens with both
the web based and the mail based subscriptions. there are 4 options:
0 - open subscribe policy
1 - confirmation required
2 - admin approval required
3 - confirmation and then admin approval required
there is a site configuration variable in Defaults.py called
ALLOW_OPEN_SUBSCRIBE, which determines whether or not an open
subscribe policy is an option. If it's not, the admin cgi interface
does not present it as an option.
I have restored a slightly modified version of the
prior-to-confirmations interface for list.AddMember, where all you
have to code is:
try:
list.AddMember(email, digest, password)
except Errors.MMBadEmail:
except Errors.MMAlreadySubscribed:
[ ... all those other good things it used to check ...]
except Errors.MMSubscribeNeedsConfirmation:
# the confirmation has already been sent.
# so just report accordingly to whatever the ap is.
In addition, I have moved the code for processing a confirmation
request to MailList.py so that it can be used in both a confirmation
cgi (which does not yet exist, but will) and the mailcmd script.
it's interface is:
try:
list.ProcessConfirmation(cookie)
except Errors.MMBadConfirmation:
# the cookie doesn't correspond to anything
except Errors.MMNeedApproval:
# the list is set to approve+confirm subscribe_policy.
A listing of the changes to the files follows:
Mailman/Defaults.in: added ALLOW_OPEN_SUBSCRIBE,DEFAULT_SUBSCRIBE_POLICY
deleted DEFAULT_OPEN_SUBSCRIBE, changed
DATA_FILE_VERSION to 5
Mailman/Errors.py: added MMBadConfirmation and
MMSubscribeNeedsConfirmation
Mailman/MailCommandHandler.py: moved the confirmation code to
MailList.py and use the new (old)
list.AddMember interface
MailMan/MailList.py: added .ProcessConfirmation(cookie), changed
AddMember to fit new (old) interface.
deleted config info for open_subscribe
and replaced with config info for
subscribe_policy that acts according to
mm_cfg.ALLOW_OPEN_SUBSCRIBE. Also made
list.ApprovedAddMember's "noack"
argument just "ack" for simplicities
sake and made it default to None
instead of 0 so that if the ack
variable isn't passed, it sets it to
the value of the lists
.send_welcome_msg setting.
Mailman/versions.py: added handling for new data file format,
replacing open_subscribe with a reasonable value
for subscribe_policy based on a combination of
what open_subscribe is and what
mm_cfg.ALLOW_OPEN_SUBSCRIBE is set to.
Mailman/Cgi/admin.py: made the cgi handle the output and processing of
subscribe_policy based on the setting of
mm_cfg.ALLOW_OPEN_SUBSCRIBE.
removed erroneous processing of whether or not
to send an ack with mass subscription based on
new interface to list.ApprovedAddMember (this
processing is to be replaced with a good idea
from john -- making mass subscribe have it's own
option of whether or not to send welcome
messages).
Mailman/Cgi/subscribe.py: made backgrounds white, and made it use the
MailList.AddMember interface described
above.
Mailman/Makefile.in: looks like this part of that distclean patch from
NAGY didn't make it in yet (rm'ing mm_cfg.py as well
as Defaults.py)
scott
|
| |
|
|
|
|
|
|
|
|
|
| |
it doesn't already exist.
Although the Archiver already does this, it was annoying to have lots
of error messages spit out from convert_list when there were no
existing archives. I think it makes sense to let the creation of the
archive directory take place in both list.Save and the archive class
in HyperArch.py since the directory may need to be created either when
the archiver runs or when the list is saved.
scott
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Original patches are from The Dragon de Monsyne with the following changes:
-added support for private archives as well as public
-added support for archiving daily and weekly
-made archiving happen in real time
-replaced use of pipermail's BSDBDatabase with homegrown python version
-took out the need for DocumentTemplate
here's a listing of changed files and relevant changes:
Makefile.in - added public_html/archives to installdirs
Mailman/Archiver.py - changed ArchiveMail to do real time archiving
Mailman/Defaults.py.in - added archive frequency and and archive url
extension variables
Mailman/MailList.py - changed .Save() to alter perms on public vs. private
archives
Mailman/htmlformat.py - changes directly from The Dragon do Monsyne's patches.
I don't know what they are exactly, but all the cgi's
seem to work fine, so I assume they are OK.
Mailman/versions.py - changes to add archiving based variables back to the list
Mailman/Cgi/private - changed to make it work with default installation and
made background white on login page
src/Makefile.in - changes to make all wrappers setuid mailman:
since various processes may access an archive, and the
archiving mechanism uses "chmod", all archives must be owned
by mailman, so all wrappers need to be owned by and setuid mailman
added files:
Mailman/HyperArch.py - from The Dragon de Monsyne with changes made noted above
Mailman/HyperDatabase.py - the replacement for pipermail.BSDBDatabase
scott
|
| |
|
|
|
|
|
|
|
|
|
| |
itself. I'm implementing other, earlier in the web and mailcommand
subscription processes, to prevent it from getting this far - but it
should still be checked, and will be treated as a bad-address error if
it gets beyond here.
.Post(): Fix x-beenthere mechanism - it was supposed to be detecting
mail loops, but was apparently broken. (I'm pretty sure i tested it,
so maybe it was broken along the way somewhere.)
|
| |
|
|
| |
potential confusion pointed out by jeremy.)
|
| |
|
|
|
|
| |
that method has been renamed.
InitVars(): Added a call to HTMLFormatter.InitVars()
|
| |
|
|
|
| |
just return. (Was raising two different AttributeErrors, depending on
whether or not the list had never been locked.)
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
initted i discovered that the TempVars routines were not being
properly invoked. So i've created an InitTempVars method which is
responsible for:
- setting several of the '_' underscore prefixed temp vars in that
were previously in __init__()
- calling the InitTempVars() routines present in some of the base
classes - currently HTMLFormatter and Digester.
I had to make sure that the check for a specified name was properly
respected (another thing fixed - anonymous links were broken, so "l =
MailList.MailList()" wouldn't work), and convey the lock status in
properly.
John, please check my logic - i was trying to infer what you were
intending with the TempVars stuff, from what seemed to be an
incompletely implemented rationale.
Anyway, the crashes from the lack of self._mime_separator and from
trying to instantiate without a name are now alleviated.
|
| |
|
|
|
|
|
|
|
| |
John, here's where I changed a call from HTMLFormatter.InitVars() to
HTMLFormatter.InitTempVars() since the former doesn't appear in the
class.
Some reformatting for consistency (wait 'til I run tabnanny.py over
the code :-)
|
| |
|
|
| |
I thought that got redone by Ken??
|
| |
|
|
| |
called every time since InitVars no longer does...
|
| | |
|
| |
|
|
| |
reminders for that particular list get sent.
|
| |
|
|
|
|
|
|
| |
list creation or if the version number of the data file has changed.
As a side-effect, if the data file *does* change, Load() will actually
happen twice, once to determine there's been a change, then a second
time, because InitVars() writes over what we just read in, which is
bad. It could be fixed, and probably should be some other time.
|
| |
|
|
|
|
|
|
|
|
|
| |
and Reply-To to get stripped out and replaced with: From:
list-admin@...
This one could potentially be something where if the admin enables
anonymous posting, it could be a per-sender option.
However, I added this because the guy from the Dave Matthews Band home
office wants to be able to post to an announcement list without
changing his email setup, yet not get email in his personal mailbox
from tons of fans. I figure others may have similar needs.
|
| |
|
|
|
| |
<janne@avocado.pc.helsinki.fi>. The changes fix regular expression
based filtering of headers.
|
| |
|
|
|
|
| |
GetRelativeScriptURL(script)
GetAbsoluteScriptURL(script)
Changed some calls to GetScriptURL to the appropriate new form.
|
| | |
|
| |
|
|
|
|
| |
whether Lock is implicitly called. Defaults to 1.
Also put the call to post to news in its proper place (next to the
digest + archive calls).
|