Oswald Buddenhagen
424e0e7221
make callbacks return early when canceling
...
even after driver->cancel() the store may complete commands successfully.
return early in this case, so we don't attempt to continue syncing.
2012-07-30 01:21:32 +02:00
Oswald Buddenhagen
ea951a697f
fix error paths wrt sync drivers, take 2
...
synchronous error codes which are passed through callbacks aren't a
particularly good idea, after all: latest when the callback does stuff
which does not concern the caller, the return code becomes ambiguous.
instead, protect the sync_vars object with a refcount when invoking
driver functions from loops, as the callbacks they call could invalidate
the object and we would have no way of knowing that the loop should be
aborted prematurely. the upcoming async imap driver will also need a
refcount to protect the cancelation marker of the imap socket dispatcher
loop.
2012-07-30 01:21:32 +02:00
Oswald Buddenhagen
ec8f440383
don't call cancel() repeatedly on a store
...
erroring command replies will trickle in even after canceling
2012-07-30 01:21:32 +02:00
Oswald Buddenhagen
b0bbd23512
replace DRV_STORE_BAD with a separate bad_callback()
...
that way we don't have to piggy-back (possibly asynchronous) fatal
errors to particular commands.
internally, the drivers still use synchronous return values as well,
so they don't try to access the invalidated store after calling back.
2012-07-30 01:21:31 +02:00
Oswald Buddenhagen
6d86e5347e
don't access free'd memory in cancel_sync()
...
as it happens, the 1st round *may* trash svars - if we get the
cancelation request after the slave store has already died.
2012-07-29 12:26:38 +02:00
Oswald Buddenhagen
9554026443
make drv->cancel()'s callback have no status code
...
this function is not going to actually execute any commands, so it
makes no sense for the callback to have a status code.
2012-07-29 12:25:24 +02:00
Oswald Buddenhagen
57444e9df9
don't decode aux pointer on DRV_CANCELED
...
the aux data was already free()d by the error callback by the time we
get this status code.
2012-07-22 20:19:20 +02:00
Oswald Buddenhagen
06ccac1fdd
always use return value from get_cmd_result()
...
once we have callback-based error reporting, this will ensure that we
don't operate on invalidated data structures.
2012-07-22 17:27:42 +02:00
Oswald Buddenhagen
121ce76e46
make response code parse failure of untagged OK/NO/BYE/BAD non-fatal
...
as such, it does not disrupt the data stream
2012-07-22 17:27:42 +02:00
Oswald Buddenhagen
d2e13f147c
de-duplicate code a bit
2012-07-22 17:27:40 +02:00
Oswald Buddenhagen
4d4de6e275
remove redundant use_ssl variables
...
just use the presence of an SSL object as an indicator. if something
goes wrong during the ssl handshake or certificate validation, the
socket must be immediately closed anyway.
2012-07-07 18:00:47 +02:00
Oswald Buddenhagen
fd229040d8
DRV_SERVER_BAD is and will probably stay unused => trash
2012-07-07 18:00:47 +02:00
Oswald Buddenhagen
17dc64b414
after [TRYCREATE], just resend the same command instead of cloning it
2012-07-07 18:00:47 +02:00
Oswald Buddenhagen
83efbe327d
use return values from correct set in get_cmd_result()
...
DRV_OK == RESP_OK, so this worked by accident
2012-07-07 18:00:47 +02:00
Oswald Buddenhagen
99cc328f17
do away with the dreaded rcaps hack
...
don't pretend that the server has no literal+ for the time of the
first relevant command's synchronous execution. instead, enable the
lower layer to do the processing by telling it for which commands
trashnc ("trash's existence not confirmed") is relevant.
2012-07-07 18:00:47 +02:00
Oswald Buddenhagen
1545ed90a0
purge imap_store_t::currentnc vestiges
...
we always actually open the mailbox before appending to it, so we
obviously know that it exists - that's why the code was already
commented out. changing this assumption would significantly complicate
matters for little gain, so let's just assume it won't happen.
consequently, also don't set param.create when appending to regular
mailboxes.
2012-07-07 18:00:47 +02:00
Oswald Buddenhagen
c66afdc0a8
move setting of ctx->listed outside the drivers
...
it's essentially an external state flag
2012-07-07 18:00:47 +02:00
Oswald Buddenhagen
7bab2d6d94
de-duplicate error paths
...
makes the code more compact. yay for gotos.
2012-07-07 18:00:47 +02:00
Oswald Buddenhagen
f6a25b331f
check return value from close() after write()
...
otherwise we may lose data when quota is exceeded
or nfs is in a bad mood.
2012-07-07 18:00:47 +02:00
Oswald Buddenhagen
61d98c5a1d
fix a bunch of warnings
2012-07-07 18:00:47 +02:00
Oswald Buddenhagen
4afd31a457
avoid preprocessor warnings on missing features: #if => #ifdef
2011-03-27 12:06:41 +02:00
Oswald Buddenhagen
cf6a7b4d18
less bizarre code
...
we know that there is only one command in progress, so there
is no need to employ tricks to access the last command.
2011-03-27 11:54:48 +02:00
Oswald Buddenhagen
7e1c16ae02
make cram() sane
...
- don't silently fail in release mode (expression with side effects
inside assert())
- save some redundand strlen()s by not throwing away known lengths
- reorganize the code for legibility
2011-03-27 11:54:48 +02:00
Oswald Buddenhagen
058d01f179
don't compare find_old_done with find_new_total
...
this didn't have any effect as no async drivers currently exist.
2011-03-27 11:54:48 +02:00
Oswald Buddenhagen
9e10e871fd
don't hang if store cannot be opened asynchronously
2011-03-27 11:54:48 +02:00
Oswald Buddenhagen
2c729bf9e6
don't leak SSL objects
2011-03-27 11:54:45 +02:00
Oswald Buddenhagen
296ac0364c
add CR after TUID during LF => CRLF conversion
2011-03-27 11:54:02 +02:00
Oswald Buddenhagen
8df1ebaf40
fix (another) out-of-bounds access in CRLF conversion
...
if the header contained no CRs but the body (or the post-TUID part of
the header) did, the TUID insertion would add an excess CR, thus
overflowing the buffer by one byte.
2011-03-27 11:54:02 +02:00
Oswald Buddenhagen
39006d7f24
document some breakage
2010-11-14 17:23:59 +01:00
Oswald Buddenhagen
d637772339
turns out, free(NULL) is just fine ...
2010-11-14 16:44:50 +01:00
Oswald Buddenhagen
e1fa867423
fix UIDNEXT handling
...
UIDNEXT *can* be legally zero, so deal with it.
-REFMAIL: 4CA62BA1.4020104@lemma.co.uk
2010-10-03 14:33:24 +02:00
Oswald Buddenhagen
5ade279839
don't hang after failed start_tls()
...
we'd send a LOGOUT command in plain text while the server was already
expecting an encrypted command, which would typically lead to waiting
for more data and thus an indefinite hang.
so close the socket immediately instead of letting the normal shutdown
path take care of it.
inspired by a patch by Steven Flintham.
-REFMAIL: 4C9AB98E.3000400@lemma.co.uk
2010-10-03 12:37:59 +02:00
Oswald Buddenhagen
70e87eb99e
remove useless message
...
don't complain about missing greeting response - we already complained
about an unexpected EOF anyway.
2010-10-03 12:37:59 +02:00
Oswald Buddenhagen
90a38ea810
assert valid file handles
...
i've seen error logs of the type
SSL_write: Bad file descriptor
and i simply can't nail it, so go for some more drastic measures.
2010-10-03 12:37:59 +02:00
Oswald Buddenhagen
72fd2aafb7
formatting
2010-10-03 12:37:59 +02:00
Oswald Buddenhagen
122e09fe60
beautify error messages
...
don't print the error number - we print the error string anyway, so it
adds no value.
add some whitespace to the messages as well.
2010-10-03 12:37:10 +02:00
Oswald Buddenhagen
db2bbbfef8
fix uninitialized variable read
...
this is basically a security fix for nonsensical configurations:
if the specified CertificateFile did not contain any certificates,
we *might* have accepted an arbitrary server certificate.
2010-04-05 13:06:58 +02:00
Oswald Buddenhagen
516c3bfa99
remove mail addresses from man pages
...
apparently, some people don't see the "maintained by" bits, so make them
look harder for explicit contact information (to be found in AUTHORS).
2010-02-28 22:23:20 +01:00
Oswald Buddenhagen
da39690aec
fix compile with SSL on Mac OS X
...
patch by Remko Tronçon <remko@el-tramo.be>
BUG: 2126899
2010-02-07 22:31:11 +01:00
Oswald Buddenhagen
a8b4de463e
add -P option to isync wrapper
...
not really a backwards compat option, but whatever ...
based on a patch submitted long ago by "nobody".
BUG: 1433532
2010-02-07 22:31:11 +01:00
Oswald Buddenhagen
4729b1ee23
cvsignore => gitignore
2010-02-07 22:31:10 +01:00
Oswald Buddenhagen
e6a356ffc7
add extra verbose mode which dumps the message contents
...
i needed that to debug the line ending issues. maybe it will find other
uses as well ...
2010-02-06 10:49:57 +01:00
Oswald Buddenhagen
d94dadbaeb
fix line ending conversion logic
...
imap may very well store messages with LF line endings. only RFC2822
requires CRLF.
consequently, preserve the line endings as much as possible unless the
mailbox format does not support it (this would be the case for unix mbox
- i actually have no idea about maildir).
2010-02-06 10:49:57 +01:00
Oswald Buddenhagen
09dfddb36b
some more error reporting relating malformed messages
2010-02-06 10:49:06 +01:00
Oswald Buddenhagen
ce45692ca5
refactoring. main part is killing struct imap_cmd_cb as such.
...
issue_imap_cmd is split into new_imap_cmd and submit_imap_cmd, so the
command can be parametrized after it was instanciated.
2008-08-31 20:14:59 +00:00
Oswald Buddenhagen
92914b37cc
deal with UIDVALIDITY of 0 properly.
...
-REF: 20080822094543.GA3528@ugly.local
2008-08-23 07:54:00 +00:00
Oswald Buddenhagen
0d8bce1675
give the implicitly created imap account config the name of the store.
2008-04-13 09:56:44 +00:00
Oswald Buddenhagen
262999d092
make ssl certificate handling much more useful:
...
- system-wide ca certs are auto-loaded
- private certs are accepted even if they are self-signed
2008-04-13 09:51:27 +00:00
Oswald Buddenhagen
06521da30d
- accept unset CertificateFile
...
- print the certificate's fingerprint
- make the certificate acceptance prompt much less scary
2008-04-12 08:58:50 +00:00
Oswald Buddenhagen
89519e343c
ignore system flag extensions (\X-...)
2008-04-12 08:13:44 +00:00
Oswald Buddenhagen
474923bc6b
compat wrapper: don't crash if neither host nor tunnel are specified.
...
fixes:
CCMAIL: 449006@bugs.debian.org
2008-02-23 14:18:21 +00:00
Oswald Buddenhagen
71fce2a622
quote user name in generated config.
...
fixes:
CCMAIL: 456775@bugs.debian.org
2008-02-23 09:37:38 +00:00
Oswald Buddenhagen
2f62a7f608
don't overlook 2nd and later single-letter options in last argument.
...
reported by fedora
-REF: <1197916586.13945.120.camel@localhost.localdomain>
2008-02-23 09:18:42 +00:00
Oswald Buddenhagen
a365e20660
put pointers to bdb open() into parentheses, so they won't be
...
macro-expanded as libc open.
patch by fedora
-REF: <1197916586.13945.120.camel@localhost.localdomain>
2008-02-23 09:01:51 +00:00
Oswald Buddenhagen
2b37288e8d
don't use #ifdef inside htons() arguments - it can be a macro.
...
-REF: <lyy7ezyjah.fsf@gfn.org>
CCMAIL: Scott Gifford <sgifford@suspectclass.com>
2007-09-22 08:45:41 +00:00
Oswald Buddenhagen
42ca262e39
#ifdef __linux__ for the crash handler. it compiles on other platforms,
...
but the functionality is bound to linux' /proc structure.
2007-04-04 16:19:47 +00:00
Oswald Buddenhagen
625f592fb7
fix crash due to uninited var when parsing IMAPServer. Thanks to
...
CCMAIL: Antoine Reilles <tonio@NetBSD.org>
REF: <20070118182534.GA22288@arcelot.loria.fr>
2007-02-10 15:37:46 +00:00
Oswald Buddenhagen
023d3ee577
fix error paths wrt sync drivers
2006-12-09 10:39:30 +00:00
Oswald Buddenhagen
9056504483
handle abnormal program exit during regtest
2006-12-09 10:38:11 +00:00
Oswald Buddenhagen
6800f1636e
initialize mvars->t[1] to 1. helps enormously ... :}
2006-12-04 17:47:55 +00:00
Oswald Buddenhagen
e0d72cd5e3
reverse-map <Inbox> to INBOX when encountered during listing.
...
usually this will be a no-op (when putting INBOX in Path, people
generally call it INBOX), but better safe than sorry.
2006-11-18 13:17:13 +00:00
Oswald Buddenhagen
6985da5848
make compat wrapper default to current user for imap login
2006-11-09 17:57:38 +00:00
Oswald Buddenhagen
0e8a8d120d
put INBOX in Maildir
2006-11-01 06:19:52 +00:00
Oswald Buddenhagen
2a9b0bd763
don't crash on truncating database. seems to affect only some bdb
...
versions (e.g., 4.2).
2006-10-24 17:37:57 +00:00
Oswald Buddenhagen
9b657a46a0
fix bug in newline conversion causing buffer overflows.
...
this leads to segfaults and has some security impact.
2006-08-10 07:01:02 +00:00
Oswald Buddenhagen
617d1a6e49
memmove for overlapping mem copies.
2006-08-10 06:33:18 +00:00
Oswald Buddenhagen
1b9f8b4c69
glibc seems to be *really* fucked up.
2006-07-31 05:30:46 +00:00
Oswald Buddenhagen
d2463a4cd8
work around glibc bug: printf("%.*s", INT_MAX, s) tries to allocate 2G.
2006-07-29 11:52:54 +00:00
Oswald Buddenhagen
9b7c09e4b6
enable the old account naming scheme to deal with duplicated ip
...
addresses.
this is not incompatible - previously, it would just create garbage.
2006-06-05 11:59:51 +00:00
Oswald Buddenhagen
aea4be19e3
create more descriptive account names, so password prompts look sane.
...
the channel names follow the old scheme, though - they are used to
compose sync state file names, and i don't feel like writing a migrator
for this.
2006-06-05 11:55:23 +00:00
Oswald Buddenhagen
4bf58c3e97
don't crash in imap driver when Host is not specified.
2006-05-28 16:03:52 +00:00
Oswald Buddenhagen
c8275e2aa7
be *slightly* more explicit about which options Tunnel makes
...
superfluous.
2006-05-28 16:02:56 +00:00
Oswald Buddenhagen
dbbab78881
un-document "Host imaps:[...]" syntax and introduce new option UseIMAPS
...
instead.
apply ted's patch to support UseIMAPS in conjunction with Tunnel.
document that SSLv2 is No Good (TM).
2006-05-28 15:43:58 +00:00
Oswald Buddenhagen
67b714ee0e
move assigning default port to the place of use
2006-05-28 13:38:14 +00:00
Oswald Buddenhagen
f6f2d2461c
add comment
2006-05-27 12:44:13 +00:00
Oswald Buddenhagen
21abb22c98
seen messages are eligible for expiration even if they are recent in the
...
mailbox.
2006-05-27 12:43:03 +00:00
Oswald Buddenhagen
8a748d046d
no/empty mailbox name means INBOX
2006-03-21 20:05:48 +00:00
Oswald Buddenhagen
168e5f3282
make the driver model, sync_chans() and sync_boxes() fully async.
...
async drivers to follow ...
2006-03-21 20:03:21 +00:00
Oswald Buddenhagen
bdcc285403
unscrew lf=>crlf conversion and tuid insertion
2006-03-21 17:50:57 +00:00
Oswald Buddenhagen
16eaf903db
ok, mismerging and not running the reg-tests is lame. unscrew expunging
...
again.
2006-03-21 17:40:31 +00:00
Oswald Buddenhagen
c7903f8003
don't enter trash loop if not trashing at all. also, move expunge
...
message where it belongs. not adding info("trashing"), as it will be
replaced in a moment anyway.
2006-03-21 16:03:09 +00:00
Oswald Buddenhagen
b5d70aa596
async merge: aggregate most variables of main() & sync_boxes() in
...
main_vars_t resp. sync_vars_t.
also some minor var renames, whitespace, comments.
2006-03-21 15:53:43 +00:00
Oswald Buddenhagen
f90b290650
split box list preparation from "consumption".
2006-03-21 10:38:30 +00:00
Oswald Buddenhagen
72a2d4b690
info() about opening of stores
2006-03-21 10:30:45 +00:00
Oswald Buddenhagen
b7389cb36f
do not repeatedly get namespace from server.
2006-03-20 20:39:06 +00:00
Oswald Buddenhagen
340bfcc4a8
handle socket() failure and correctly report gethostbyname() failure.
2006-03-20 20:34:32 +00:00
Oswald Buddenhagen
3e3cf3ac9a
update copyrights
2006-03-20 20:16:22 +00:00
Oswald Buddenhagen
7f9ece8e7e
move whole responsibility for recycling open stores/server connections
...
to the drivers.
2006-03-20 19:38:20 +00:00
Oswald Buddenhagen
47e592b603
keep the result of driver->list() and a flag whether it is valid in the store.
2006-03-20 19:27:38 +00:00
Oswald Buddenhagen
861dd7468e
aggregate all (two ...) drivers in an array instead of naming them in
...
each (one ...) location explicitly.
2006-03-20 18:36:49 +00:00
Oswald Buddenhagen
492ca8d332
whitespace and code verbosity
2006-03-20 17:21:07 +00:00
Oswald Buddenhagen
31fc41a32c
merge imap_t into imap_store_t - there is really no point in having them
...
separated.
2006-03-20 15:01:48 +00:00
Oswald Buddenhagen
d7126dca5e
"fprintf( stderr," => "error(". new functions debugn() and infon()
...
for messages with missing newline; warn() and error() act upon this.
2006-03-19 11:29:12 +00:00
Oswald Buddenhagen
bb7bbcf5b1
make config parsing more robust against bogus input and report errors
...
more clearly.
2006-03-19 10:44:53 +00:00
Oswald Buddenhagen
fbbb86738b
factor out box selection from sync_boxes to avoid code dupe
2006-02-12 11:42:46 +00:00
Oswald Buddenhagen
bc39f10a1e
lock the sync state open the journal before opening the master. this is
...
a bit ugly for the "SyncState *" case, as we have to create a directory
without making it a maildir right away. however, this makes the code
quite a bit simpler to understand and simpler to parallelize.
2006-02-11 20:28:45 +00:00
Oswald Buddenhagen
7726ce3e0f
don't barf at directories with none of {tmp,new,cur}/ and turn them
...
into maildirs instead. see next commit.
2006-02-11 20:14:31 +00:00
Oswald Buddenhagen
5224b5bc9f
don't commit state file when a fatal error occurs
2006-02-11 20:02:06 +00:00
Oswald Buddenhagen
630a04ad3e
unbelieveable, but close() can actually fail
2006-02-11 19:52:53 +00:00
Oswald Buddenhagen
d7b8621f05
add copyright + license
2006-02-11 19:48:44 +00:00
Oswald Buddenhagen
1453e61840
update fsf's postal address. i think it's sort of useless nowadays
...
anyway, but heck ...
2006-02-09 17:44:22 +00:00
Oswald Buddenhagen
4e8fabf7e5
typos
2006-02-05 17:42:22 +00:00
Oswald Buddenhagen
d76c827a45
include run-tests.pl in distribution
2006-02-05 17:38:31 +00:00
Oswald Buddenhagen
e567cc6919
and now don't clobber the mails ...
2006-02-03 23:43:52 +00:00
Oswald Buddenhagen
850addecd5
wrap message storing into transactions. nice side effect: drivers don't
...
need to deal with line end conversion any move.
2006-02-03 21:33:43 +00:00
Oswald Buddenhagen
19128f1587
major overhaul of flag change propagation and MaxMessages handling:
...
- wrap message (un)expirations into transactions
- no redundand flag propagations in conjunction with expirations
- better prepared for the upcoming async operation
2006-02-02 17:03:01 +00:00
Oswald Buddenhagen
ab11737b33
crash handler that launches gdb. activated when started with -D option.
...
simplifies debugging crashes during the reg-tests.
2006-02-02 13:48:02 +00:00
Oswald Buddenhagen
bbc0a877c8
less cluttered debug output
2006-02-02 11:23:57 +00:00
Oswald Buddenhagen
58db1d05ac
cosmetics: move around variable declarations and remove obsolete comment
2006-02-02 11:12:30 +00:00
Oswald Buddenhagen
905ded175f
versioned journal. the commands and their meanings change all the time,
...
so better handle that case.
ps: yes, i think not upgrading mbsync between interrupting and resuming
a run is a reasonable requirement.
2006-02-02 11:07:54 +00:00
Oswald Buddenhagen
8728dfdf21
make the sync entry search in the journal replay wrap around at the end
...
of the list. the "always forward" assumption is violated in some cases.
2006-02-02 10:44:19 +00:00
Oswald Buddenhagen
5e01034aee
much improved journal replay testing.
...
some clenup.
2006-02-02 10:25:07 +00:00
Oswald Buddenhagen
d1c4f8a069
orphan/kill all affected entries after expunge
2006-02-02 10:04:05 +00:00
Oswald Buddenhagen
1a536a3415
M_EXPIRED -> M_EXPIRE
2006-01-30 13:49:46 +00:00
Oswald Buddenhagen
40fc6a6ac8
sanitize S_DEL
2006-01-30 13:11:33 +00:00
Oswald Buddenhagen
e205eb62f5
remove superfluous temporary rflags from sync_boxes
2006-01-30 13:01:35 +00:00
Oswald Buddenhagen
c7d938f965
now that messages know their sync records, M_SYNCES is superfluous.
2006-01-30 11:12:14 +00:00
Oswald Buddenhagen
2277ecefb6
establish bi-directional mapping between mails and sync records. use it
...
to merge the --renew case into the --new case.
2006-01-30 10:26:04 +00:00
Oswald Buddenhagen
24910e2cdf
declaring ex[M] instead of ex[2] is, indeed, no good. long live watchpoints.
2006-01-30 09:33:29 +00:00
Oswald Buddenhagen
a41ea8f9f1
whoops - 'isync -w' would write .mbsyncrc to a wrong directory
2006-01-29 18:40:27 +00:00
Oswald Buddenhagen
c1c7cb6d8e
move fetching new messages in front of syncing old entries. this alone
...
does not buy us a whole lot ...
2006-01-29 15:52:49 +00:00
Oswald Buddenhagen
635b2d7b76
test for journalling and journal replay.
2006-01-29 15:48:24 +00:00
Oswald Buddenhagen
9c6c158ef3
undocumented flag -J to skip committing the new sync state.
2006-01-29 15:46:09 +00:00
Oswald Buddenhagen
a1a5a817bb
merge Quiet, Verbose & Debug into DFlags
2006-01-29 14:46:16 +00:00
Oswald Buddenhagen
185769640b
M_NOT_SYNCED => M_SYNCED. now that sync records know their messages, it
...
is simpler to track the positive case.
2006-01-29 11:49:49 +00:00
Oswald Buddenhagen
f4ce961bab
move driver options composition below journal replay - it might make
...
additional actions necessary (it doesn't, yet).
2006-01-29 11:35:22 +00:00
Oswald Buddenhagen
a1c402678c
split driver->prepare into ->prepare_opts and ->prepare_paths
2006-01-29 11:22:45 +00:00
Oswald Buddenhagen
4e983506d3
#include limits.h (for INT_MAX)
...
REF: <a8e45e1b0601241753j1e14cc1cm3fc3c65c7acb0c1b@mail.gmail.com>
2006-01-25 06:35:19 +00:00
Oswald Buddenhagen
1a6ee00d86
less confusing uid ranges in debug
2006-01-13 16:10:42 +00:00
Oswald Buddenhagen
d414d0aae2
solaris 10 fix: use sys/filio.h for FIONREAD. untested.
...
REF: <20060111215014.GA601@49.180.97-84.rev.gaoland.net>
2006-01-12 06:36:44 +00:00
Oswald Buddenhagen
8b6ac97fe4
adjust to: omit flags other than "deleted" when expunging target.
2006-01-08 19:25:58 +00:00
Oswald Buddenhagen
3c8ee66bfc
collect stderr as well.
2006-01-03 09:28:02 +00:00
Oswald Buddenhagen
f6ed69a8d3
don't record we synced flags if we didn't.
2005-12-29 13:08:27 +00:00
Oswald Buddenhagen
2fa54425e7
have to flush debug as well ...
2005-12-28 20:45:01 +00:00
Oswald Buddenhagen
76de0182a2
of course F_DELETED will have been added to expired slave messages, so
...
don't complain about it.
2005-12-28 20:05:53 +00:00
Oswald Buddenhagen
8c30ec4a25
put message references into the sync records. match up the uids after
...
opening the boxes instead of "sort-of-on-demand" - this is much simpler.
match from messages to sync records, not the other way round - makes the
debug output shorter, as the separate dump_box() is gone now.
2005-12-28 19:17:40 +00:00
Oswald Buddenhagen
61dfbea617
"reformat" S_EXP_S setting logic for understandability.
2005-12-28 19:10:12 +00:00
Oswald Buddenhagen
808001c0a9
whoops
2005-12-28 11:07:47 +00:00
Oswald Buddenhagen
4ec56f8cf6
- instead of having {m,s}foo, we have foo[2] now, so we can do
...
everything with loops instead of symmetric function calls
- added some const
2005-12-28 10:02:22 +00:00
Oswald Buddenhagen
f070f3cd72
show debug output on error.
2005-12-27 17:44:31 +00:00
Oswald Buddenhagen
d68dd7369e
make the error case output more useful by dumping the entire data set.
2005-12-27 17:31:04 +00:00
Oswald Buddenhagen
549c1cf13e
fix error message
2005-12-26 16:02:50 +00:00
Oswald Buddenhagen
716ff82540
add expiration tests
2005-12-26 16:02:08 +00:00
Oswald Buddenhagen
ad5f5aa2b2
add MaxSize tests
2005-12-26 16:01:42 +00:00
Oswald Buddenhagen
ab898f2f5c
when dumping mailboxes, sort by uid 1st.
2005-12-26 16:00:04 +00:00
Oswald Buddenhagen
d3faf0d27f
detect excess messages after sync
2005-12-26 15:58:12 +00:00
Oswald Buddenhagen
924e1a7f04
sync state reader:
...
- grok negative uids
- more robust
2005-12-26 15:57:06 +00:00
Oswald Buddenhagen
963f607c81
don't eat array lead-in on empty arrays
2005-12-26 15:54:09 +00:00
Oswald Buddenhagen
4dc23fee7b
why would somebody manipulate an expired message? right, he wouldn't:
...
he would either expunge the mailbox or configure his MUA to hide trashed
messages. consequently don't sync expired message flags, let alone
interpret them in a special way.
one special feature remains, though: if a non-expunged expired message
is flagged on the master, it will be unexpired on the slave. i'm not
sure whether i should remove or document this feature.
2005-12-26 15:02:38 +00:00
Oswald Buddenhagen
9740e7e852
message tweaks
2005-12-26 14:55:19 +00:00