Oswald Buddenhagen
3169c59e10
validate maildirs more strictly
...
now that "SyncState *" won't create fake mailboxes any more, we can make
a full validity check again.
13 years ago
Oswald Buddenhagen
05fd0b9970
split out drv->load() from drv->select()
13 years ago
Oswald Buddenhagen
c741d5ffb5
make creation of trash folder independent from -C option
...
the trash is not a box which is synced, but a "byproduct" of
manipulating synced boxes, so it makes no sense to bind it to the same
option.
13 years ago
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.
13 years ago
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.
13 years ago
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.
13 years ago
Oswald Buddenhagen
c66afdc0a8
move setting of ctx->listed outside the drivers
...
it's essentially an external state flag
13 years ago
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.
13 years ago
Oswald Buddenhagen
61d98c5a1d
fix a bunch of warnings
13 years ago
Oswald Buddenhagen
d637772339
turns out, free(NULL) is just fine ...
14 years ago
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).
15 years ago
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>
17 years ago
Oswald Buddenhagen
023d3ee577
fix error paths wrt sync drivers
18 years ago
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.
18 years ago
Oswald Buddenhagen
2a9b0bd763
don't crash on truncating database. seems to affect only some bdb
...
versions (e.g., 4.2).
18 years ago
Oswald Buddenhagen
1b9f8b4c69
glibc seems to be *really* fucked up.
19 years ago
Oswald Buddenhagen
d2463a4cd8
work around glibc bug: printf("%.*s", INT_MAX, s) tries to allocate 2G.
19 years ago
Oswald Buddenhagen
f6f2d2461c
add comment
19 years ago
Oswald Buddenhagen
168e5f3282
make the driver model, sync_chans() and sync_boxes() fully async.
...
async drivers to follow ...
19 years ago
Oswald Buddenhagen
3e3cf3ac9a
update copyrights
19 years ago
Oswald Buddenhagen
7f9ece8e7e
move whole responsibility for recycling open stores/server connections
...
to the drivers.
19 years ago
Oswald Buddenhagen
47e592b603
keep the result of driver->list() and a flag whether it is valid in the store.
19 years ago
Oswald Buddenhagen
d7126dca5e
"fprintf( stderr," => "error(". new functions debugn() and infon()
...
for messages with missing newline; warn() and error() act upon this.
19 years ago
Oswald Buddenhagen
7726ce3e0f
don't barf at directories with none of {tmp,new,cur}/ and turn them
...
into maildirs instead. see next commit.
19 years ago
Oswald Buddenhagen
1453e61840
update fsf's postal address. i think it's sort of useless nowadays
...
anyway, but heck ...
19 years ago
Oswald Buddenhagen
850addecd5
wrap message storing into transactions. nice side effect: drivers don't
...
need to deal with line end conversion any move.
19 years ago
Oswald Buddenhagen
a1c402678c
split driver->prepare into ->prepare_opts and ->prepare_paths
19 years ago
Oswald Buddenhagen
8db5ec1e5e
less confusing error message on invalid mailbox.
19 years ago
Oswald Buddenhagen
7710b3dcb5
make flag changes unset "new" status - unless a ghost is acting in the
...
background, a flag change indicates that the message was at least
noticed.
20 years ago
Oswald Buddenhagen
02babb0651
fix inverted condition leading to endless loop when message is changed
...
while isync is running.
20 years ago
Oswald Buddenhagen
3f8e820acb
use legacy flock() only on linux. at least on OS X flock aliases to
...
fcntl.
21 years ago
Oswald Buddenhagen
16de402c9e
when storing \seen messages, don't set the \recent flag on them. could
...
well be that this is incorrect, but some mailers need it that way.
when trashing messages, preserve their \recent status as well.
21 years ago
Oswald Buddenhagen
86d9a3140d
first check _both_ bounds, then compare ...
21 years ago
Oswald Buddenhagen
b8b4628197
store new UIDVALIDITY immediately after initializing it
21 years ago
Oswald Buddenhagen
130664b622
The Big Rewrite. too many change to list them all.
...
as opposed to earlier threats, BerkDB was not entirely dropped; i
suppose the isync 0.7 -> 0.8 change had a reason, so i added an
alternative UID storage scheme.
note that BDB 4.0 is not sufficient, as the db->open function changed in
an incompatible way ...
i updated the debian packaging except for a changelog entry.
note that i removed the upgrade blurb, as upstream now has a smooth
upgrade path down to at least isync 0.4.
21 years ago