| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Rename all handlers to be more PEP 8 friendly, i.e. lowercased.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
traces of our crufty old Syslog. Most of this work was purely mechanical,
except for:
1) Initializing the loggers. For this, there's a new module
Mailman/loginit.py (yes all modules from now on will use PEP 8
names). We can't call this 'logging.py' because that will
interfere with importing the stdlib module of the same name (can
you say Python 2.5 and absolute imports?).
If you want to write log messages both to the log file and to
stderr, pass True to loginit.initialize(). This will turn on
propagation of log messages to the parent 'mailman' logger, which
is set up to print to stderr. This is how bin/qrunner works when
not running as a subprocess of mailmanctl.
2) The driver script. I had to untwist the StampedLogger stuff and
implement differently printing exceptions and such to log/error
because standard logging objects don't have a write() method. So
we write to a cStringIO and then pass that to the logger.
3) SMTPDirect.py because of the configurability of the log messages.
This required changing SafeDict into a dict subclass (which is
better than using UserDicts anyway -- yay Python 2.3!). It's
probably still possible to flummox things up if you change the
name of the loggers in the SMTP_LOG_* variables in mm_cfg.py.
However, the worst you can do is cause output to go to stderr and
not go to a log file.
Note too that all entry points into the Mailman system must call
Mailman.loginit.initialize() or the log output will go to stderr
(which may occasionally be what you want). Currently all CGIs and
qrunners should be working properly.
I wish I could have tested all code paths that touch the logger, but
that's infeasible. I have tested this, but it's possible that there
were some mistakes in the translation.
- Mailman.Bouncers.BounceAPI.Stop is a singleton, but not a class
instance any more.
- True/False code cleanup, PEP 8 import restructuring, whitespace
normalization, and copyright year updates, as appropriate.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
the message was pulled from nntp. I'm not 100% sure this is the right
solution (e.g. should this be a list config option?) but it fixes the
problem that Mike Avery was having, and that we'll soon have when we
move python-list!
Backport candidate.
|
| |
|
|
|
| |
correct character set for the matching language. Closes SF bug
#659157.
|
| |
|
|
|
|
| |
See the comment, and this archived message.
http://mail.python.org/pipermail/mailman-developers/2002-November/014034.html
|
| |
|
|
|
|
|
| |
hold_these_nonmembers or because the generic_nonmember_action is 1
(hold), hold them with NonMemberPost instead of ModeratedPost.
Fixes SF #609692, as suggested by Les Niles and Tokio Kikuchi.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
dictionary's `sender' key, or the msg.get_sender() if not available.
This lets exceptions pass the sender through the metadata dictionary.
Used by Moderate.py to specify the failing address as retrieved from
get_senders() -- note the plural -- which has a different lookup
scheme than get_sender().
Moderate.process(): Set the tested sender address in the msgdata's
dictionary.
|
| |
|
|
|
|
|
| |
process(), hold_for_approval(), do_discard(): Make the notification
email appear to come from the -bounces address. When the sender is
for human consumption, make it the -owner address (or in the case of
Cleanse.py for anonymous lists, the list posting address).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
- Some implementation details.
do_discard(): Changed the message that gets sent with auto-discarded
messages. It might have been discarded because of the default
non-member action, in which case the old message wasn't really
accurate. I don't think the reason for discarding is all that
important right now.
Translators: beware!
|
| |
|
|
|
| |
the admin message in other checkins; specifically, we use set_type()
to set the Content-Type:
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
possible to assign an action to the flag, which ought to work better
for e.g. announce-only lists. Specifically,
process(): If we're looking at a member and that member has their
moderation flag turned on, then we look at
mlist.member_moderation_action. This is a 3-way selector specifying
whether the message should be held for approval, rejected (bounced),
or discarded. There's also a member_moderation_notice attribute which
includes text to send back to the member when their posting is
automatically rejected (WIBNI we could include that text in any held
or discard notification? Too much code disruption to do that right
now).
|
| |
|
|
| |
discard_these_nonmembers variable.
|
| |
|
|
|
|
|
|
|
| |
match of the sender against the nonmember addresses.
matches_p(): Implements the matching rules:
- match literal addresses first
- match re's next (they must start with a ^ which stays as part of
the regular expression)
|
| |
|