summaryrefslogtreecommitdiff
path: root/Mailman/OutgoingQueue.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* With the new message delivery architecture, OutgoingQueue.py is nobwarsaw2000-03-211-198/+0
| | | | longer necessary.
* Move the locking stuff from here to cron/run_queue. This way, I canbwarsaw1999-07-071-16/+4
| | | | | wrap the body of the code in a try/finally so the lock is definitely released should something bad happen.
* processQueue(): Catch and log problems with corrupt/inaccessible queuehmeland1999-07-011-4/+26
| | | | | | files. This fixes a problem where one old, invalid queue file would always cause the queue runner to abort before the newer, possibly valid queue files were processed.
* processQueue(): crank the hung_timeout on the lock to a hugely longbwarsaw1999-02-271-2/+11
| | | | | | | | amount of time (4 hours). This should eliminate most errors reported on the unlink() in dequeueMessage. dequeueMessage(): Ignore ENOENT errors -- they probably mean the lock was stolen.
* processQueue(): We can pretty much guarantee that if an os.error isbwarsaw1999-01-051-7/+2
| | | | | | raised from the os.stat() call, the value will unpack into a two-tuple. So just do the unpacking in place, check the code and use Utils.reraise() if it wasn't what we expected.
* Be sure we import the latest version of tempfile.py from the Pythonbwarsaw1998-12-291-8/+13
| | | | | | 1.5.2 distribution, so that names are uniquely generated in fork() related children. Use a simlar import/hasattr trick as when importing the latest smtplib.py
* Removed import of smtplib, since it isn't used in this file. Otherbwarsaw1998-12-221-14/+19
| | | | coding, comments, etc. formatting nits.
* code cleanup:cotton1998-11-101-10/+9
| | | | | | | | | enqueueMessage now uses Utils.open_ex to create queue files in "active" mode. This saves the process of determining a file's active vs deferred state the headache of looking at both the files size and mode. now it can just look at the mode, since files are created in the correct mode and not created then chmod'ed into the correct mode. scott
* Optimized and fixed run_queue so that when it callscotton1998-11-021-3/+4
| | | | | | | | isDeferred(q_entry) it passes in the stat info from the previous code, instead of stating the file twice. I had an active delivery complete today between when run_queue checks to see if the file exists with os.stat and when it calls isDeferred. scott
* more stress tests of the queue!cotton1998-10-131-4/+10
| | | | | | | | | | | | | | | | | bugfixes: 1) forgot to put import errno in previous checkin. 2) tempfile.mktemp() didn't suffice for creating unique filenames with lots of concurrent processes going on, so i made it set tempfile.template with the current pid in it. this has been tested with multiple concurrent contact_transport processes together with a run_queue process -- with and without smtpd listening on mailman's SMTPHOST. the version of OutgoingQueue prior to these two checkins ran for about a week on linux and Solaris without problem. when these problems did creep up, they were harmless. they *could* have caused failed deliveries, but it would be pretty darn unlikely. scott
* a little stress testing revealed a bug in OutgoingQueue: the processQueuecotton1998-10-131-1/+18
| | | | | | | | | procedure assumed that files existed that it had recently found in the directory listing, but they may have been dequeued by another process between the time when the directory was listed and when processQueue stats the file. the fix is just to try: it and continue iff the file doesn't exist. scott
* Updated comment, replaced "sticky bit" with "SUID bit". no code changescotton1998-10-131-1/+3
| | | | scott
* some of the comments were out of sync with code, so i updated thecotton1998-10-061-8/+10
| | | | | comments (no code changes) scott
* changed contact_transport so that it doesn't invoke a queue runcotton1998-10-051-10/+109
| | | | | | | | | | | | | ditto for Utils.SendTextToUser. rearranged OutgoingQueue so that 1) it sets a global lock to only allow on queue run at a time 2) enqueueMessage puts a queue entry in an active state 2) the queue run only processes messages in a deferred state or messages that are in an active state but stale 3) it has a deferMessage interface. which is now used by Utils.TrySMTPDelivery It now keeps track of the state of a q entry by means of file metadata - if the qfile is setuid, it's in active state, if it's not it's in deferred state. scott
* Whoops, there was another call to smtplib that needed the indirection.viega1998-07-201-3/+0
|
* Wrapped the call to smtplib with some queueing code.viega1998-07-201-0/+51
There's a new crontab entry that checks the queue once every 30 mins.