| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
header.
|
| |
|
|
|
| |
unprocessed lines, check for line == None (can happen if the message
is sent to e.g. mylist-join with no body).
|
| |
|
|
| |
text/plain parts in the message.
|
| |
|
|
|
|
| |
failed, it might be because of a Re: prefix (or localized version
thereof). Pop off the first component of the args, use that as the
command and try again... once.
|
| |
|
|
|
| |
the site list to send the message. If there's no site list, you're in
heap big trouble.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
MailCommandHandler.py. Specific changes include:
class Results: Basically a bag to hold state during the processing of
a particular email message loaded with commands. This makes it easy
to pass data around (like the mailing list object and the message).
It also contains the results of the command processing and gloms up
the response email.
_dispose(): This method actually gets simplified because it just needs
to pass things to the Results instance and let it do the job of
processing the email commands.
|
| |
|
|
|
| |
msgdata's "recips" key to the list of recipients that were rejected,
otherwise lots of folks on the list will get duplicates!
|
| |
|
|
| |
sure why that is, but let's filter them out anyway.
|
| |
|
|
|
|
|
|
|
| |
delivery module (i.e. SMTPDirect) when it couldn't connect to the smtp
server. When this happens, log an error message, but only do it once
so we don't fill up logs/error with a message-per-second. We keep a
self.__logged flag which is set when we log the error and reset in the
class constructor, and when the process() function returned
successfully.
|
| |
|
|
|
| |
list's state via xlist.Load() -- conservative if the state hasn't
changed.
|
| |
|
|
| |
call mlist.Load() so we can be sure we've got the most current state.
|
| | |
|
| |
|
|
|
| |
list, call mlist.Load() so we can be sure we've got the most current
state.
|
| |
|
|
|
| |
additional indirection that's overridden by the BounceRunner.
Defaults to QRUNNER_SLEEP_TIME for backwards compatibility.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
perform better. In general there are two changes: 1) we never lock a
list until and unless absolutely necessary, 2) we only run the bounce
runner once every minute (as opposed to the normal runners'
once-per-second sleep time). Specifically,
SLEEPTIME: The base class now looks at this attribute to decide how
long to sleep between loop iterations, and it defines a default. We
override the bounce runner's value to lengthen the time it sleeps to 1
minute (we may eventually want to move this to Defaults.py).
__scanbounce(): Gone. All its functionality is subsumed in the new
ScanMessages() method and the new _dispose().
__verpbounce(): Renamed to the non-method verp_bounce(). Also, we rip
out the code that iterates through all the lists if the bounce came to
the site list's -bounces address.
_dispose(): Simply calls verp_bounce() to find bouncing addresses, and
if that returns a false value (empty list), calls ScanMessages() to
see if the bounce detector can find some bouncing addresses. If not,
we're done (after possibly forwarding the non-matching message).
Otherwise, we register the bounce either on the target mailing list,
or on all the mailing lists if this came to the site's -bounces
address.
|
| | |
|
| |
|
|
|
| |
ParseMailCommands() calls in this runner need to be wrapped around a
catch of TimeOutError.
|
| |
|
|
|
| |
acquisition of the shared pending.db database lock fails, we want to
requeue the message for another try later.
|
| |
|
|
| |
confirm mail script.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
_open_list() caches the MailList instances in a WeakValueDictionary
which don't contribute to the reference count, but ensure that each
runner will get one and only one copy of the MailList data.
This should help in the memory footprint of the runners, but I suspect
we may still be leaking something.
|
| |
|
|
|
|
| |
more conveniently use a class attribute to specify this. On the
BounceRunner, turn off MailList object caching so that it'll be more
friendly to long-term memory use.
|
| | |
|
| |
|
|
| |
we can unshunt it to the correct queue.
|
| |
|
|
|
| |
sending the unrecognized message on to the list owner. In either
case, write a log entry to logs/bounce.
|
| |
|
|
|
|
| |
try/except for IndexError. If the site admin's configured VERP_REGEXP
incorrectly, it's better to provide a more useful error message in
log/errors and ignore the bounce than to let a traceback percolate up.
|
| |
|
|
|
|
|
|
| |
extraction of the process() method into the constructor. I don't
think it's too much of a burden to have to restart the OutgoingRunner
if you want to change the DELIVERY_MODULE (and I suspect it won't
change that much anyway). This also seems to help control memory
growth in the OutgoingRunner.
|
| |
|
|
|
|
|
| |
specializing the queue directory, make QDIR a class attribute and have
Runner's ctor use that instead of an __init__() argument. This lets
us get rid of most of the __init__()'s in the derived classes.
(OutgoingRunner still needs one though.)
|
| |
|
|
| |
MailList object instead of instantiating one explicitly.
|
| |
|
|
|
|
|
|
| |
list that's already locked, e.g. the site list that we know we're
processing for! Bug reported by Dan Mick.
BAW: The loop in these two methods should really be factored out, but
there's a bit of an impedance mismatch for the inner logic.
|
| |
|
|
|
|
| |
plain text instead of msg.__str__(), otherwise we'll get the Unix
From_ header in the output, which will bollux up NNTP. Bug discovered
and fix verified by Ron Jarrell.
|
| |
|
|
|
|
|
|
|
| |
run(): After once through the loop, look at the freshen flag and if
true, clear the cache. Thus all subsequent MailList objects will get
updated state, but we'll gain the performance benefits of the cache
for each iteration the the big loop.
_open_list(): Return this function to its original state.
|
| |
|
|
|
| |
_open_list(): If we've pulled the list object from the cache, then
freshen the state by re-Load()-ing it.
|
| |
|
|
|
|
|
|
| |
class knows to reload the state when pulling the object from the
cache. Hmm, why do we even have a cache now?
_dispose(): Don't do the `verp' key calculation here; it's done
earlier and better in the ToOutgoing.py handler.
|
| |
|
|
| |
declared global.
|
| |
|
|
|
|
|
|
|
|
| |
MessageParseError during parsing of the message. Most likely cause is
because of bad MIME encapsulation. /That's/ likely caused by the
message being a virus <wink>.
Disposition depends on QRUNNER_SAVE_BAD_MESSAGES. When true, the
message text is saved in qfiles/bad. When false, it is discarded. We
always log the error.
|
| |
|
|
|
| |
not making it to the end of the try ought to be morally equivalent to
an aborted transaction.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
least one in the wild (reported by Dan Mick) that leaves the To:
header empty or useless, while the useful VERP'd bounce information
ends up in a Delivered-To: header.
Note that there can be multiple Delivered-To: headers so we need to
search them all (and we don't worry about false positives for
forwarded email, because only one should match VERP_REGEXP).
Also try Apparently-To: if neither of the others yields a hit.
|
| | |
|
| | |
|
| |
|
|
| |
VERP decoding. Use mm_cfg.VERP_REGEXP instead.
|
| | |
|
| |
|
|
| |
listname-bounces alias.
|
| |
|
|
|
| |
Consults VERP_DELIVERY_INTERVAL to decide whether to set the `verp'
metadata key.
|
| |
|
|
|
| |
this because I want to create a flow chart later to give a better
description of the details.
|
| |
|
|
|
|
|
|
|
|
|
| |
no longer handles any -admin or -owner messages, or any bounce
processing.
_dispose(): Don't look at the `authoritah' metadata key. Also, vastly
simplify the main switch because it only needs to look at torequest,
tojoin, and toleave.
_toadmins(): Removed as unnecessary.
|
| |
|
|
| |
equivalent to transaction aborts).
|
| |
|
|
| |
mailmanctl and qrunner.
|
| |
|
|
|
| |
NNTP_REMOVE_HEADERS and NNTP_REWRITE_DUPLICATE_HEADERS as a more
general approach.
|