Arnt Gulbrandsen [Fri, 31 Oct 2008 12:28:43 +0000 (13:28 +0100)]
leave out some debug logging we don't really need any more.
leave some, which seems like it might come in useful.
Arnt Gulbrandsen [Tue, 21 Oct 2008 10:09:22 +0000 (12:09 +0200)]
some trawler tried to login as "" on one of the open servers just now, and
didn't get the response he should.
for a moment I thought we might have a security problems, but no such
luck. all this change does is ensure that the trawler gets a "login
refused" next time, as opposed to getting a long good silence.
Abhijit Menon-Sen [Fri, 31 Oct 2008 12:52:44 +0000 (18:22 +0530)]
Update VERSION.
Arnt Gulbrandsen [Fri, 31 Oct 2008 12:20:35 +0000 (13:20 +0100)]
remove the debug logging we don't need any more
Arnt Gulbrandsen [Fri, 31 Oct 2008 10:43:17 +0000 (11:43 +0100)]
make sure that unsent meaningless messages cannot clutter up the queue
also more logging. this logging has to die before release.
Arnt Gulbrandsen [Thu, 30 Oct 2008 15:35:18 +0000 (16:35 +0100)]
add some temporary logging to help us find out exactly what we tell tb
Arnt Gulbrandsen [Fri, 31 Oct 2008 11:46:25 +0000 (12:46 +0100)]
appending an int to a string will work, but not work
I already wanted to sweep the source for these, why didn't I do it?
this MessageCache should suck a lot less
Arnt Gulbrandsen [Thu, 30 Oct 2008 14:02:33 +0000 (15:02 +0100)]
if the sieve script in the db is bad, try to say something about why.
Arnt Gulbrandsen [Fri, 31 Oct 2008 10:47:40 +0000 (11:47 +0100)]
log the SMTP transaction ID explicitly when we assign it
Arnt Gulbrandsen [Mon, 27 Oct 2008 15:02:44 +0000 (16:02 +0100)]
support SORT=DISPLAYFROM
Arnt Gulbrandsen [Thu, 18 Sep 2008 13:44:08 +0000 (15:44 +0200)]
teach the selector how to search on many/all mailboxes at a time.
partly tested, not used.
aoxexport will use this in one of the next submits.
Arnt Gulbrandsen [Fri, 31 Oct 2008 09:51:07 +0000 (10:51 +0100)]
untypofy
Arnt Gulbrandsen [Fri, 31 Oct 2008 09:50:51 +0000 (10:50 +0100)]
cleaner
Arnt Gulbrandsen [Thu, 30 Oct 2008 15:12:42 +0000 (16:12 +0100)]
patriccia tree nodes, too, contain data that just isn't pointers
Arnt Gulbrandsen [Thu, 30 Oct 2008 15:06:09 +0000 (16:06 +0100)]
the MessageSet blocks are big and contain no pointers, to make the
Allocator's job easier.
Arnt Gulbrandsen [Thu, 30 Oct 2008 14:11:11 +0000 (15:11 +0100)]
tie the SMTP/LMTP id in the Received field to the log ID used
the tie isn't perfect, but it's good enough to be useful, I think.
Arnt Gulbrandsen [Thu, 30 Oct 2008 13:15:38 +0000 (14:15 +0100)]
largest() didn't work except for the first block. this should do.
Arnt Gulbrandsen [Thu, 30 Oct 2008 13:03:06 +0000 (14:03 +0100)]
remove() was moderately fucked. unfuck.
Arnt Gulbrandsen [Thu, 30 Oct 2008 12:28:45 +0000 (13:28 +0100)]
! oops
Arnt Gulbrandsen [Thu, 30 Oct 2008 12:20:16 +0000 (13:20 +0100)]
select the right log message
Arnt Gulbrandsen [Thu, 30 Oct 2008 12:20:05 +0000 (13:20 +0100)]
remove() now works
Arnt Gulbrandsen [Thu, 30 Oct 2008 12:11:09 +0000 (13:11 +0100)]
unfoo MessageSet::csl()
make remove() clean up empty blocks, so isEmpty() works and is fast
Arnt Gulbrandsen [Thu, 30 Oct 2008 11:30:35 +0000 (12:30 +0100)]
Rewrite MessageSet to improve some Os, particularly index() and value().
Remove MessageSet::where() and update callers.
Avoid calling MessageSet::add( 1, UINT_MAX ) since that now consumes lots
of RAM.
The new MessageSet uses a number of blocks, each containing one bit for
each number in the set. The memory usage is proportional to the number of
UIDs in the set, but tends to be low if the UIDs cluster together.
index() and value should be faster than they were, but can still use some
optimisation. but this works, so I submit it.
Arnt Gulbrandsen [Thu, 30 Oct 2008 11:29:01 +0000 (12:29 +0100)]
rename PatriciaTree::Node::payload to data, to match List::Node
print *anyIterator.cur.data will print the thing pointed to
Arnt Gulbrandsen [Thu, 30 Oct 2008 11:27:37 +0000 (12:27 +0100)]
give PatriciaTree (and thus Dict and Map) first() and last().
I'm not sure these match the List equivalents, but they do what we want
them to do, so they'll do for now. maybe List should change to match this.
Arnt Gulbrandsen [Wed, 29 Oct 2008 13:10:01 +0000 (14:10 +0100)]
no comment.
Arnt Gulbrandsen [Wed, 29 Oct 2008 11:38:35 +0000 (12:38 +0100)]
try to tell the allocator that everything in the Node may be a pointer.
there's a commented-out line that we can try if this one works well.
Arnt Gulbrandsen [Wed, 29 Oct 2008 09:44:00 +0000 (10:44 +0100)]
simplify some code
give the Node constructor a line so we have somewhere to break
Arnt Gulbrandsen [Tue, 28 Oct 2008 14:31:59 +0000 (15:31 +0100)]
make Query::bind( const MessageSet & s ) O( s.count() ).
this fixes half of tb's performance problem. the other half requires some
really clever hacking in ImapResponse or MessageSet, so we can convert
lots of UIDs to MSNs cleverly.
Arnt Gulbrandsen [Tue, 28 Oct 2008 14:08:27 +0000 (15:08 +0100)]
do not free memory we might want to use.
I love GC and wished we could use it even in the Allocator.
Arnt Gulbrandsen [Tue, 28 Oct 2008 13:42:34 +0000 (14:42 +0100)]
try to optimise Query::bind( List<uint> ) a little.
I saw it take a whole minute earlier today. oh no.
Arnt Gulbrandsen [Tue, 28 Oct 2008 12:20:25 +0000 (13:20 +0100)]
kalyani's g++ doesn't like patriciatree... see if this makes it work.
Arnt Gulbrandsen [Mon, 13 Oct 2008 12:35:40 +0000 (14:35 +0200)]
yank the query timeout down to 10 again.
I changed it to 1000 while valgrinding. I think we need a better solution
for valgrinding.
Abhijit Menon-Sen [Sun, 24 Aug 2008 08:40:04 +0000 (14:10 +0530)]
Log backend pid at debug.
Abhijit Menon-Sen [Wed, 22 Oct 2008 10:24:08 +0000 (15:54 +0530)]
UseLdaPAuthentication is misspelled and unused.
Arnt Gulbrandsen [Wed, 22 Oct 2008 10:24:57 +0000 (12:24 +0200)]
update callers to use the new function names introduced in the last two
commits.
Arnt Gulbrandsen [Wed, 22 Oct 2008 10:24:28 +0000 (12:24 +0200)]
rename *::take() to remove(), so we only have one function name to remove
things from data structures.
Arnt Gulbrandsen [Wed, 22 Oct 2008 10:23:20 +0000 (12:23 +0200)]
rename String::encode() and decode() to encoded() and decoded()
teach eQP() to OPTIONALLY defend against ^From and ^--, and use a hack in
encoded() to use the right form of eQP()
Arnt Gulbrandsen [Thu, 16 Oct 2008 10:03:01 +0000 (12:03 +0200)]
enough friendly frienship to satisfy lochnagar's g++
Arnt Gulbrandsen [Thu, 9 Oct 2008 13:38:04 +0000 (15:38 +0200)]
base Dict on PatriciaTree
remove keys(), change all callers to use Dict::Iterator
misc other changes to callers
Arnt Gulbrandsen [Thu, 9 Oct 2008 11:52:33 +0000 (13:52 +0200)]
clarify doc
Arnt Gulbrandsen [Thu, 9 Oct 2008 10:59:04 +0000 (12:59 +0200)]
add a Patricia tree and base Map on it instead of on an n-level m-way tree.
Abhijit Menon-Sen [Fri, 31 Oct 2008 05:30:25 +0000 (11:00 +0530)]
Minor logic error in addressPermitted().
Abhijit Menon-Sen [Fri, 31 Oct 2008 09:11:16 +0000 (14:41 +0530)]
Retain a different log() object for the ByteForwarder.
Abhijit Menon-Sen [Fri, 31 Oct 2008 09:08:58 +0000 (14:38 +0530)]
Revert the ByteForwarder logging changes meant only for debugging.
Abhijit Menon-Sen [Thu, 30 Oct 2008 15:03:50 +0000 (20:33 +0530)]
Don't spam the logs unnecessarily at info.
Arnt Gulbrandsen [Wed, 29 Oct 2008 12:13:45 +0000 (13:13 +0100)]
*OUCH* flush even if we don't have anything to write NOW
we might have written something earlier, that we want cryptlib to flush.
also log the exact error message as info, not error, since it isn't
necessarily an error. most commonly it's just a timeout.
Arnt Gulbrandsen [Wed, 29 Oct 2008 11:36:37 +0000 (12:36 +0100)]
a faster, simpler Flag::allFlags
Arnt Gulbrandsen [Wed, 29 Oct 2008 11:05:54 +0000 (12:05 +0100)]
logging the cryptlib error only when everything's okay makes little sense.
I think that was what the code did. so let's try it differently.
Arnt Gulbrandsen [Wed, 29 Oct 2008 10:32:01 +0000 (11:32 +0100)]
double the speed of large fetches ;)
computing the MSN can be slooow, and we don't need it here.
Arnt Gulbrandsen [Tue, 28 Oct 2008 12:55:47 +0000 (13:55 +0100)]
let's see if modseq can still be zero after this
Arnt Gulbrandsen [Tue, 28 Oct 2008 12:50:34 +0000 (13:50 +0100)]
compile, dammit!
Arnt Gulbrandsen [Tue, 28 Oct 2008 12:49:14 +0000 (13:49 +0100)]
support rcpt to: <user@example.org.>
and give better errors anyway. I didn't understand the problem.
Arnt Gulbrandsen [Tue, 28 Oct 2008 11:45:39 +0000 (12:45 +0100)]
the byteforwarder logs should be children of the connection that uses them
Arnt Gulbrandsen [Tue, 28 Oct 2008 11:42:49 +0000 (12:42 +0100)]
log more usefully in the byte forwarded.
come to think of it, bf could do even better. much better.
Arnt Gulbrandsen [Thu, 23 Oct 2008 13:57:10 +0000 (15:57 +0200)]
5258 changed the capability name from the draft
needs to go into the bugfix releases
Arnt Gulbrandsen [Tue, 21 Oct 2008 08:10:14 +0000 (10:10 +0200)]
fetching the database ID is cheap if we're querying anyway, and we
sometimes/often want it, so just fetch it.
Arnt Gulbrandsen [Fri, 17 Oct 2008 11:43:13 +0000 (13:43 +0200)]
we do not reveal where a logged-in user sits.
we do reveal that to the administrator (in the connections table and the
logfile), but revealing it to correspondents (in the Received field) is
unwarranted.
I just realised that I sometimes don't know people to know where I am.
Arnt Gulbrandsen [Mon, 20 Oct 2008 15:05:19 +0000 (17:05 +0200)]
emit the right kind of boundary line for zero-part multipart messages
I don't entirely like this diff... it smells too much of a clever
programmer.
Arnt Gulbrandsen [Mon, 20 Oct 2008 14:50:54 +0000 (16:50 +0200)]
handle zero-line COPY statements
(without this, zero-bodypart multipart messages cannot be injected)
Arnt Gulbrandsen [Mon, 20 Oct 2008 07:57:18 +0000 (09:57 +0200)]
don't segfault, even if a client closes the connection at the worst
possible time.
Arnt Gulbrandsen [Thu, 16 Oct 2008 10:09:26 +0000 (12:09 +0200)]
wait for the banner before sending EHLO
should satisfy exim when smtp_enforce_sync is on.
Abhijit Menon-Sen [Tue, 14 Oct 2008 11:04:56 +0000 (16:34 +0530)]
Remove tried_at.
Abhijit Menon-Sen [Tue, 14 Oct 2008 04:47:46 +0000 (10:17 +0530)]
Update version.
Arnt Gulbrandsen [Mon, 13 Oct 2008 11:23:37 +0000 (13:23 +0200)]
subtransaction errors aren't.
subtransactions fail all the time and all that happens is that we ROLLBACK
TO SAVEPOINT and go on from there. no sense in logging an error.
Abhijit Menon-Sen [Mon, 13 Oct 2008 12:34:09 +0000 (18:04 +0530)]
Revert "send NIL for message data we don't have" and friends.
Arnt Gulbrandsen [Thu, 2 Oct 2008 19:27:16 +0000 (21:27 +0200)]
don't eat quite so much CPU updating unchanged mailboxes.
two more changes for the future:
1. use the mailboxes.change number suggested in the source
2. use a patricia tree based on full name instead of the child/sibling
structure (which melts down when a single mailbox has tens of thousands
of direct children).
Arnt Gulbrandsen [Mon, 29 Sep 2008 13:09:27 +0000 (15:09 +0200)]
don't run more than one mailboxreader per 2-3 second period, and don't run
more than one at a time.
if the mailboxreader is clogging up pgsql, this should help greatly.
http://archives.oryx.com/archives/mailstore-users/2342/thread
Arnt Gulbrandsen [Mon, 22 Sep 2008 19:39:10 +0000 (21:39 +0200)]
compile
Arnt Gulbrandsen [Mon, 22 Sep 2008 19:29:56 +0000 (21:29 +0200)]
don't bother updating the mailbox tree if we're shutting down already.
untested.
Arnt Gulbrandsen [Fri, 10 Oct 2008 12:30:46 +0000 (14:30 +0200)]
fix selecting newly created views.
not one, but several typos prevented selecting a newly created view from
working. also some generic cleanup, done while I was digging around in the
code. maybe some of it is unnecessary or irrelevant, I didn't check.
Arnt Gulbrandsen [Fri, 10 Oct 2008 09:04:08 +0000 (11:04 +0200)]
aox show search address asdf@asdf did not produce the right result. fix.
three changes:
1. the parser produced a suboptimal tree.
2. the display logic didn't work for Or.
3. added command line option -s to show the SQL as well, since I needed
that to verify that the search was correct. undocumented for now, since
it's a little shady.
Arnt Gulbrandsen [Thu, 9 Oct 2008 14:00:16 +0000 (16:00 +0200)]
make tests for absent header fields work
ie. 'messages which do not have header field x'
Arnt Gulbrandsen [Fri, 3 Oct 2008 06:26:07 +0000 (08:26 +0200)]
allow upper case in aox add user etc.
Arnt Gulbrandsen [Wed, 1 Oct 2008 19:37:03 +0000 (21:37 +0200)]
the dm_mm index may exist already when upgrade schema is run.
I chose to do it this way (create unless exists) because the three
alternatives seemed worse:
- requiring aox tune database after upgrade schema would suck
- automatically tuning would require that we store the desired tuning,
which makes it hard for people to tune by hand
- we could support hand-tuning if we tried to classify the running
database at upgrade schema time and adjusted the tuning in about the
right way, but that task is MUCH too vague for me
Arnt Gulbrandsen [Wed, 1 Oct 2008 08:39:56 +0000 (10:39 +0200)]
only unblock imap commands if what we did (might) make a difference
this unfucks select, which is really rather fucked all by itself, but not
so much that we can permit it to be broken.
Arnt Gulbrandsen [Tue, 30 Sep 2008 12:42:33 +0000 (14:42 +0200)]
detect whether the message is there, take 5,
test for header fields if we know those. test for bodies if we know those.
one or the other has to hit in every important case.
Arnt Gulbrandsen [Tue, 30 Sep 2008 12:37:53 +0000 (14:37 +0200)]
take 4, or so. if the header contains NO fields, then the message isn't
there.
just looking for From wasn't enough, since we may have retrieved
header_fields rows but not address_fields ones. This test should be... no,
it shouldn't be better. We might have retrieved bodyparys, but nothing
else.
OK, take 5 coming.
Arnt Gulbrandsen [Tue, 30 Sep 2008 12:36:48 +0000 (14:36 +0200)]
oops. just oops.
Arnt Gulbrandsen [Tue, 30 Sep 2008 09:39:27 +0000 (11:39 +0200)]
best to make one delivery attempt after expired_at, just in case expired_at
passed while the server was down and the admin was fixing something.
Arnt Gulbrandsen [Mon, 29 Sep 2008 13:22:55 +0000 (15:22 +0200)]
keep sessions half-alive until the end of the commands that use them.
this will not lead to bad IMAP, because ImapSession checks the active
Session before sending the response. the only effect is that commands are
permitted to run to completion more often, e.g. when someone sends FETCH
and immediately LOGOUT.
Arnt Gulbrandsen [Fri, 26 Sep 2008 16:11:25 +0000 (18:11 +0200)]
move OK [CLOSED] to where it'll be sent whenever needed
Arnt Gulbrandsen [Fri, 26 Sep 2008 15:06:23 +0000 (17:06 +0200)]
we can send NIL for a message's various bits if the message has no From.
all unexpunged messages have From.
Arnt Gulbrandsen [Fri, 26 Sep 2008 14:53:40 +0000 (16:53 +0200)]
a better try at sending NIL at just the right times; still not quite good
enough.
Arnt Gulbrandsen [Fri, 26 Sep 2008 14:39:03 +0000 (16:39 +0200)]
if we expunge a message, then we won't be able to emit any news about its
possible recent flag changes.
Arnt Gulbrandsen [Fri, 26 Sep 2008 14:04:03 +0000 (16:04 +0200)]
oops, a syntax bug
Arnt Gulbrandsen [Fri, 26 Sep 2008 13:59:10 +0000 (15:59 +0200)]
doc update
Arnt Gulbrandsen [Fri, 26 Sep 2008 13:57:52 +0000 (15:57 +0200)]
a sprinking of paranoia
Arnt Gulbrandsen [Fri, 26 Sep 2008 13:42:34 +0000 (15:42 +0200)]
send the (modseq) appendage on the SEARCH response if so directed.
accidentally broke this week.
Arnt Gulbrandsen [Fri, 26 Sep 2008 13:29:04 +0000 (15:29 +0200)]
exists/recent/uidnext responses are like all others: once sent they've
been sent.
this fixes an actual bug in my 1200-line diff from last friday. oh no.
Arnt Gulbrandsen [Fri, 26 Sep 2008 13:15:20 +0000 (15:15 +0200)]
teach pop select to work without Session::refresh().
Arnt Gulbrandsen [Fri, 26 Sep 2008 12:37:56 +0000 (14:37 +0200)]
that's rather unusual code, needs to be explained
Arnt Gulbrandsen [Fri, 26 Sep 2008 12:29:58 +0000 (14:29 +0200)]
Unbreak select, which was moderately broken.
Select used to depend on various moderate breakage in session. session now
uses a new saner approach to sending responses, which apparently took
select by surprise.
In detail:
1. Remove Session::refresh(). Session::emitUpdates() now calls
IMAP::runCommands(), so refresh() makes no sense for IMAP. (This might
cause some breakage for POP though, when a nonempty mailbox is opened,
we'll have to look at that.)
2. Remove callers to refresh(), including Select, which happily no longer
needed to call it at all, thanks to ImapResponse.
3. Remove some dead code in select.cpp.
Arnt Gulbrandsen [Fri, 26 Sep 2008 08:47:07 +0000 (10:47 +0200)]
send NIL for message data we don't have
this is kind of dubious, but I think it's OK. dovecot and cyrus do it, so
who cares about the RFC? ;)
Arnt Gulbrandsen [Fri, 26 Sep 2008 08:31:06 +0000 (10:31 +0200)]
a one-day timeout for idle, instead of half an hour or three hours.
outlook remains broken. any timeout shorter than the interval between two
incoming messages will cause breakage with outlook, and a three-hour lull
is easily conceivable.
a 24-hour timeout still lets us flush brokenly broken connections.
Arnt Gulbrandsen [Thu, 25 Sep 2008 11:05:37 +0000 (13:05 +0200)]
another try: make sure DA doesn't lose its space in the SC queue as long
as it's in the SM list.
the previous try recursed, this one should not.
Arnt Gulbrandsen [Wed, 24 Sep 2008 14:05:01 +0000 (16:05 +0200)]
log more.
logging is good.
Arnt Gulbrandsen [Wed, 24 Sep 2008 12:58:45 +0000 (14:58 +0200)]
try to send responses when we have some, just in case we're in idle mode
Arnt Gulbrandsen [Wed, 24 Sep 2008 12:43:30 +0000 (14:43 +0200)]
keep mail spooled for delivery for two weeks rather than two days.
Arnt Gulbrandsen [Wed, 24 Sep 2008 12:18:38 +0000 (14:18 +0200)]
record the software version in Received, since other software does.