| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
hardcoded "Logger", so derived classes (eg, StampedLogger) identify
themselves correctly.
.__init__(): Clarified function docstring a bit.
|
| |
|
|
| |
expressed, and log failures to smtp-failures.
|
| |
|
|
| |
potential confusion pointed out by jeremy.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
or else failures, like bad local recipients, would remain on the queue
forever, and cause repeat deliveries. (I believe this is part of the
problem behind the repeats we're seeing - but i'm not convinced it's
all of it.)
To fix, i made it so only partcicular exceptions - currently
socket.error, for absent SMTP listener - cause items to be left on
queue. Otherwise it falls through to a blanket except which discards
the item, leaving a note in the error log to that effect.
*** I think where the info should go back to the maillist structure,
to, e.g., disable the recipient, or whatever. However, this is
happening in a forked process, so we cannot use an exception, and the
routine itself doesn't, and shouldn't know which the list is.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
don't accidently get the built-in list function. Second, import and
run main() of the passed in `which' script, which seems currently to
be only options.py.
Q: How did this ever work???
|
| |
|
|
| |
which is passed through to the Logger.__init__().
|
| |
|
|
| |
XXX: This class is no longer used by the driver script.
|
| |
|
|
|
|
|
|
|
|
|
| |
Logger.__init__(): New default argument `immediate' says to open the
log file immediately upon creation (so we learn of errors early).
Otherwise the log file is opened when first needed.
Logger.__get_f(): Re-raise the exception using Python 1.5 semantics;
can't guarantee everyone has Python 1.5.1. Also if nofail, then set
the file pointer to be sys.__stderr__ so at least the exceptions will
get logged to the Web server log file.
|
| |
|
|
| |
doesn't get name mangled.
|
| | |
|
| |
|
|
|
|
|
| |
stdin, instead of as command line arguments, to avoid exposing
addresses to shell. In the process, eliminated the use of the temp
file for the content - it's passed via stdin as well. Also, fixed or
removed some obsolete comments, etc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
recognized as bad and refused immediately (rather than being queued
up, as happens for any offsite recipients). In particular, had to
detect whether all recipients in the batch failed, and then just
return - otherwise the DATA command would fail (no valid recipients),
and raise a disruptive exception.
It's worth noting that no bounce is generated for invalid local
recipients, which means now way to disable or even notice that they're
bad. This should be rectified at some point, but offhand i'm not sure
the right way, other than by special casing local deliveries. Anyway,
i left an XXX note to sorta this effect in the code.
And finally - it looks like the "official" python smtplib already does
the right kinds of thing regarding bad recipients, which makes me
feel good about merging with it.
|
| |
|
|
|
|
| |
current directory, the full path of the package must be given.
Strictly speaking, the package path isn't necessary since it is
guaranteed to find the right Utils.
|
| |
|
|
| |
the time.
|
| | |
|
| |
|
|
| |
sys.stderr (and tee it to sys.stdout, also).
|
| | |
|
| |
|
|
|
|
| |
that method has been renamed.
InitVars(): Added a call to HTMLFormatter.InitVars()
|
| |
|
|
|
|
|
| |
believe this should be InitVars(). Second, I move the list's HTML
template files into $prefix/lists/<listname>.
SnarfHTMLTemplate(): Call InitVars() instead of InitTempVars()
|
| |
|
|
| |
try/finally, with unlocking being done in the finally clause.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locking problems. JV please eyeball...
1. Got rid of is_locked attribute. Test for locking makes an explicit
test that a) the tmpfname exists and b) the pid read from the file
is our pid. This means that two instances of FileLock in the same
process that share the same lockfile will always be locked and
unlocked together (probably doesn't occur except in testing).
2. Added an __del__() which unlocks
3. Moved the creation of the basic lockfile to __kickstart() and added
a force argument. When force is true (default is false), the
lockfile is first removed then recreated. This is only used if the
lockfile contains bogus data, such that the winner could not be
determined. In that case, the only way to "break" the lock is to
recreate a new basic lockfile. This could potentially leave
tmpfname turds, but in reality this shouldn't happen very often.
4. Encapsulate reading and writing of the lockfile into __write() and
__read(), so that (most importantly) the umask will be set
correctly. This should fix most of the permission problems
associated with the lockfile by assuring that they are group
writable. A side effect: don't eval() the contents of the
lockfile.
5. lock(): Use the above changes. Added an assert for what I think is
an invariant: that the winner filename better not be equal to
self.tmpfname. Moved the timeout check into an else clause of the
pid comparison and eliminated the check of hung_timeout > 0 (this
is the one I'm least sure about).
|
| |
|
|
|
|
|
| |
web form by the user who probably doesn't hit hard carriage returns.
This looks ugly went emailed in the raw.
SendUnsubscribeAck(): Likewise for self.goodbye_msg
|
| |
|
|
|
| |
on the end of the last line of wrapped text; watch out for whitespace
at the front of split lines.
|
| | |
|
| | |
|
| |
|
|
| |
There's a new crontab entry that checks the queue once every 30 mins.
|
| | |
|
| |
|
|
| |
list.NumRequestsPending() (missed this one when i made the change).
|
| |
|
|
|
| |
just return. (Was raising two different AttributeErrors, depending on
whether or not the list had never been locked.)
|
| |
|
|
|
|
| |
return - despite the fact that lastresp is not apparently used
anywhere, i'm not ready to just yank it, and so it might as well be in
the right place.
|
| |
|
|
| |
the fact that it returns a number, and not a list of requests...
|
| |
|
|
|
|
| |
repr(recipient), since the underlying SendTextTouser() no longer forks
a command via a shell, but left the comment in, so i'm getting rid of
the comment.
|
| | |
|
| |
|
|
|
| |
we're specifying the recipients. This way, one bad one in a batch
will not clobber the whole send...
|
| |
|
|
| |
verify.txt.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interesting headers that should be kept in the plain digests. The
only potentially controversial one in my initial inclusion is
'organization', which i think can be essential on professional lists.
I'd be interested to hear whether there's any other essiantial ones i've neglected to include...
The current list is:
message
date
from
subject
to
cc
reply-to
organization
|
| |
|
|
|
| |
the really interesting ones, as specified with defaults setting,
'mm_cfg.DEFAULT_PLAIN_DIGEST_KEEP_HEADERS'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the constraints. (It looks like .FinishSubscribe() was made for this
purpose, but not used anywhere! Perhaps it was used but someone
inadvertantly switched away from it. I changed the location of the
definitions to reflect .FinishSubscribe()'s subordinate role.
Also, adapted to new version of verify.txt.
.FinishSubscribe(): added option for running AddApprovedMember, so
this routine can be used for both kinds of Add*Member. Also, fixed
crashing NameError reference in MMNeedApproval case. Also, logging
error details in case where unrecognized disposition exception is
encountered.
Added docstrings to help distinguish the relationship of
.ProcessSubscribeCmd() and .ProcessConfirmCmd()
|
| |
|
|
| |
by Carey Evans <c.evans@clear.net.nz>, for picky mail servers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into the confimation-expression pattern, to prevent regex-significant
characters in maillist names from tripping-up the regex compiler.
This really can happen - in fact, it does when people try to subscribe
to the "c++-sig"!
(I've cursorily checked through the python stuff in scripts, Mailman,
and Mailman/Cgi for other interpolations that might trip re.compile,
but didn't find any other instances. Be on the lookout, though, this
is a tricky one...)
(This was present in 1.0b4, as well, and i believe it accounts for two
elusive, outstanding problems:
- the "pcre.error : ('nothing to repeat', 2)" traceback, which i
mentioned on my recent "problems" list, and
- reports i've gotten (one this morning, coincidentally) of failures
in subscribing to c++-sig.)
I'm going to deliver a patch for 1.0b4 to the newsgroup, once i track
down a few other problems.)
|
| |
|
|
|
|
|
| |
particularly to avoid the inevitable duplication in the subject and
body, common for other mlm's, where people forget whether it's the
subject or the body that has effect. In mailman, it's both - but now,
not for duplicates.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
already-subscribed members. (The prior checkin was for web-based
subscription attempts.)
NOTE that both these already-subscribed actions can constitute privacy
leaks - someone could venture subscription attempts with addresses
which they are trying to test for already-existing membership - and
this response will provide unequivocal confirmation in the cases when
the addresses are subscribed.
One possible remedy is to send the refusal to the address being
subscribed. This way the person taking the action gets no additional
info unless they have access to the subscribees email channel.
Problem with this is that it complicates the mail-command refusal
process substantially, since it's currently geared, very simply, to
send the refusal to the requesting address. Do we think the privacy
leak is important enough to fill this hole?
|
| |
|
|
|
|
| |
already-subscribed members.
(Wrapped a couple of long lines.)
|
| |
|
|
|
|
| |
the verify.txt message, causing the subscribe script to bomb. I've
corrected the field and refined the message a bit, to put in the
origin phrase only if it's been discerned.
|
| |
|
|
|
| |
checkin) would not compile, causing this script to completely fail -
it should have been tested!
|
| | |
|
| | |
|
| | |
|