| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
- Remove True/False binding cruft
- Remove __future__ statements for nested scopes
- Remove ascii_letters import hack from Utils.py
- Remove mimetypes.guess_all_extensions import hack from Scrubber.py
- In Pending.py, set _missing to object() (better than using [])
Also, update copyright years where appropriate, and re-order imports more to
my PEP 8 tastes. Whitespace normalize.
|
| |
|
|
| |
because it is overwrapped in Mailman.Message.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
account when figuring the posting date for an article.
Backport candidate.
|
| | |
|
| |
|
|
|
|
|
| |
one header. Try Date first, and fall back to X-List-Received-Date
which ArchRunner adds, before using self._last_article_time.
After an idea by Carson Gaspar
|
| |
|
|
| |
#643231
|
| |
|
|
| |
_set_date(): Convenience.
|
| | |
|
| |
|
|
|
|
|
|
| |
article class as an argument. Instead call out to an override-able
method _makeArticle() to return the article instance. This will be
overridden in HyperArch.py.
Bump __version__ while we're at it.
|
| |
|
|
|
|
| |
the base class's .next() method will never raise them (it's factory
masks them). However, the end condition is now that "m is None"
instead of m being false.
|
| |
|
|
|
| |
iteration, provide some more useful information in the logs/error
file.
|
| |
|
|
|
|
|
|
| |
as a last resort, if no valid email address could be retrieved from
the From: line. Previously it would always defer to the Reply-To:
address with unintended side effects.
Closes SF bug #224274.
|
| |
|
|
|
| |
skipping or processing loops. They usually mean MIME boundary
problems, which legit email rarely has.
|
| |
|
|
|
|
|
| |
can fast forward past a bunch of messages in the mailbox. This will
be used by bin/arch to process a huge .mbox file in chunks (manually).
Not fully tested, but it seems to work.
|
| | |
|
| |
|
|
|
| |
printed in VERBOSE mode (i.e. running bin/arch). Print out a
message counter and the Message-ID: of the message being processed.
|
| |
|
|
|
|
| |
UnixMailbox. The main difference being we pass in the MailList
instance to the constructor, so all the magic of the message scrubber
can work.
|
| |
|
|
|
|
|
| |
import cPickle as pickle
Convert to use email package so we're dealing with one kind of Message
object.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
be 'date'. I don't usually like touching pipermail, but in this case, the
pain is minimal.
Closes SF bug #426002.
|
| |
|
|
| |
os.mkdir() instead of Utils.mkdir().
|
| | |
|
| |
|
|
| |
Utils.open_ex() is obsolete.
|
| | |
|
| | |
|
| |
|
|
| |
emails. These should really be log file output.
|
| |
|
|
|
|
|
|
|
| |
versions of the In-Reply-To, References, and Message-ID headers, I
retain the original values in different variables. These are used to
generate the periodic downloadable archives.
_set_date(): Initialize date to '' not 'None' if there is no date
header.
|
| |
|
|
| |
and use that class here.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- add support for decoding subjects in links to next and prev message
if the encodings of the two messages are the same
- change re.sub('"',...) with string.replace('"', ...)
- remove unused __processbody_CGIescape method
- vast simplification and speed up of format_article
(still more to do in methods it calls)
- change logic of loadbody_fromHTML to avoid unnecessary tests
- add slightly optimized mailbox class
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
appearing in index. pipermail generated several indexes by assuming
that date was unique. If two messages arrived with, e.g., the same
author and date, then the author index treated them as identical.
As a result, both messages were archived, but only the last one was
included in the index. Solution is to always include the msgid, which
is unique, in the index key.
Change database keys to combine elements using tuples instead of
string concatenation with \000 as separator.
Fix was accomplished by refactoring on pipermail.Database and its
subclasses. Push index-key generation into common concrete base class
Database; rename abstract base class to DatabaseInterface. Break up
addArticle method into several pieces.
TBD There is still more refactoring to do on Database class.
Because date key has changed, HyperDatabase method to return first and
last date changed to reflect format of date key.
Refactor pipermail.T.add_article into several pieces.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
non-ascii charset.
HyperArch:
call write_index_entry from write_threadindex_entry
more style issues; refactoring of several methods
add ctype, charset, and decode attrs to Article; set based on
Content-Type header and an encoded-words in header
add extra blank lines to html templates so that they interact better
with iso-2022-jp text
handle msg <title> and <h1> tags separately to avoid non-ascii
characters in title
add encoding format to index and message headers
add explicit template for index entry
pipermail:
handle messages with timezone gracefully
catch EOFError when loading archive pickle
fix a few bugs that were hidden by bogus overrides in HyperArch
|
| |
|
|
|
|
|
|
| |
factor out "write article as html" as write_article method
fix a few bugs in previous checkin
HyperArch:
get rid of bogus add_article override; over_ride write_article instead
|
| |
|
|
|
|
|
|
| |
but it also had some methods that were overridden cut-n-paste
style.
pipermail: move Article date handling into separate method (should
probably do this for the rest of __init__)
|
| |
|
|
|
|
|
|
|
| |
fix some of the hardest-to-read style problems:
- no space around = in assignment
- obscure comparisons (e.g. use if seq: instead of if len(seq):)
- put body of if/else try/except on separate lines
refactoring: separate some large and/or obscure chunks of code into methods
|
| |
|
|
|
|
|
| |
self.database.getArticle() calls in a try/except KeyError. These are
stopgap measures to avoid exceptions percolating upwards when an
archive is regenerated with bin/arch. But it doesn't really fix
anything substantial (can you say "pipermail is broken"? ;)
|
| |
|
|
| |
have any effect.
|
| |
|
|
|
|
|
|
|
|
|
| |
from one place to another.
simply take the basedir argument as precedent over the saved state
version of basedir.
I initially considered doing this for the purpose of upgrading list
html archives from cvs sources between b5 and b6. Seems as though
anyone who set up pipermail archiving previously will benefit from the
change, and that it's a good thing for the pipermail module to.
scott
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Import open_ex() from Mailman.Utils and assign it to open in the
module's globals, so this gets picked up before builtin open. Saves
rewriting lots of occurances of open(), but could be confusing when
reading a method. Hmmm...
__version__ is appended to indicate that this is a Mailman-hacked
versio of Pipermail.
Use Mailman.Utils.mkdir() instead of os.mkdir().
All chmod()s are commented out, they are obsolete.
|
| |
|
|
|
| |
don't set the mod of the directory to 700. (permissions on the parent
directory are sufficient).
|
|
|
package.
Details:
changed Makefile to add the sub package as a directory to make
recursively in
changed configure to make the replacements to
Mailman/Archiver/Makefile.in
changed Mailman/Makefile.in to add Archiver as a sub package
moved Mailman/Archiver.py to Mailman/Archiver/Archiver.py and
Mailman/Hyper* to Mailman/Archiver
Mailman/pipermail.py to Mailman/Archiver/
created Mailman/Archiver/__init__.py to do a "from Archiver import *"
in order to make it's interface identical to previously.
import change: changed imports to import Mailman.<module> from import
<module> in order to accomodate the package import semantics, also
localized <module> by calling <module> = Mailman.<module>. see diffs
for details if this sounds confusing, it's not. this change was
applied to all of the moved files except pipermail, which didn't need
it.
did a basic new installation test to make sure all the
Makefile/configure changes took place atleast basically correctly.
scott
|