aox:aox.git
12 years agos/11/10/ v3.1.3
Abhijit Menon-Sen [Wed, 10 Mar 2010 12:17:56 +0000 (17:47 +0530)]
s/11/10/

12 years agoMerge branch 'master' of ssh://strange/home/git/aox
Abhijit Menon-Sen [Wed, 10 Mar 2010 12:06:43 +0000 (17:36 +0530)]
Merge branch 'master' of ssh://strange/home/git/aox

12 years agoMerge branch 'master' of ssh://strange.aox.org/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

12 years agospeling
Arnt Gulbrandsen [Wed, 10 Mar 2010 11:10:19 +0000 (12:10 +0100)]
speling

12 years agopg 8.1 does not have xact_start
Arnt Gulbrandsen [Wed, 10 Mar 2010 11:09:10 +0000 (12:09 +0100)]
pg 8.1 does not have xact_start

12 years agoUpdate release date
Abhijit Menon-Sen [Wed, 10 Mar 2010 06:20:07 +0000 (11:50 +0530)]
Update release date

12 years agoaccept subaddresses properly even with the magic separator
Arnt Gulbrandsen [Mon, 8 Mar 2010 17:29:05 +0000 (18:29 +0100)]
accept subaddresses properly even with the magic separator

12 years agoMerge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Mon, 8 Mar 2010 14:09:09 +0000 (15:09 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox

12 years agomake check-sender-address remove/change bad addresses
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".

12 years agothat was dead code, really: the maximum needed always overrode
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

12 years agojust prettier logging
Arnt Gulbrandsen [Fri, 5 Mar 2010 15:09:26 +0000 (16:09 +0100)]
just prettier logging

12 years agohandlesNeeded didn't shrink nicely. make it do so.
Arnt Gulbrandsen [Fri, 5 Mar 2010 15:07:01 +0000 (16:07 +0100)]
handlesNeeded didn't shrink nicely. make it do so.

12 years agominimum and maximum were broken for timespans starting after max
Arnt Gulbrandsen [Fri, 5 Mar 2010 15:06:22 +0000 (16:06 +0100)]
minimum and maximum were broken for timespans starting after max

12 years agoand describe
Arnt Gulbrandsen [Fri, 5 Mar 2010 13:16:02 +0000 (14:16 +0100)]
and describe

12 years agoadd the keywords from RFC 3848 to the Received
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

12 years agoMerge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Thu, 4 Mar 2010 17:44:25 +0000 (18:44 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox

12 years agoif the transaction is rolled back, we have to say NO...
Arnt Gulbrandsen [Thu, 4 Mar 2010 17:44:18 +0000 (18:44 +0100)]
if the transaction is rolled back, we have to say NO...

12 years agofix transaction idleness timeout
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.

12 years agoudoc fix
Abhijit Menon-Sen [Thu, 4 Mar 2010 17:23:44 +0000 (22:53 +0530)]
udoc fix

12 years agowe can't send rollback if we've SENT commit.
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.

12 years agoMerge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Thu, 4 Mar 2010 16:26:39 +0000 (17:26 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox

12 years agodon't drop queued queries when we rollback()
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.

12 years agomake sure there always is a date on the autoreply
Arnt Gulbrandsen [Wed, 3 Mar 2010 15:36:36 +0000 (16:36 +0100)]
make sure there always is a date on the autoreply

12 years agokill invalid errors-to and remove unnecessary ones
Arnt Gulbrandsen [Wed, 3 Mar 2010 13:11:27 +0000 (14:11 +0100)]
kill invalid errors-to and remove unnecessary ones

12 years agoI typoed while splitting the previous commit in two. fix.
Arnt Gulbrandsen [Wed, 3 Mar 2010 13:10:02 +0000 (14:10 +0100)]
I typoed while splitting the previous commit in two. fix.

12 years agoMerge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Wed, 3 Mar 2010 12:40:13 +0000 (13:40 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox

12 years agosending vacation notices to postmaster? no...
Arnt Gulbrandsen [Wed, 3 Mar 2010 12:40:07 +0000 (13:40 +0100)]
sending vacation notices to postmaster? no...

12 years agoErrors-To is used only for robot/list mail (says my archive)
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)

12 years agomagic
Arnt Gulbrandsen [Mon, 1 Mar 2010 19:07:47 +0000 (20:07 +0100)]
magic

12 years agoselect() returns 0, so taken teh hint
Arnt Gulbrandsen [Mon, 1 Mar 2010 17:13:53 +0000 (18:13 +0100)]
select() returns 0, so taken teh hint

12 years agocleanliness, in an attempt to kill possible select() loops
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.

12 years agocheck whether to go away regularly, not just once
Arnt Gulbrandsen [Mon, 1 Mar 2010 14:30:26 +0000 (15:30 +0100)]
check whether to go away regularly, not just once

12 years agoclean up the addresses table only on explicit request (-a)
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

12 years agorollback ALL transactions in case of an IMAP error
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.

12 years agoactive commands have caused too much pain and too many crashes
Arnt Gulbrandsen [Fri, 26 Feb 2010 12:30:01 +0000 (13:30 +0100)]
active commands have caused too much pain and too many crashes

12 years agoif a command has a session when it starts executing, use that all the time
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

12 years agobasically wording
Arnt Gulbrandsen [Thu, 25 Feb 2010 15:09:07 +0000 (16:09 +0100)]
basically wording

12 years agotry to lock who holds locks if we need them and can't get them in 20s
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

12 years agoClosing means: we want to write, then close
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

12 years agomake logout close the connection after one second
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.

12 years agotry a little harder to close
Arnt Gulbrandsen [Thu, 25 Feb 2010 09:53:39 +0000 (10:53 +0100)]
try a little harder to close

12 years agonothing much. read the next diff instead.
Arnt Gulbrandsen [Wed, 24 Feb 2010 16:45:07 +0000 (17:45 +0100)]
nothing much. read the next diff instead.

12 years agocomment
Arnt Gulbrandsen [Wed, 24 Feb 2010 15:00:25 +0000 (16:00 +0100)]
comment

12 years agothat line made aox restart barf too much
Arnt Gulbrandsen [Wed, 24 Feb 2010 14:46:24 +0000 (15:46 +0100)]
that line made aox restart barf too much

12 years agosimplify the code
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.

12 years agotype
Arnt Gulbrandsen [Wed, 24 Feb 2010 13:26:32 +0000 (14:26 +0100)]
type

12 years agoif all clients go away sooner than three hours, so can the server
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

12 years agogentle shutdown/restart.
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).

12 years agoget rid of Query::allowSlowness() entirely
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

12 years agoallow transactions to be slow
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

12 years agoa little more debugging
Arnt Gulbrandsen [Wed, 24 Feb 2010 11:10:40 +0000 (12:10 +0100)]
a little more debugging

12 years agoremove all errno references from Buffer
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

12 years agoThis is really 92.
Abhijit Menon-Sen [Tue, 23 Feb 2010 14:41:04 +0000 (20:11 +0530)]
This is really 92.

12 years agofix obviously bad logic
Arnt Gulbrandsen [Tue, 23 Feb 2010 14:31:00 +0000 (15:31 +0100)]
fix obviously bad logic

12 years agothat timeout might be misunderstood
Arnt Gulbrandsen [Tue, 23 Feb 2010 14:30:43 +0000 (15:30 +0100)]
that timeout might be misunderstood

12 years agothe fetcher's queries can be slow. cope.
Arnt Gulbrandsen [Tue, 23 Feb 2010 13:45:33 +0000 (14:45 +0100)]
the fetcher's queries can be slow. cope.

12 years agoMerge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Tue, 23 Feb 2010 13:22:54 +0000 (14:22 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox

12 years agowe have to keep the transaction open
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

12 years agobetter code
Arnt Gulbrandsen [Tue, 23 Feb 2010 13:06:19 +0000 (14:06 +0100)]
better code

12 years agoget rid of Re: in the subject of autoresponses
Arnt Gulbrandsen [Tue, 23 Feb 2010 13:05:51 +0000 (14:05 +0100)]
get rid of Re: in the subject of autoresponses

12 years agosend supplemental LISTENs... but not necessarily at once
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.

12 years agoforgot to commit
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:14:42 +0000 (13:14 +0100)]
forgot to commit

12 years agoobscenity
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:13:40 +0000 (13:13 +0100)]
obscenity

12 years agoforgot to commit
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:13:22 +0000 (13:13 +0100)]
forgot to commit

