| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
longer necessary.
|
| |
|
|
|
| |
wrap the body of the code in a try/finally so the lock is definitely
released should something bad happen.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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
|
| |
|
|
| |
coding, comments, etc. formatting nits.
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
scott
|
| |
|
|
|
| |
comments (no code changes)
scott
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
|
|
There's a new crontab entry that checks the queue once every 30 mins.
|