Abhijit Menon-Sen [Wed, 10 Mar 2010 12:17:56 +0000 (17:47 +0530)]
s/11/10/
Abhijit Menon-Sen [Wed, 10 Mar 2010 12:06:43 +0000 (17:36 +0530)]
Merge branch 'master' of ssh://strange/home/git/aox
Arnt Gulbrandsen [Wed, 10 Mar 2010 11:10:32 +0000 (12:10 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Wed, 10 Mar 2010 11:10:19 +0000 (12:10 +0100)]
speling
Arnt Gulbrandsen [Wed, 10 Mar 2010 11:09:10 +0000 (12:09 +0100)]
pg 8.1 does not have xact_start
Abhijit Menon-Sen [Wed, 10 Mar 2010 06:20:07 +0000 (11:50 +0530)]
Update release date
Arnt Gulbrandsen [Mon, 8 Mar 2010 17:29:05 +0000 (18:29 +0100)]
accept subaddresses properly even with the magic separator
Arnt Gulbrandsen [Mon, 8 Mar 2010 14:09:09 +0000 (15:09 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Mon, 8 Mar 2010 14:05:13 +0000 (15:05 +0100)]
make check-sender-address remove/change bad addresses
telling smtp/submit clients "no" is not good; they generally can't fix
whatever is wrong, so we're better off doing our best on their behalf.
this change removes any bad addresses in from/resent-fron/return-path, and
if nothing's left, inserts uses the authenticated user's own address. the
old code would tell the smtp client "no, go fix it".
Arnt Gulbrandsen [Sun, 7 Mar 2010 16:54:38 +0000 (17:54 +0100)]
that was dead code, really: the maximum needed always overrode
so kill it
Arnt Gulbrandsen [Fri, 5 Mar 2010 15:09:26 +0000 (16:09 +0100)]
just prettier logging
Arnt Gulbrandsen [Fri, 5 Mar 2010 15:07:01 +0000 (16:07 +0100)]
handlesNeeded didn't shrink nicely. make it do so.
Arnt Gulbrandsen [Fri, 5 Mar 2010 15:06:22 +0000 (16:06 +0100)]
minimum and maximum were broken for timespans starting after max
Arnt Gulbrandsen [Fri, 5 Mar 2010 13:16:02 +0000 (14:16 +0100)]
and describe
Arnt Gulbrandsen [Fri, 5 Mar 2010 13:13:17 +0000 (14:13 +0100)]
add the keywords from RFC 3848 to the Received
reveal even less about logged-in users
Arnt Gulbrandsen [Thu, 4 Mar 2010 17:44:25 +0000 (18:44 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Thu, 4 Mar 2010 17:44:18 +0000 (18:44 +0100)]
if the transaction is rolled back, we have to say NO...
Arnt Gulbrandsen [Thu, 4 Mar 2010 17:38:46 +0000 (18:38 +0100)]
fix transaction idleness timeout
the old code was called only if !usable(), and a transaction can be usable
even if its last query was in a transaction. this code is called anyway.
also, change the timeout so that a transaction can be Failed for only five
seconds, idle for up to 20. after 5 (or 20) seconds of complete inaction
it loses its database handle, boom.
Abhijit Menon-Sen [Thu, 4 Mar 2010 17:23:44 +0000 (22:53 +0530)]
udoc fix
Arnt Gulbrandsen [Thu, 4 Mar 2010 16:41:30 +0000 (17:41 +0100)]
we can't send rollback if we've SENT commit.
the previous test waited until commit was completely processed by the
server.
Arnt Gulbrandsen [Thu, 4 Mar 2010 16:26:39 +0000 (17:26 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Thu, 4 Mar 2010 16:25:27 +0000 (17:25 +0100)]
don't drop queued queries when we rollback()
it's just an optimisation and it shows up in a puzzling log excerpt. let's
just send them, have the server process them, and process the rollback.
simpler state machine.
Arnt Gulbrandsen [Wed, 3 Mar 2010 15:36:36 +0000 (16:36 +0100)]
make sure there always is a date on the autoreply
Arnt Gulbrandsen [Wed, 3 Mar 2010 13:11:27 +0000 (14:11 +0100)]
kill invalid errors-to and remove unnecessary ones
Arnt Gulbrandsen [Wed, 3 Mar 2010 13:10:02 +0000 (14:10 +0100)]
I typoed while splitting the previous commit in two. fix.
Arnt Gulbrandsen [Wed, 3 Mar 2010 12:40:13 +0000 (13:40 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Wed, 3 Mar 2010 12:40:07 +0000 (13:40 +0100)]
sending vacation notices to postmaster? no...
Arnt Gulbrandsen [Wed, 3 Mar 2010 12:39:08 +0000 (13:39 +0100)]
Errors-To is used only for robot/list mail (says my archive)
Arnt Gulbrandsen [Mon, 1 Mar 2010 19:07:47 +0000 (20:07 +0100)]
magic
Arnt Gulbrandsen [Mon, 1 Mar 2010 17:13:53 +0000 (18:13 +0100)]
select() returns 0, so taken teh hint
Arnt Gulbrandsen [Mon, 1 Mar 2010 16:48:25 +0000 (17:48 +0100)]
cleanliness, in an attempt to kill possible select() loops
- only ever read() when we select()
- ask select() for read-ability if we will read
- base all decisions on select(), none on errno
I'm not sure there was a loop in this select. all I know is that there was
a loop involving high load, and this loop seemed like a likely suspect.
Arnt Gulbrandsen [Mon, 1 Mar 2010 14:30:26 +0000 (15:30 +0100)]
check whether to go away regularly, not just once
Arnt Gulbrandsen [Mon, 1 Mar 2010 14:26:51 +0000 (15:26 +0100)]
clean up the addresses table only on explicit request (-a)
this lessens the risk of colliding with pg_dump greatly
Arnt Gulbrandsen [Fri, 26 Feb 2010 12:55:21 +0000 (13:55 +0100)]
rollback ALL transactions in case of an IMAP error
this is significant, because an IMAP client causes an error if it closes
the connection abruptly. any active transactions will be rolled back at
that point.
Arnt Gulbrandsen [Fri, 26 Feb 2010 12:30:01 +0000 (13:30 +0100)]
active commands have caused too much pain and too many crashes
Arnt Gulbrandsen [Fri, 26 Feb 2010 12:24:27 +0000 (13:24 +0100)]
if a command has a session when it starts executing, use that all the time
Arnt Gulbrandsen [Thu, 25 Feb 2010 15:09:07 +0000 (16:09 +0100)]
basically wording
Arnt Gulbrandsen [Thu, 25 Feb 2010 14:21:36 +0000 (15:21 +0100)]
try to lock who holds locks if we need them and can't get them in 20s
Arnt Gulbrandsen [Thu, 25 Feb 2010 12:46:56 +0000 (13:46 +0100)]
Closing means: we want to write, then close
if we don't have to write, we'll select for the ability anyway,
so we'll close at once when that's suitable
Arnt Gulbrandsen [Thu, 25 Feb 2010 12:08:40 +0000 (13:08 +0100)]
make logout close the connection after one second
not much more, and not much less either. and don't bother trying to defeat
NAT before logon.
Arnt Gulbrandsen [Thu, 25 Feb 2010 09:53:39 +0000 (10:53 +0100)]
try a little harder to close
Arnt Gulbrandsen [Wed, 24 Feb 2010 16:45:07 +0000 (17:45 +0100)]
nothing much. read the next diff instead.
Arnt Gulbrandsen [Wed, 24 Feb 2010 15:00:25 +0000 (16:00 +0100)]
comment
Arnt Gulbrandsen [Wed, 24 Feb 2010 14:46:24 +0000 (15:46 +0100)]
that line made aox restart barf too much
Arnt Gulbrandsen [Wed, 24 Feb 2010 14:43:59 +0000 (15:43 +0100)]
simplify the code
ask select for 'read' always, always, always, so we won't loop, loop, loop.
and just in case we loop, use a .2-second timeout.
Arnt Gulbrandsen [Wed, 24 Feb 2010 13:26:32 +0000 (14:26 +0100)]
type
Arnt Gulbrandsen [Wed, 24 Feb 2010 12:53:55 +0000 (13:53 +0100)]
if all clients go away sooner than three hours, so can the server
Arnt Gulbrandsen [Wed, 24 Feb 2010 11:55:59 +0000 (12:55 +0100)]
gentle shutdown/restart.
aox restart makes the server stop listening at once, but allows existing
connections to function for up to three more hours. ten seconds before the
time is up, the db handles are closed, so no more work is possible (e.g.
imap commands will be accepted, but not processed).
Arnt Gulbrandsen [Wed, 24 Feb 2010 11:35:02 +0000 (12:35 +0100)]
get rid of Query::allowSlowness() entirely
we weren't using it
its disappearance simplifies Postgres
Arnt Gulbrandsen [Wed, 24 Feb 2010 11:13:41 +0000 (12:13 +0100)]
allow transactions to be slow
warn, but don't abort them
aborting suffered from (what seems to be) load- or pgdump-related
timeouts, it seems better to just press on
slow standalone queries will still time out, which is probably the right
thing, since we may have timing requirements acting as a server
Arnt Gulbrandsen [Wed, 24 Feb 2010 11:10:40 +0000 (12:10 +0100)]
a little more debugging
Arnt Gulbrandsen [Wed, 24 Feb 2010 10:55:49 +0000 (11:55 +0100)]
remove all errno references from Buffer
detect that the client went away ONLY in EventLoop; there was enough
code there already, so the code in Buffer was superfluous
adapt EventLoop, Connection and others to the smaller Buffer API
Abhijit Menon-Sen [Tue, 23 Feb 2010 14:41:04 +0000 (20:11 +0530)]
This is really 92.
Arnt Gulbrandsen [Tue, 23 Feb 2010 14:31:00 +0000 (15:31 +0100)]
fix obviously bad logic
Arnt Gulbrandsen [Tue, 23 Feb 2010 14:30:43 +0000 (15:30 +0100)]
that timeout might be misunderstood
Arnt Gulbrandsen [Tue, 23 Feb 2010 13:45:33 +0000 (14:45 +0100)]
the fetcher's queries can be slow. cope.
Arnt Gulbrandsen [Tue, 23 Feb 2010 13:22:54 +0000 (14:22 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Tue, 23 Feb 2010 13:22:12 +0000 (14:22 +0100)]
we have to keep the transaction open
we may need to create subtransactions, so don't commit until we've
done all of that
Arnt Gulbrandsen [Tue, 23 Feb 2010 13:06:19 +0000 (14:06 +0100)]
better code
Arnt Gulbrandsen [Tue, 23 Feb 2010 13:05:51 +0000 (14:05 +0100)]
get rid of Re: in the subject of autoresponses
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:45:32 +0000 (13:45 +0100)]
send supplemental LISTENs... but not necessarily at once
in practice I don't think we have supplemental LISTENs. but if we do, then
we need to send them after choosing a listener. this code ensures that the
next time we try to use the listener, we'll send the additional LISTEN.
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:14:42 +0000 (13:14 +0100)]
forgot to commit
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:13:40 +0000 (13:13 +0100)]
obscenity
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:13:22 +0000 (13:13 +0100)]
forgot to commit
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:10:03 +0000 (13:10 +0100)]
remove a line of dead code
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:09:13 +0000 (13:09 +0100)]
log it when we start work on a transaction
this is debug logging and I'm curious to see whether it will appear
for the LISTENs
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:08:23 +0000 (13:08 +0100)]
the server shouldn't shut down just because this transaction times out
so test for whether this _is_ the startup, not for being in a transaction
Arnt Gulbrandsen [Tue, 23 Feb 2010 11:52:21 +0000 (12:52 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Tue, 23 Feb 2010 11:51:58 +0000 (12:51 +0100)]
random simplification
unnecessary complexity often hides bugs
Arnt Gulbrandsen [Tue, 23 Feb 2010 11:51:12 +0000 (12:51 +0100)]
pick a better log ID for the new connection, if possible
Abhijit Menon-Sen [Tue, 23 Feb 2010 11:40:59 +0000 (17:10 +0530)]
Remove redundant backend number in messages
Arnt Gulbrandsen [Fri, 19 Feb 2010 15:23:18 +0000 (16:23 +0100)]
make move work
Arnt Gulbrandsen [Fri, 19 Feb 2010 14:51:32 +0000 (15:51 +0100)]
imap move. untested
Arnt Gulbrandsen [Fri, 19 Feb 2010 12:35:33 +0000 (13:35 +0100)]
try harder to avoid creating new db handles
Arnt Gulbrandsen [Fri, 19 Feb 2010 12:04:44 +0000 (13:04 +0100)]
create 3 connections at startup, and don't segfault if pg closes all
Arnt Gulbrandsen [Fri, 19 Feb 2010 11:51:23 +0000 (12:51 +0100)]
count db handles only when they've managed to log in.
as of this change, handlesNeeded() < handles->count() will no longer
consider handles that are in the process of connecting.
Arnt Gulbrandsen [Fri, 19 Feb 2010 11:38:09 +0000 (12:38 +0100)]
if connecting is really slow, we should still obey db-handle-interval
the removed code made us be slower still, which seems unwarranted
Arnt Gulbrandsen [Fri, 19 Feb 2010 11:28:27 +0000 (12:28 +0100)]
do not try to reissue queries when pg shuts down
it happens too seldom to test well, and is too difficult to get right
Arnt Gulbrandsen [Fri, 19 Feb 2010 11:24:54 +0000 (12:24 +0100)]
that code was too seldom-run and might be broken
Arnt Gulbrandsen [Fri, 19 Feb 2010 11:24:38 +0000 (12:24 +0100)]
pick a range, not 1024 random rows above a given ID
Arnt Gulbrandsen [Wed, 17 Feb 2010 12:24:31 +0000 (13:24 +0100)]
that debug logging is not needed
Arnt Gulbrandsen [Wed, 17 Feb 2010 12:05:59 +0000 (13:05 +0100)]
Transaction::commit() on a failed transaction leaves state
this is unfortunate. however, much code expects that done() && failed(),
so this is the best I can do.
Arnt Gulbrandsen [Wed, 17 Feb 2010 11:59:25 +0000 (12:59 +0100)]
no, done() cannot return false for failed, too much code breaks
Arnt Gulbrandsen [Wed, 17 Feb 2010 11:55:09 +0000 (12:55 +0100)]
a transaction isn't done merely because it's in a failed state
rollback() or restart() can be used to progress, and the postgresql server
know that.
Arnt Gulbrandsen [Wed, 17 Feb 2010 10:33:23 +0000 (11:33 +0100)]
try harder to get rid of idle transactions
also don't provoke misleading logging by calling rollback() on
transactions that are idle because they're done.
Arnt Gulbrandsen [Tue, 16 Feb 2010 15:20:28 +0000 (16:20 +0100)]
do not offer authentication for lmtp
Arnt Gulbrandsen [Tue, 16 Feb 2010 14:38:04 +0000 (15:38 +0100)]
use 117 seconds instead of 64 for the NAT defeater
117 is a little less than two minutes. NAT boxes that time out after less
than two minutes are just too broken to care about.
Arnt Gulbrandsen [Tue, 16 Feb 2010 14:36:49 +0000 (15:36 +0100)]
do not send a quick OK after IDLE, some clients quit idle mode
Arnt Gulbrandsen [Tue, 16 Feb 2010 11:02:16 +0000 (12:02 +0100)]
get rid of unnecessary Connection::write() calls
they SHOULD be unnecessary. if they're needed, there's a bug in EventLoop,
so we need to fix that, not scatter these across the code.
Arnt Gulbrandsen [Tue, 16 Feb 2010 11:01:42 +0000 (12:01 +0100)]
why didn't I comment this when I write it? I suck.
Arnt Gulbrandsen [Tue, 16 Feb 2010 08:46:31 +0000 (09:46 +0100)]
improve db timeout logic
the old logic was based on extendTimeout(), and would start with a
ten-second timeout and then add the db-handle-inteval to the timeout every
time it sent a query. that is, query number 5 would get 5*timeout+10
seconds to finish, minus whatever the first four needed (usually a second
or less in total).
this logic:
- a query that canBeSlow() receives db-handle-interval, but at least 60
seconds
- other queries receive db-handle-interval, but at most 10 seconds
- if a transaction is idle, not progressing, and we're using most/all
handles, we roll that transaction back after 20 seconds idleness
Arnt Gulbrandsen [Mon, 15 Feb 2010 14:27:00 +0000 (15:27 +0100)]
submit-copy-to-sender even for vacation mail
Arnt Gulbrandsen [Mon, 15 Feb 2010 13:47:58 +0000 (14:47 +0100)]
some people know c++, others do not
Arnt Gulbrandsen [Mon, 15 Feb 2010 13:36:36 +0000 (14:36 +0100)]
tweak f=f heuristic
Arnt Gulbrandsen [Mon, 15 Feb 2010 13:26:03 +0000 (14:26 +0100)]
prettier autoresponses
Arnt Gulbrandsen [Mon, 15 Feb 2010 13:25:52 +0000 (14:25 +0100)]
segfault in case of managesieve with some errors
Arnt Gulbrandsen [Mon, 15 Feb 2010 11:32:00 +0000 (12:32 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Mon, 15 Feb 2010 10:49:35 +0000 (11:49 +0100)]
try to cancel SEARCH-related queries, and only those, in case the client
goes away abruptly.
Arnt Gulbrandsen [Mon, 15 Feb 2010 10:48:42 +0000 (11:48 +0100)]
just get rid of Database::cancelQueries()
it doesn't do that much, and smells a little strange. I've looked
wonderingly at it too many times now.
Abhijit Menon-Sen [Wed, 10 Feb 2010 15:28:16 +0000 (20:58 +0530)]
Warn about use-{http,webmail,web-archive}=true