12 years agoremove a line of dead code
Arnt Gulbrandsen [Tue, 23 Feb 2010 12:10:03 +0000 (13:10 +0100)]
remove a line of dead code

12 years agolog it when we start work on a transaction
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

12 years agothe server shouldn't shut down just because this transaction times out
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

12 years agoMerge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Tue, 23 Feb 2010 11:52:21 +0000 (12:52 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox

12 years agorandom simplification
Arnt Gulbrandsen [Tue, 23 Feb 2010 11:51:58 +0000 (12:51 +0100)]
random simplification

unnecessary complexity often hides bugs

12 years agopick a better log ID for the new connection, if possible
Arnt Gulbrandsen [Tue, 23 Feb 2010 11:51:12 +0000 (12:51 +0100)]
pick a better log ID for the new connection, if possible

12 years agoRemove redundant backend number in messages
Abhijit Menon-Sen [Tue, 23 Feb 2010 11:40:59 +0000 (17:10 +0530)]
Remove redundant backend number in messages

12 years agomake move work
Arnt Gulbrandsen [Fri, 19 Feb 2010 15:23:18 +0000 (16:23 +0100)]
make move work

12 years agoimap move. untested
Arnt Gulbrandsen [Fri, 19 Feb 2010 14:51:32 +0000 (15:51 +0100)]
imap move. untested

12 years agotry harder to avoid creating new db handles
Arnt Gulbrandsen [Fri, 19 Feb 2010 12:35:33 +0000 (13:35 +0100)]
try harder to avoid creating new db handles

12 years agocreate 3 connections at startup, and don't segfault if pg closes all
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

12 years agocount db handles only when they've managed to log in.
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.

12 years agoif connecting is really slow, we should still obey db-handle-interval
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

12 years agodo not try to reissue queries when pg shuts down
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

12 years agothat code was too seldom-run and might be broken
Arnt Gulbrandsen [Fri, 19 Feb 2010 11:24:54 +0000 (12:24 +0100)]
that code was too seldom-run and might be broken

12 years agopick a range, not 1024 random rows above a given ID
Arnt Gulbrandsen [Fri, 19 Feb 2010 11:24:38 +0000 (12:24 +0100)]
pick a range, not 1024 random rows above a given ID

12 years agothat debug logging is not needed
Arnt Gulbrandsen [Wed, 17 Feb 2010 12:24:31 +0000 (13:24 +0100)]
that debug logging is not needed

12 years agoTransaction::commit() on a failed transaction leaves state
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.

12 years agono, done() cannot return false for failed, too much code breaks
Arnt Gulbrandsen [Wed, 17 Feb 2010 11:59:25 +0000 (12:59 +0100)]
no, done() cannot return false for failed, too much code breaks

12 years agoa transaction isn't done merely because it's in a failed state
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.

12 years agotry harder to get rid of idle transactions
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.

12 years agodo not offer authentication for lmtp
Arnt Gulbrandsen [Tue, 16 Feb 2010 15:20:28 +0000 (16:20 +0100)]
do not offer authentication for lmtp

12 years agouse 117 seconds instead of 64 for the NAT defeater
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.

12 years agodo not send a quick OK after IDLE, some clients quit idle mode
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

12 years agoget rid of unnecessary Connection::write() calls
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.

12 years agowhy didn't I comment this when I write it? I suck.
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.

12 years agoimprove db timeout logic
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

12 years agosubmit-copy-to-sender even for vacation mail
Arnt Gulbrandsen [Mon, 15 Feb 2010 14:27:00 +0000 (15:27 +0100)]
submit-copy-to-sender even for vacation mail

12 years agosome people know c++, others do not
Arnt Gulbrandsen [Mon, 15 Feb 2010 13:47:58 +0000 (14:47 +0100)]
some people know c++, others do not

12 years agotweak f=f heuristic
Arnt Gulbrandsen [Mon, 15 Feb 2010 13:36:36 +0000 (14:36 +0100)]
tweak f=f heuristic

12 years agoprettier autoresponses
Arnt Gulbrandsen [Mon, 15 Feb 2010 13:26:03 +0000 (14:26 +0100)]
prettier autoresponses

12 years agosegfault in case of managesieve with some errors
Arnt Gulbrandsen [Mon, 15 Feb 2010 13:25:52 +0000 (14:25 +0100)]
segfault in case of managesieve with some errors

12 years agoMerge branch 'master' of ssh://strange.aox.org/home/git/aox
Arnt Gulbrandsen [Mon, 15 Feb 2010 11:32:00 +0000 (12:32 +0100)]
Merge branch 'master' of ssh://strange.aox.org/home/git/aox

12 years agotry to cancel SEARCH-related queries, and only those, in case the client
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.

12 years agojust get rid of Database::cancelQueries()
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.

12 years agoWarn about use-{http,webmail,web-archive}=true
Abhijit Menon-Sen [Wed, 10 Feb 2010 15:28:16 +0000 (20:58 +0530)]
Warn about use-{http,webmail,web-archive}=true