| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
- A rule that checks to see if the sender is a moderated member.
- A rule that checks to see if the sender is a non-member.
- A rule that checks to see if the message has no (or an empty) Subject.
Give IMembers (and the associated database implementation) an `is_moderated`
flag.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
values are unicodes if they come from the base class as a string.
Get rid of the 'global id'. Now use just Message-ID. Rename
X-List-ID-Hash to X-Message-ID-Hash. Do not take Date header into
account when calculating this hash.
Because of the above change, the assumption is that there will be no
Message-ID collisions. Therefore, get rid of IMessageStore
.get_message(), .get_messages_by_message_id() and
.get_messages_by_hash(). Instead, it's now .get_message_by_id() and
.get_message_by_hash() both of which return the message object or
None.
Message.hash -> Message.message_id_hash
When storing a message in the message store, the final path component
has the entire hash, not just the leftover parts after directory
prefix splitting.
MessageStore.delete_message() deletes the file too.
Doctests clean up message store messages though the message store
instead of directly off the filesystem.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This hacks around an apparent bug in the email package where if you parse a
unicode message string, you still end up getting 8-bit strings out of the
headers, and probably payloads.
The hack is to override Mailman.Message.Message.__getitem__() to force the
header value returned to a Unicode. It must be ASCII but this is required
anyway by RFC 2822. It's not perfect, but it lets us get farther without
forcing a detour into fixing the email package.
Other changes:
- Fix the Address table's references, and also update the subscribe() query.
- Fix the Member table's references and add a __init__().
- Fix Roster's get_member() query.
- Fix the Enum class's variable_class attribute.
- UserManager.create_user() has to use Unicodes for real_name.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from Mailman.Queue to Mailman.queue (note the case change to be more PEP 8
compliant).
The Switchboard and Runner classes have been moved into the package
__init__.py and the previous class modules have been removed.
The switchboard cache is removed; I don't think it was ultimately buying us
much. Now, just import the Switchboard class and instantiate it directly.
Added an IRunner interface.
Renamed the ArchRunner to ArchiveRunner.
bin/qrunner and bin/mailmanctl are updated accordingly. For the former, it no
long accepts -r=All to run all qrunners. You can still use the short name
(e.g. --runner=incoming) to run the built-in queue runners, but this design
will eventually allow for plugin qrunners by allowing them to be run
specifying the full package path to the class. It also now accepts a leading
dot to indicate a qrunner class relative to the Mailman.queue package.
|
| |
|
|
|
|
| |
gone. Fix up OwnerNotification class. Rewrite subauth.txt and
subscribeack.txt for new implementation, especially removing the
password notification from the latter. Add lots of tests.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pending.py module is removed. Added an interface to this functionality such
that any IPendable (essentially a key/value mapping) can be associated with a
token, and that token can be confirmed and has a lifetime. Any keys and
values can be stored, as long as both are unicodes.
Added a doctest.
Modified initialization of the database layer to support pluggability via
setuptools. No longer is this layer initialized from a module, but now it's
instantiated from a class that implements IDatabase. The StockDatabase class
implements the SQLAchemy/Elixir layer, but this can be overridden in a
setup.py. Bye bye MANAGERS_INIT_FUNCTION, we hardly knew ye.
Added a package Mailman.app which will contain certain application specific
functionality. Right now, the only there there is an IRegistar
implementation, which didn't seem to fit anywhere else.
Speaking of which, the IRegistrar interface implements all the logic related
to registration and verification of email addresses. Think the equivalent of
MailList.AddMember() except generalized out of a mailing list context. This
latter will eventually go away. The IRegistrar sends the confirmation email.
Added an IDomain interface, though the only implementation of this so far
lives in the registration.txt doctest. This defines the context necessary for
domain-level things, like address confirmation.
A bunch of other cleanups in modules that are necessary due to the refactoring
of Pending, but don't affect anything that's actually tested yet, so I won't
vouch for them (except that they don't throw errors on import!).
Clean up Defaults.py; also turn the functions seconds(), minutes(), hours()
and days() into their datetime.timedelta equivalents.
Consolidated the bogus email address exceptions.
In some places where appropriate, use email 4.0 module names instead of the
older brand.
Switch from Mailman.Utils.unique_message_id() to email.utils.make_msgid()
everywhere. This is because we need to allow sending not in the context of a
mailing list (i.e. domain-wide address confirmation message). So we can't use
a Message-ID generator that requires a mailing list. OTOH, this breaks
Message-ID collision detection in the mail->news gateway. I'll fix that
eventually.
Remove the 'verified' row on the Address table. Now verification is checked
by Address.verified_on not being None.
|
| | |
|
| |
|
|
|
|
|
|
| |
- As the default type of string in mailman-2.2 was set to 'unicode',
i18n codes became need to be fixed.
- Fixed: admin web interface. Other web interfaces needs more verification.
- Fixed: non-digest delivery. Stil to go: digest and archive.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this change. More unit tests should be added.
misc/sitelist.cfg is removed -- this is an ex-site list.
MailList.GetNoReplyEmail() -> MailList.no_reply_address (property)
UserNotification._enqueue(), OwnerNotification._enqueue(): when queing the
message to the virgin queue, be sure to use the fully qualified (i.e. posting)
address for the list.
In the MTA modules, be sure to set up the target of the mail commands as the
fqdn listname because otherwise we can't find the correct list. This needs
some tweaking/testing for Postfix's virtual domain support.
MailList.Load() has to grow an optional argument specifying the fqdn
listname. The problem is that in some situations, we can't calculate that
because we don't know _internal_name, so it has to be passed in. This is
mostly the case in the MailList ctor where a Load hasn't happened yet. For
backward compatibility though, if it's not passed in, just use
mlist.fqdn_listname.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
name in more than one domain.
- Totally eradicate MAILMAN_SITE_LIST, and in fact the entire need for a site
list. The functions that the site list previously performed are either
removed or supported in other ways. For example, instead of forwarding
owner bounces to the site list, we now have a SITE_OWNER_ADDRESS which
should point to a human, and such bounces are sent there instead. There's
also a "no reply" email address that should be set up to go to devnull. For
any message that never expects a reply, the sender is set to this address.
- Remove the Site.py module. It was an experimental approach to trying to
support virtual domains, and we're going to do it so much better now that
this module is no longer necessary. Site._makedirs() -> Utils.makedir().
- VIRTUAL_HOST_OVERVIEW is completely removed, since now virtual hosts are
always enabled. Virtual domains should be added to mailman.cfg by using the
new add_domain() function. add_virtualhost() is gone. If no virtual
domains are added explicitly, we add the default one that configure guessed
(but we never add that if domains are added explicitly).
- Utils.get_domain() -> Utils.get_request_domain()
- withlist code cleanup and make sure that we load etc/mailman.cfg
- A new base exception called MailmanException is added, from which all
exceptions defined in Errors.py ultimately derive. MailmanError is retained
and derives from MailmanException.
- BadDomainSpecificationError is added.
- Remove the -V/--virtual-host-overview option from list_lists and add instead
-d/--domain and -f/--full.
- bin/update probably works but needs more testing.
- bin/newlist and bin/rmlist take fqdn list names, but default to the default
domain if @whatever isn't given. newlist's -u/--urlhost and -e/--emailhost
options are removed. The domain that the list is being added to must
already exist.
- Minor code cleanup in Message.py
- Bump version to 2.2.0a1
- The Configuration object grows a .domain dictionary which maps email hosts
to url hosts. The reverse mapping is supported, but not directly; use
Configuration.get_email_host() instead.
- Mailman/Cgi/create is converted from mm_cfg to config, and some minor code
cleanup is performed. Also, convert to __i18n_templates__ = True.
- New MailList APIs:
+ property .fqdn_listname
+ GetNoReplyEmail()
+ Create() API changes and refactoring.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and fixing the invocation and shutdown of mailmanctl. While the tests in this
module work individually, they do not yet work as a group.
-C added to testall.py, and mailmanctl now passes that flag on to qrunner.
UserNotification sets reduced_list_header in the msgdata, but the behavior of
this flag has changed. It used to suppress List-Help, List-Subscribe, and
List-Unsubscribe as well as List-Post and List-Archive. However, List-Help,
List-Subscribe and List-Unsubscribe should definitely be included in
UserNotifications, and List-Post has a different variable controlling it now.
Therefore, always add List-Help, List-Subscribe, and List-Unsubscribe.
Some style updates to Message.py
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
configuration file. While the full conversion is not yet complete, everything
that seems to be required to run mailmanctl, qrunner, rmlist, and newlist have
been updated.
Basically, modules should no longer import mm_cfg, but instead they should
import Mailman.configuration.config. The latter is an object that's
guaranteed to exist, but not guaranteed to be initialized until some top-level
script calls config.load(). The latter should be called with the argument to
-C/--config which is a new convention the above scripts have been given.
In most cases, where mm_cfg.<variable> is used config.<variable> can be used,
but the exceptions are where the default value must be available before
config.load() is called. Sometimes you can import Mailman.Default and get the
variable from there, but other times the code has to be changed to work around
this limitation. Take each on a case-by-case basis.
Note that the various directories calculated from VAR_PREFIX, EXEC_PREFIX, and
PREFIX are now calculated in config.py, not in Defaults.py. This way a
configuration file can override the base directories and everything should
work correctly.
Other changes here include:
- mailmanctl, qrunner, and update are switched to optparse and $-strings, and
changed to the mmshell architecture
- An etc directory has been added to /usr/local/mailman and a
mailman.cfg.sample file is installed there. Sites should now edit an
etc/mailman.cfg file to do their configurations, although the mm_cfg file is
still honored. The formats of the two files are identical.
- list_lists is given the -C/--config option
- Some coding style fixes in bin/update, but not extensive
- Get rid of nested scope hacks in qrunner.py
- A start on getting EmailBase tests working (specifically test_message),
although not yet complete.
|
| |
|
|
|
|
| |
the builtin types. Two still remain: a check against ClassType and a check
against MethodType. Also, fix some hinky type comparisons to use isinstance()
consistently.
|
| |
|
|
| |
from Message.py
|
| |
|
|
|
|
| |
This incorporates Python email patch:
http://sourceforge.net/tracker/?func=detail&aid=1409455&group_id=5470&atid=105470
and eventually be backed out if email package is updated.
|
| | |
|
| |
|
|
| |
is updated.
|
| | |
|
| | |
|
| |
|
|
|
| |
non-ASCII data, lets not make email.Header.Header barf on it; use 'replace'
as the unicode error strategy (this requires email-2.5b1.)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
constructor is changing. We no longer pass the sender in since that's
calculated to be the site list's -bounces address to prevent mail
loops when a list's owner bounces.
Also, factor out the _enqueue() private method from the send()
method. OwnerNotifications need to set the `envsender' key on the
message's metadata.
Problem diagnosed by Peer Heinlein.
|
| |
|
|
|
|
|
|
|
| |
UserNotification but provides a different constructor. It calculates
the recipients from the list's owners and, if the tomoderators flag is
true (the default), includes the list's moderators.
The ctor also munges the To header so that it looks like it's being
sent to the list's -owner address.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Heinlein's recent problems. This patch adds several things to better
update pickled Message objects to the latest email package.
Specifically,
__init__(): Add a version number to Message objects so that we can
make __setstate__() more efficient (I don't want to do the next bit of
hackery for every single unpickled Message object).
__setstate__(): For Message objects older than the current email
package version, we'll ensure that the data format is the same. We
keep the previous updates and add one that trolls through the message
headers, ensuring that if any of the headers are Header instances,
that their chunks all have 2nd items as Charset instances, not
strings. This is an invariant for email 2.4.3, but older Message
instances might not conform.
|
| |
|
|
| |
to aid in debugging.
|
| |
|
|
|
|
|
|
|
|
|
| |
updates from email 2.1 and email 2.2, you're a bit screwed. Message
objects grew a _default_type attribute which is *probably* text/plain
but that's not guaranteed. Unfortunately at the time __setstate__()
is called, we can't know for sure what _default_type ought to be,
since it depends on whether this object is contained in a
multipart/digest and we have no reference to the container.
This is the best we can do.
|
| |
|
|
|
| |
Precedence: header, add Precedence: bulk since these are typically
internally crafted messages destined for a single address.
|
| |
|
|
|
|
| |
2-tuple with an empty realname item; second, we should extract all
matching headers with Message.get_all() to make sure we don't miss
anything (even though RFC 2822 says those should only appear once).
|
| |
|
|
| |
List-Post: et al headers.
|
| |
|
|
| |
None, which obviously can't be .split(). This is more robust.
|
| |
|
|
|
|
|
|
|
| |
the character set. The most common reason for this is that the
notification message is a multipart/mixed and it makes no sense to
give those type of messages a charset.
.send(): Set the `nodecorate' key to 1 so that messages that original
from the virgin queue don't get headers and footers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
loosens the membership test to check additional headers. I've
modified Jason's patch in the following ways:
- get_author() -> get_senders() even though I suggested the former. ;)
I'd like to eventually deprecate get_sender() so this will be its
eventual replacement.
- added an optional `headers' argument which defaults to None, meaning
the list of headers we agreed on previously. This allows you to
pass in the exact headers you want to consult (and their order).
- Some implementation details.
|
| |
|
|
|
|
|
|
|
| |
there was a lang argument given, call self.set_charset() instead of
doing nothing. Note that when a text argument is given, set_charset()
is called implicitly by set_payload().
Otherwise, given lang but no text results in no MIME-Version: header
being set.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
| |
charset information can be propagated into the headers, if necessary.
Use the new mimelib/email package's Charset and Header classes.
Patch by Ben Gertzfield. Requires email 0.97.
|
| |
|
|
|
| |
module pprint uses repr() instead of str(). This aids in debugging
with bin/dumpdb.
|
| |
|
|
|
|
|
| |
one if it's missing (most notably qmail). It's easy and correct for
us to add a compliant one.
SF patch #500670 by Jason Mastaler.
|
| | |
|
| |
|
|
|
| |
Also, use cStringIO directly instead of our own hack-around StringIO
module.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
argument defaults to None. Only set the payload when the text
argument is not None.
|
| |
|
|
| |
through to the enqueue() method.
|
| |
|
|
| |
comparisons.
|