summaryrefslogtreecommitdiff
path: root/Mailman/pythonlib/smtplib.py (unfollow)
Commit message (Collapse)AuthorFilesLines
1998-08-03.__repr__(): Use the class name in the repr string, rather thanklm1-7/+9
hardcoded "Logger", so derived classes (eg, StampedLogger) identify themselves correctly. .__init__(): Clarified function docstring a bit.
1998-08-03TrySMTPDelivery(): Regularize the ways that various exceptions areklm1-14/+21
expressed, and log failures to smtp-failures.
1998-08-03Added --with-cgi-ext option for specifying an extension on the cgi-binbwarsaw4-61/+112
wrapper scripts. Apparently the Roxen server requires this.
1998-08-01Some small refinements to some options descriptions. (Prompted byklm1-8/+11
potential confusion pointed out by jeremy.)
1998-08-01TrySMTPDelivery: The queueing activity had to be more discriminating,klm1-5/+26
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.
1998-07-31Dang, can't chmod g+s on scripts, at least under Solaris, probablybwarsaw1-1/+0
others.
1998-07-31CGI_MODULES: *.py instead of error-prone explicit listbwarsaw1-3/+1
1998-07-31MODULES: *.py instead of error-prone explicit listbwarsaw1-7/+1
1998-07-31install: Install all bin scripts with group sticky bit set. Thisbwarsaw1-0/+1
seemed necessary for the mmsitepass, and I figured other scripts couldn't hurt.
1998-07-31call_script(): Two fixes: first past `list' in as a parameter so youbwarsaw1-4/+5
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???
1998-07-31Very substantially rewritten. The old driver script let too manybwarsaw1-60/+100
uncaught exceptions through to the top level. Uncommented out the open() definition. I think this is very helpful during the beta debugging phase. We'll comment this out for 1.0 release (it also won't be necessary in Python 1.5.2, but nobody has that yet!) Exception printing has been changed so that the MultiLogger is no longer necessary. Removes one more potential crash, but also rationalizes print_exception() and print_environment(). There's always exactly two places information goes: 1. To a plain text log file. This could be sys.__stderr__ if no explicit log file is given -- e.g. the Web server's log file. 2. To an HTML sink. This will always be sys.stdout (since we use the `print' statement), and will generally always be connected to the input of the Web browser. Log file printing happens first, just in case (it's better that the server knows what's happening), but we always try to print both. `Main' has been rewritten also. We now do not catch any problems with import sys. If sys can't be imported, then the Python installation is royally screwed -- even `print' won't work! Better to just let the catastrophy percolate up to the Web browser. Even so this should almost never happen. Poke __stderr__ and __stdout__ into the sys module if they aren't already there. GvR says this is a 1.5.1 feature, but we can make it work well enough for older versions of Python, and it's convenient. Give one final shot at printing the traceback and environment if the exception percolates all the way up out of run_main(). This time, just print them to stderr (usually meaning the Web server's error log). Should this fail too, do whatever we can not to generate an end-user visible server error.
1998-07-31StampedLogger.__init__(): Added new default argument `immediate'bwarsaw1-3/+6
which is passed through to the Logger.__init__().
1998-07-31__logexc() => _logexc()bwarsaw1-4/+4
XXX: This class is no longer used by the driver script.
1998-07-31__logexc() => _logexc()bwarsaw1-9/+16
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.
1998-07-31__logexc(): Renamed to _logexc() -- single leading underscore -- so itbwarsaw1-1/+2
doesn't get name mangled.