summaryrefslogtreecommitdiff
path: root/Mailman/Queue
Commit message (Collapse)AuthorAgeFilesLines
...
* _dispose(): Use mlist.internal_name().bwarsaw2003-08-181-3/+4
| | | | | | | | _register_bounces(): Return empty list as default for sitebounces so we can concatenate lists easier later. _cleanup(): Only call _register_bounces() if there are bounces to register.
* Implement a simple queuing bounce processor, which should allow morebwarsaw2003-08-171-51/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | efficient -- and more controllable -- bounce processing without killing lock contention. __init__(): Two new variables to collect bounce event information. _bouncecnt keeps a count of all events since the last processing pass (mostly for logging). _bounces is a dictionary mapping listnames to sequence of bounce events. A bounce event is a tuple of (address, day, msg) where day is (YYYY, MM, DD). _dispose(): Move all the actual registration of bounces out of this method. Instead, we add bounce events to the queue, which gets processed by a _doperiodic() pass. This allows us to never lock any lists in _dispose(). _doperiodic(): Check periodically for queued bounces that need to be processed, by default once every 15 minutes. _cleanup(): Needs to call _register_bounces() to take care of any queued bounces before the runner is shut down. _register_bounces(): This does the actual bounce registration, hopefully in a more efficient manner, by collating all queued bounce events and locking each list only once. Also handles registering bounces to the site list. This stuff still needs a bit more testing.
* _dispose(): mlist.nntp_host may now be a host:port pair.bwarsaw2003-05-121-7/+16
| | | | Use True/False where appropriate.
* Fix a missing importbwarsaw2003-05-081-0/+2
|
* DEAL_WITH_PERMFAILURES_EVERY: Do this only every 10 times through thebwarsaw2003-05-031-32/+34
| | | | | | | | | | | | | | | | | | | loop. _dispose(): Remove the logic for retrying temporary failures from here to the RetryRunner. This eliminates total cpu consumption on the re-queuing of messages with tempfailures (as can happen with delivery via Postfix to non-existent local addresses in its default configuration). Restructure the SomeRecipientsFailed clause and removed the deliver_after calculation -- we don't need it. DELIVERY_RETRY_WAIT is also removed. _cleanup(): When shutting down the qrunner, be sure to register all deferred permanent failures. Backport candidate.
* run(): Always call _snooze() but pass the file count to the method sobwarsaw2003-05-031-17/+22
| | | | | | | | | | | it can decide whether to do more work or sleep for a while. Pushes the policy into the derived classes. _snooze(): Default is to sleep only if filecnt == 0. True/False where appropriate. Backport candidate (as is RetryRunner.py)
* intermediatebwarsaw2003-05-031-0/+44
|
* _Switchboard.__init__(): Fixed slice end-point off-by-one calculation error.bwarsaw2003-04-191-3/+3
|
* True/False where appropriate.bwarsaw2003-04-061-7/+18
| | | | | Results.__init__(): Also do RFC 2047 decoding on Subject headers before processing.
* Copyright yearsbwarsaw2003-04-021-1/+1
|
* dequeue(): If we can't read a .db file, initialize data to the emptybwarsaw2003-04-021-0/+1
| | | | | | | dictionary, since the following test expects to do a has_key() on the value. Closes SF bug #707608. Backport candidate.
* Update commentbwarsaw2003-03-311-2/+2
|
* Another instance of mixing unicode with 8-bit-dirty strings. Since emailtwouters2003-03-201-3/+9
| | | | | will assume it's 8-bit encoded to the passed-in character set, convert unicode objects to that encoding.
* Use True/False where appropriate (so much cleaner!)bwarsaw2003-03-131-14/+26
| | | | | | | | | | | _dispose(): Add another key to the msg metadata, deliver_after. If a temporary failure occurs, this key will hold the time in epoch-seconds after which we can retry delivery. This stops us from retrying every second as reported in SF bug # 699900. Default is to retry once per hour (see Defaults.py.in). Also, use copy.deepcopy() instead of converting the message to a string and re-parsing it.
* When receiving an empty mail (no results and no unprocessed lines, buttwouters2003-03-111-0/+6
| | | | | | possibly 'ignored' lines, if a lot of 'em were blank) on a command-handler address, inform the user that the mail was empty, and how to get help. Based on SF patch #522080, Respond sensibly to blank -request email, by Seb Wills.
* Update copyright yearsbwarsaw2003-03-111-1/+1
|
* SF patch #683906, add $DESTDIR to install target, by Ademar de Souza Reistwouters2003-03-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Jr, after much checking and rechecking (and some massaging) by me. Checking in now before I fall asleep and forget what all this was for. This patch adds the ability to 'make DESTDIR=/some/dir/tree install' that doesn't influence the paths stored in e.g. Defaults.py at all, which is of good use for various package managers. It is not all that package managers must do, however! Running make install with DESTDIR set means bin/update is never run, and mm_cfg.py is always written; package managers should make sure the appropriate post-installation is done, and that mm_cfg.py is treated as a config file. This patch inadvertently fixes some bogus whitespace: 8-spaces where surrounding code used tabs. The difference was harmless because the 8-spaces were used inside shell-continued-oneliners, but it is confusing and could lead to future harm. I'm too tired to make those two or three changes in a separate checkin, sorry. This patch also assumes the various packages that are installed using distutils do not record (or rather, use) their installation paths anywhere, but this seems to hold true at least for the moment. Also, I've done so many slow cvs diff's, I'm wondering when we'll switch to Subversion. Unfortunately, I've also done so many 'cvs diff -c > file; patch -p0 -R < file's to switch back and forth between patches and change sets, I'm wondering when we'll switch to Aegis as well. :-P
* Restore the resumable pipeline code.bwarsaw2003-02-051-5/+11
| | | | | | | | | | | _dispose(): Set the msgdata's pipeline attribute to the pipeline list before calling _dopipeline(). If there's no more to do, delete this attribute. This way, if one of the modules throws an exception, we'll resume the next delivery attempt at that module. (E.g. if we unshunt it later). _dopipeline(): Add a bare except which pushes the failing module back on the front of the pipeline list, then re-raises the exception.
* do_command(): The __import__() can raise a ValueError too if the cmdbwarsaw2003-02-041-2/+3
| | | | has dots in it, so treat this the same as an ImportError.
* _oneloop(): Include a clue as to which filebase is being shunted.bwarsaw2002-12-131-0/+1
|
* Donn Cave's patch #602087 to honor configure's --srcdir switch.bwarsaw2002-12-121-1/+1
|
* _dispose(): Actually (re-)implement the documented behavior for whenbwarsaw2002-12-021-0/+5
| | | | autorespond_requests == 1, which means answer and discard.
* _dispose(): Don't forward to the admin, messages in which bouncingbwarsaw2002-12-021-1/+1
| | | | | addresses were found, but for which those addresses were not members. This is just annoying.
* Results.__init__(): Add a `respond' flag which is used bybwarsaw2002-11-211-1/+5
| | | | | | | | | send_response() to enable or suppress confirmation responses. For example, when confirming a subscription, if a welcome message is going to be sent out, we don't need to also send a results of the confirmation message. send_response(): Suppress the response if the `respond' flag is false.
* dequeue(): "rejection-notice" (i.e. the dash) doesn't play nice whenbwarsaw2002-11-191-0/+6
| | | | | | METADATA_FORMAT = METAFMT_ASCII. Because of patch #567288 by Maximillian Dornseif, we have to upgrade the schema of any metadata files (i.e. rejection-notice -> rejection_notice).
* Results.__init__(): Give default argument of an empty string whenbwarsaw2002-11-081-1/+1
| | | | | | | pulling the Subject out of the command message. That's so later (e.g. in cmd_confirm.py) we won't try to .lower() a None. Closes SF bug report # 620032 by Ron Jarrell.
* Style.bwarsaw2002-11-041-1/+1
|
* _dispose(): I think this fixes a bug we are seeing on mailman-users,bwarsaw2002-10-291-5/+10
| | | | | | | | | where if the list lock couldn't be obtained, we couldn't register the bounce and the message would get forwarded to the list owners. Instead, let's just requeue it and try again later. Note: untested! I'm checking this into cvs so I can test it on python.org... yes on a live system. ;/
* maybe_forward(): Add a useful URL as suggested by Fil.bwarsaw2002-10-251-0/+4
|
* send_response(): We have to pass the language into thebwarsaw2002-10-211-1/+2
| | | | UserNotification!
* maybe_forward(): Improve the grammatically anti-good message sent withbwarsaw2002-10-211-3/+3
| | | | | a forwarded bounce message. Complained upon by Daniel Buchmann, improved upon by Greg Ward. Further mungulated by Barry.
* prepare_message(): If the newsgroup is moderated, news_moderation is 1bwarsaw2002-10-191-1/+7
| | | | | | | or 2, and we remove any existing Approved header, replacing it for one of our own, pointing to the posting address. Also, a pychecker fix.
* pycheckerfiedbwarsaw2002-10-151-3/+3
|
* maybe_forward(): Use the new ForwardMessage() interface.bwarsaw2002-10-151-6/+4
|
* maybe_forward(): The bounce page documents that undetected bouncesbwarsaw2002-10-081-0/+2
| | | | | should go only to the list owners. I don't think the list moderators need to be bothered.
* maybe_forward(): Refactor forwarding logic into ForwardMessage()bwarsaw2002-10-081-13/+5
| | | | method on the MailList instance.
* _dispose(): Possibly forward the message in two situations: if thebwarsaw2002-10-051-16/+36
| | | | | | | | | message did not bounce match, or if no member addresses could be extracted from it. maybe_forward(): MIME Forward the given message to the list owner + list moderator, if bounce_unrecognized_goes_to_list_owner is true. Otherwise it discards the message. Write a log entry in either case.
* prepare_message(): In Python 2.2 and beyond,bwarsaw2002-08-161-1/+2
| | | | | | | | email.Iterators.body_line_iterator() will return a generator, which isn't len()'able directly, so we need to convert it to a list first, and then get the resulting len. Closes SF bug #593454.
* __oneloop(): Renamed to _oneloop() -- i.e. single leading underscore,bwarsaw2002-08-091-6/+6
| | | | so that it can be overridden in derived classes.
* intermediatebwarsaw2002-08-091-0/+184
|
* Make Pychecker happy and do some whitespace normalization.bwarsaw2002-08-081-2/+2
|
* Allow postings gatewayed to Usenet to inhibit the Subject: fieldbwarsaw2002-07-311-0/+6
| | | | | | | | | munging, separate from the mail list. This actually restores the original Subject: field which is stashed away in the metadata when it's munged in CookHeaders. Closes SF patch #573508. prepare_message(): Restore the original Subject: header if news_prefix_subject_too is false.
* _dispose(): Two fixes, related to Daniel Buchmann's report about SFbwarsaw2002-07-251-13/+17
| | | | | | | | | | | bug # 571634. First, catch any ValueError coming from the mktime_tz() call to calculate wildely out of date Date: headers. If we get the ValueError it's likely because the year is insane <wink> and the Date: should be clobbered. The second fix narrows the region where the list gets locked to just the .ArchiveMail() and .Save() calls. No wonder Daniel was getting AlreadyLockedErrors here -- this was clearly broken.
* make_response() -> send_response()bwarsaw2002-05-281-5/+15
| | | | | | send_response(): Check whether the sender has reached their autoresponse limit before sending the results of the command. This may not be the right time to do that check.
* _get_pipeline(): We don't need to send virgin messages through thebwarsaw2002-05-221-1/+1
| | | | Replybot.
* _dispose(): Send the message through the Replybot handler so -requestbwarsaw2002-05-221-3/+6
| | | | emails will be autoresponded. Closes bug #558909.
* _dispose(): Inhibit replybot when Precedence: is any of bulk, junk, orbwarsaw2002-05-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | list. Chuq gives us the relevant info from the sendmail docs: When the name is found in a "Precedence:" field, the message class is set to num. Higher numbers mean higher precedence. Numbers less than zero have the special property that if an error occurs during pro- cessing the body of the message will not be returned; this is expected to be used for "bulk" mail such as through mailing lists. The default precedence is zero. For example, our list of precedences is: Pfirst-class=0 Pspecial-delivery=100 Plist=-30 Pbulk=-60 Pjunk=-100 People writing mailing list exploders are encouraged to use "Precedence: list". Older versions of sendmail (which discarded all error returns for negative prece- dences) didn't recognize this name, giving it a default precedence of zero. This allows list main- tainers to see error returns on both old and new ver- sions of sendmail.
* process(), _dispose(): Where we were testing Precedence: againstbwarsaw2002-05-191-2/+3
| | | | "bulk", we now include "junk" and "list" as well.
* _dispose(): Ignore messages that have "Precedence: bulk" but don'tbwarsaw2002-05-171-0/+9
| | | | have "X-Ack: yes".
* _dispose(): Keep a flag around that indicates whether any of thebwarsaw2002-05-091-8/+20
| | | | | | addresses sucked out of the bounce message actually matched a member of any mailing list. If not, we still don't forward it, but we do log this situation.