2020-08-04 12:44  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	bump version

2020-08-04 09:17  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	fix version comparison in LibreSSL conditional

	the operator was exactly inverted. that means that it actually wouldn't
	compile with both older versions (that needed the aliases) and
	potentially new versions (that will hide the data members - still not
	the case as of 3.2).

	amends 8a40554f0.

2020-08-04 08:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix re-using server connections for new stores

	we failed to reset the box list pointer after freeing it, which would
	lead to a crash.
	we also failed to reset the listing status, which would lead to
	malfunction if we hadn't already crashed.

	this inlines imap_cleanup_store(), as there isn't much value in keeping
	it. the message list is already freed when disowning the store anyway.

2020-08-03 10:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_proxy.c:

	don't crash in proxy_invoke_bad_callback()

	we need to hold a ref to the proxy store, as after the bad_callback()
	it's otherwise likely gone.

2020-07-27 20:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: socket.c, socket.h:

	fix simultaneously connecting to multiple hosts in non-IPv6 builds

	we need to deep-copy the struct hostent data, as otherwise the
	concurrent connects will overwrite each other's lookup results.

	this is a rather hypothetical fix, as the bug currently affects only
	channels connecting two IMAP accounts, and only if the first host's
	first address asynchronously fails to connect.

2020-07-27 22:28  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	increase PassCmd output buffer even more

	apparently, some XOAUTH2 tokens are at 2.4K already, so make it 8K to be
	*really* safe for a while.

	REFMAIL: <20200716000515.GA2111668@lysator.liu.se>

2020-08-02 18:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	unbreak CertificateFile documentation

	the file may in fact contain CA certs.

	amends 7d9d3e15.

2020-07-08 09:42  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	bump version

2019-12-29 11:59  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix propagation of flagged oversized messages

	... when not syncing flags and the target is not being expunged, as in
	that case flags were not queried in time.

2019-11-24 09:54  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/: config.c, main.c:

	fix printf length arguments on lp64

	found by coverity.

2019-09-09 16:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c:

	handle case-insensitivity of IMAP's INBOX

	this is relevant only when listing an IMAP Store's contents, as that's
	the only place where we aren't imposing the spelling ourselves.

	we need to be careful not to treat our own canonical (prefix-stripped
	and always slash-delimited) box names like that; codify that in
	comments.

	this reveals that commit 6f2160f1 may be deemed to have been incorrect -
	the TODO item was ambiguous, and could quite possibly have meant this
	fix. unsurprisingly, 380ccdd4 re-introduced it with more explicit
	wording.

2019-11-23 12:51  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	catch server's failure to FETCH *

	the query is untypical enough to have caused problems with davmail (when
	we still used *:*) and mailo.com (until it got fixed), so better check
	that the result (not) returned by the server makes sense.

2019-11-16 16:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	don't timeout while uploading big messages

	we did already set up the timeout when starting to send commands, but so
	far we did not reset it when succeeding to send out data. rectify that.

	REFFAIL: 87sgy92we3.fsf@jnanam.net

2019-12-03 12:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	make -DC work with yama ptrace protection

2019-11-22 20:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, util.c:

	fix overflows in uint comparisons

2019-11-27 16:55  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/isync.1, mbsync.1:

	fix roff abuse in man pages

	".." is not valid. use "." instead, as recommended by groff_man(7).
	this also necessitated adjusting the markup of the license blurbs.

2019-11-18 17:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	improve documentation of the server certificate related options

2020-02-28 11:10  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	re-generate ChangeLog only if it's newer than the git index

	otherwise, we'd re-generate it during 'install' as well.

	note that this does not work with new-style git worktrees, where .git is
	only a file - but there the log generation itself already doesn't work
	anyway.

2019-11-18 15:30  Oswald Buddenhagen <ossi@users.sf.net>

	* README:

	update build requirements

	in particular, mention perl-related things, which might not be
	immediately obvious.

2020-07-01 16:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	mention --remove in --help output

	amends d9a983a.

2019-11-23 12:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix UIDNEXT error message

2019-07-28 11:33  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	fix error handling of SSL_set_tlsext_host_name()

	it is not one of the functions to be checked with SSL_get_error().

	amends 17babc169.

2019-07-28 10:11  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	error-check more openssl function calls

2019-07-28 09:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, socket.c:

	attempt to improve ssl error handling (again)

	the error queue may contain multiple errors, so make sure to drain it
	completely. also, don't try to fall back to errno in case of
	SSL_ERROR_SSL.

2019-07-28 10:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	modernize ssl context init

	with openssl 1.1+, use TLS_client_method() instead of the deprecated
	SSLv23_client_method().

2019-07-28 09:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	fix leak of openssl X509 objects

	SSL_get_peer_certificate() increments the refcount of the object.

2019-09-10 11:14  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	fix libcrypto detection in openssl 1.1+ without pkg-config

	CRYPTO_lock() was removed. test for X509_cmp() instead, which we
	actually use.

	inspired by report from FX <coudert@users.sourceforge.net>.

2019-09-10 11:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	wording fixes in mbsync.1

	inspired by Ulrich Ölmann <u.oelmann@pengutronix.de>.

2019-08-18 08:38  Caspar Schutijser <caspar@schutijser.com>

	* src/socket.c:

	Do not crash when using Tunnel in an IPv6-enabled build

	socket_connected() is also called on the tunnel pipe.

	amends 3ceb55310.

2019-07-09 18:51  Dmitry Torokhov <dtor@chromium.org>

	* src/drv_imap.c:

	Bump up PassCmd buffer size to 2KiB

	While ordinary passwords are rarely longer than 80 bytes, XOAUTH2 tokens
	easily exceed this limit. Let's bump it up to 2K to be really safe.

2019-05-28 15:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix parsing of NIL hierarchy delimiters in IMAP LIST responses

	a server which does not support hierarchical mailboxes (e.g., seznam.cz
	as of oct 2018) can legitimately send NIL (rather than an empty string).

2019-05-28 13:44  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	make output of perl check more tidy

	amends c75001aa.

2019-03-10 10:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix spacing in "SASL mechanism(s) not available" error message

	amends fdb03b91.

2019-02-20 18:19  Klemens Nanni <kn@openbsd.org>

	* src/drv_imap.c:

	Fix CopyArrivalDate on platforms without glibc

	strptime(3)'s "%d" day of the month conversion specifier does not accept
	leading blanks in case of single digit numbers.  "%e" does that.

	While implementation details and differences between the two
	day-of-month conversion specifiers vary, none of the major libcs
	(incl. OpenBSD, FreeBSD, Illumos, musl) consume a leading blank for "%d"
	except glibc, which consumes any number of spaces like in the "%e" case.

	Using "%e" ensures that date strings like " 4-Mar-2018 16:49:25 -0500"
	are successfully parsed by all major implementations in compliance to
	X/Open Portability Guide Issue 4, Version 2 ("XPG4.2").  musl is now the
	only one that still treats "%d" and "%e" without stripping any space.

	Issue analysed and reported by Evan Silberman <evan@jklol.net> who found
	mbsync 1.3.0 on OpenBSD 6.4 to fail with `CopyArrivalDate' set when
	syncing mails with the above mentioned timestamp.

	See https://marc.info/?l=openbsd-tech&m=155044284526535 for details.

2019-02-05 10:23  Gergely Risko <gergely@risko.hu>

	* src/drv_imap.c:

	Work around useless SASL warnings

	Ater sasl_client_step() is called and the Cyrus SASL library forwards
	it to the client plugin, if the result value is OK (authentication
	succeeded), the clientout is filled out to be an empty string, even if
	the client plugin wanted to return NULL.

	To avoid that mbsync complains at this point, check the returned length
	instead of the pointer.

2019-01-04 23:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_proxy_gen.pl:

	fix formatting of uint in callback debug stubs

	amends bb632d1c.

2018-11-24 13:15  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.c, driver.h, drv_imap.c:

	sort messages from UID FETCH request

	turns out that some IMAP servers (e.g., poczta.o2.pl) do not return
	messages in ascending UID order in response to a UID FETCH request,
	which makes the driver violate the API contract.

	counter this by sorting the messages. this also addresses the
	long-standing (but hypothetical) issue that parallel UID FETCH requests
	could be handled out-of-order and thus also lead to mixed up results.

	based on patch by Marcin Niestroj <macius1990w@gmail.com>.

2018-09-09 11:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	bump IMAP command buffer size to 4KiB

	while only 1KiB is required by the IMAP spec, AUTHENTICATE GSSAPI with
	Kerberos requires about 1700 bytes.
	accomodate that, plus some reserve.

	fix suggested by Tollef Fog Heen <tfheen@err.no> via Debian BTS.

2018-09-08 16:36  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	use SNI when connecting with SSL

	based on patch by Vincent Bernat <vincent@bernat.ch>.

2018-07-01 11:22  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.h:

	fix type of 'port' and check its range in config reader

2018-05-18 13:24  Klemens Nanni <kn@openbsd.org>

	* src/: drv_maildir.c, drv_proxy.c:

	Fix time_t format strings

	For time_t, long long handles dates after Y2038 and should be safe on
	32-bit architectures.

	From Jeremie Courreges-Anglas <jca@openbsd.org>.

2018-05-18 13:11  Klemens Nanni <kn@openbsd.org>

	* src/socket.c:

	User functions provided by recent LibreSSL versions

	At least on OpenBSD, this enables new APIs out of the box provided by
	LibreSSL 2.7.1 and higher.

	From Jeremie Courreges-Anglas <jca@openbsd.org>.

2018-07-01 09:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix IMAP UID sequence also in imap_find_new_msgs()

	use just * instead of the rather nonsensical *:* (which davmail happens
	to actually barf at).

	amends 72be55b0 (and 0a5a8479).

2018-04-08 16:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	fix uidvalidity recovery with really long message-id headers

	re-using the file name buffer for the headers wasn't such a great idea,
	as _POSIX_PATH_MAX is only 256, while RFC2822 permits lines up to 1000
	chars. and sure enough, i have a message with a whopping 470-char
	message-id header ...

2017-11-18 08:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix IMAP UID sequence in UIDNEXT determination fallback

	use just * instead of the rather nonsensical *:* (which davmail happens
	to actually barf at).

	amends 72be55b0.

2017-10-15 14:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/util.c:

	make more use of equals()

2017-10-15 14:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, main.c, sync.c, util.c:

	make map_name() interpret empty strings as "no separator"

	empty strings were previously meaningless, and starting with 72c2d695a,
	failure to handle them lead to bogus results when the IMAP hierarchy
	separator is legitimately empty (when the server genuinely supports none
	and none is manually configured). non-null can be asserted more cleanly
	than null-or-non-empty, so change the api like that.
	incidentally, this also removes the need to work around gcc's bogus
	warning in -Os mode.

	problem found by "Casper Ti. Vector" <caspervector@gmail.com>

2017-10-15 14:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	remove pointless conditional in assignment of ctx->delimiter

	amends 72c2d695a.

2017-10-15 09:34  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	add check for perl and its version

2017-10-07 12:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/util.c:

	limit -Wmaybe-uninitialized suppression to gcc >= 4.3

	apple gcc 4.2 complains about the use of the pragma inside a function.
	clang also complains, but because the pragma is entirely unknown to it.

	as neither compiler emits the bogus warning in the first place, there is
	no point in suppressing it anyway.

2017-10-07 12:09  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.h:

	don't forward-declare SSL types any more

	our current project structure precludes the clash between some indirect
	include of ssl.h and our definition of 'S' (or 'M', i don't remember)
	that happened on some system, so there is no need to avoid including it
	any more.

	this avoids complaints from some more picky compilers, as re-defining
	typedefs (even to the same thing) is illegal before C11.

2017-10-07 12:46  Oswald Buddenhagen <ossi@users.sf.net>

	* .gitignore:

	git-ignore tar ball signatures

2017-10-07 12:17  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	bump version

2017-10-01 12:59  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	adjust dist-hook to syntax change in .gitignore

	don't try to delete files in / ...

	amends 46e792c3d.

2017-10-01 08:44  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am, mbsync-get-cert:

	rename get-cert => mbsync-get-cert

	to avoid undue namespace pollution. inspired by debian.

2017-04-09 08:40  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	make sync records with stray TUID non-fatal

	while the situation indicates an internal error, it is harmless in
	itself. also, printing some more information may help identify the
	problem.

2017-08-11 07:20  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/config.c, compat/isync.h, compat/main.c,
	  drv_imap.c, mbsync.1, socket.c, socket.h:

	prune SSL 2 support

	OpenSSL actually did that a while ago already, so this was dead code.

2017-10-01 08:40  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	another fix for -Wimplicit-fallthrough (new on master)

2017-09-23 10:52  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	update debian packaging

2017-09-23 10:32  Alessandro Ghedini <ghedo@debian.org>

	* src/drv_imap.c:

	Fix spelling of error messages

2017-10-01 08:04  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, compat/isync.h, compat/main.c, main.c,
	  socket.c:

	fixes for -Wimplicit-fallthrough

2017-10-01 06:15  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	bump version

2017-08-19 11:22  Helmut Grohne <helmut@subdivi.de>

	* configure.ac:

	use autoconf's built-in pkg-config support for OpenSSL

	the hand-crafted suppport did not work with cross-builds.

2017-08-11 06:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/config.c, compat/isync.1, drv_imap.c, mbsync.1:

	enable TLS 1.1 and 1.2 by default

	there is no reason not to, and debian even disabled 1.0 globally,
	because it's (theoretically) too insecure in some contexts (BEAST
	attack).

	in the compat wrapper, the UseTLSv1 option has been re-interpreted as
	v1.x, to avoid adding new options.

2017-08-05 18:28  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	bump version

2017-08-05 18:24  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	mention the need for renaming Maildir files upon move

	mu4e config line offered by Ben Maughan <benmaughan@gmail.com>.

2017-07-30 16:37  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	fix spurious decompression errors

	while that's just bad api, inflate() can return Z_BUF_ERROR during
	normal operation.

	contrary to the zpipe example and what the documentation implies,
	deflate() actually isn't that braindead. add respective comments.

	REFMAIL: CALA3aExMjtRL0tAmgUANpDTnn-_HJ0sYkOEXWzoO6DVaiNFUHQ@mail.gmail.com

2017-07-30 11:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	improve zlib error reporting

	zlib is not exactly thorough about always populating z_stream->msg, so
	fall back to the error code if necessary.

2017-06-21 07:33  Patrick Steinhardt <ps@pks.im>

	* src/socket.c:

	socket: use next addrinfo if opening socket fails

	The `socket_connect_one` function previously did an `exit(1)` when
	encountering any errors with opening the socket. This would break
	connecting to a host where multiple possible addrinfos are returned,
	where the leading addrinfos are in fact impossible to connect to. E.g.
	with a kernel configured without support for IPv6, the `getaddrinfo`
	call may still return a hint containing an IPv6 address alongside
	another hint with an IPv4 address. Creating the socket with the IPv6
	address, which will cause an error, lead us to exiting early without
	even trying remaining hints.

	While one can argue that the user should have compiled without HAVE_IPV6
	or used an appropriate DNS configuration, we can do better by simply
	skipping over the current addrinfo causing an error. To do so, we split
	out a new function `socket_connect_next`, which selects the next
	available address info and subsequently calls `socket_connect_one`
	again. When no hints remain, `sock_connect_one` will error out at that
	point.

2017-05-14 07:42  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	fix 'make log' with non-default git config format.pretty

	suggested by Aaron Jensen <aaronjensen@gmail.com>.

	REFMAIL: CAHyO48z0DcoFPC8rCNAL38oxVQtZNKifVd-NEF3sp1EfR-GgxQ@mail.gmail.com

2017-05-14 07:37  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	fix build without BDB

	amends 83ebe902.

	REFMAIL: CAHyO48z0DcoFPC8rCNAL38oxVQtZNKifVd-NEF3sp1EfR-GgxQ@mail.gmail.com

2017-03-21 19:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, driver.h, drv_imap.c, drv_maildir.c,
	  drv_proxy.c, sync.c, util.c:

	make UIDs unsigned

	complies with the IMAP spec, thus removing the (not really) arbitrary
	limitation to INT_MAX for UIDs.

2017-04-02 15:21  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	delay assignment of TUID when propagating messages

	go back to assigning TUIDs only right before actually propagating them.
	this avoids spurious "TUID lost" warnings.

2017-03-11 12:20  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, run-tests.pl, sync.c:

	move away from magic UIDs in the sync state

	the only legitimate "deviant" UID is zero, meaning "no message". this
	can be futher qualified by additional flags in the sync record, rather
	than using magic values for the UID. in fact, the zero UID (so far
	meaning only "expunged") was already optionally qualifed with "expired".

	as a side effect, driver->store_msg() now returns 0 instead of -2 for
	unknown UIDs. this was a hack to avoid translating the value later
	on, but it made the api horrible, and now it's superflous in the first
	place.

2017-04-01 15:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	split off ephemeral sync record state to a separate member

	this allows us to simplify logging of expiration, as we now can just log
	the entire persistent state instead of fiddling with bits.

2017-03-19 10:53  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, main.c, run-tests.pl, sync.c:

	autotest: implement much more thorough resumption verification

	the test will now make a test run for every journaled step, both right
	before and right after the logging.

2017-03-29 11:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: pre-assign all UIDs of the test messages

	this ensures stable results when the boxes are used with different
	OPEN_FLAGS (which will happen in a subsequent commit), at the negligible
	cost of removing the implicit test of the maildir driver's ability to
	enumerate new messages.

2017-04-02 12:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: .gitignore, Makefile.am, common.h, driver.h,
	  drv_imap.c, drv_maildir.c, drv_proxy.c, drv_proxy_gen.pl,
	  main.c, mbsync.1, sync.c:

	introduce driver call debugging

	do that by wrapping the actual stores into proxies.

	the proxy driver's code is auto-generated from function templates, some
	parameters, and the declarations of the driver functions themselves.
	attempts to do it with CPP macros turned out to be a nightmare.

2017-03-24 18:24  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	let driver_t::openbox_box() return the UID validity

	... and make 'uidvalidity' private to the drivers.

2017-01-29 14:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, sync.c:

	use a #define for invalid UIDVALIDITY

2017-03-24 17:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	introduce get_uidnext() driver callback

	... and make 'uidnext' private to the imap driver.

2017-03-26 16:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	let driver_t::find_new_msgs() return the list of messages

	consistently with driver_t::load_box().

2017-03-24 17:09  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	let driver_t::load_box() return the list of messages

	... and make 'msgs', 'count', and 'recent' private to the drivers.

2017-03-24 16:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, main.c:

	let driver_t::list_store() return the list of boxes

	... and make 'boxes' and 'listed' private to the drivers.

2017-03-24 16:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	factor out transform_refcounted_msg_response()

	the missing cross of transform_refcounted_box_response() and
	transform_msg_response().

2017-03-24 15:56  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make struct imap_cmd_refcounted_state "abstract"

	take the callback out of it, so it can be individualized.
	so far, this only increases code size ...

2017-03-24 14:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	don't mess with the driver's mailbox list from outside

	the api specifies that the list remains owned by the driver, so poking
	around in it is ugly and risky.

2017-03-24 13:18  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	make driver_t::prepare_load_box() return the final options

	... and make 'opts' private to the drivers.

2017-03-24 13:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	introduce get_box_path() driver callback

	... and make 'path' private to the maildir driver.

2017-03-21 18:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, main.c, sync.c:

	make set_bad_callback() a proper driver_t entry

	... and make the pointers private to the drivers.

2017-03-19 12:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, drv_proxy.c,
	  main.c, sync.c:

	provide a proper getter callback for driver capabilities

	that way driver_t contains only callbacks.

2017-03-19 12:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, main.c, sync.c:

	prepend "get_" to getters in driver_t

	this makes it callbacks consistently start with a verb.

2017-04-02 12:04  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: run-tests.pl, sync.c:

	rewrite tracking of highest expired UID

	so far, we tracked the slave side, and calculated the master side on the
	fly. that complicated things unnecessarily.

2017-03-10 16:40  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	streamline syncing of old entries

	the order of the conditionals was purely historical (pre 4ec56f8cf, anno
	2005) and hard to follow, as were the comments.

2017-01-29 14:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	sort uid exception list in a smarter place

	do it closer to where it is populated. that way the debug output is
	sorted, and we don't sort the list if it's known to be empty.

2017-01-28 18:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	add fallbacks for determining UIDNEXT

	if the server sends no UIDNEXT, do an initial FETCH to query the UID of
	the last message.

	same if the server sends no APPENDUID.

	this allows us to remove the arbitrary limitation of the UID range to
	INT_MAX, at the cost of additional round-trips.

2017-03-21 17:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, main.c:

	fix repeated listing of same Store with different flags

	multiple Channels can call driver_t::list_store() with different LIST_*
	flags. assuming the flags are actually taken into consideration, using a
	single boolean 'listed' flag to track whether the Store still needs to
	be listed obviously wouldn't cut it - if INBOX does not live right under
	Path and the Channels used entirely disjoint Patterns (say, * and
	INBOX*), the second Channel in a single run (probably a Group) would
	fail to match anything.

	to fix this, make store_t::listed more granular. this also requires
	moving its handling back into the drivers (thus reverting c66afdc0),
	because the actually performed queries and their possible implicit
	results are driver-specific.

	note that this slightly pessimizes some cases - e.g., an IMAP Store with
	Path "" will now list the entire namespace even if there is only one
	Channel with Pattern "INBOX*" (because a hypothetical Pattern "*" would
	also include INBOX*, and the queries are kept disjoint to avoid the need
	for de-duplication). this isn't expected to be a problem, as listing
	mailboxes is generally cheap.

2017-03-21 14:12  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	factor out listing Maildir++ Stores

	Maildir++ is sufficiently different from the other SubFolder styles to
	justify a separate function; the resulting code duplication is minimal,
	but the separated functions are a lot clearer.

2017-03-21 13:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	fix exclusion of bogus "INBOX.*" folders in Maildir++

	this also adds code which avoids that the message about excluding the
	mailbox is printed multiple times - this could happen with Maildir++, as
	the hierarchy is flattened.

	amends 0f24ca31b.

2017-03-19 19:21  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	make "Patterns *" match INBOX* in Maildir++ Stores

	this also has the side effect that we won't fail to include INBOX itself
	when Inbox is nested under Path when using other SubFolder styles
	(regression introduced with Maildir++ support in 0f24ca31b).

	REFMAIL: 1489492069.2148187.910409864.7727F9FC@webmail.messagingengine.com

2017-03-19 17:08  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	make help screen print some more compile time options

2017-03-04 11:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	de-obfuscate cmd_sendable()

	split the monster conditional and add comments.

2017-03-30 17:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, run-tests.pl:

	add comments

2017-03-30 18:04  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix sync resumption with aborted entries

	we need a separate log entry type which does proper mmaxxuid tracking.

	while moving code around, this also removes a redundant debug statement.

	amends b1842617.

2017-03-30 17:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	remove nonsensical statement from journal replay of aborted entries

	at this stage, entries cannot possibly have messages assigned to them,
	so trying to unlink them makes no sense.

	amends b1842617.

2017-03-30 17:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix sync resumption with re-newed messages

	the UID of the entries needs to be bumped from -1 to -2, as otherwise
	the resumed run would see a TUID in a sync entry which may not have one.

2017-03-30 17:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't emit redundant flag updates for re-newed messages

2017-03-19 10:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix maxuid tracking

	newmaxuid represents the highest UID for which a sync entry was created,
	while maxuid represents the end of the range which is guaranteed to have
	been propagated. that means that the former needs to be instantly
	incremented (and logged), while the latter must not be touched until the
	entire new message sync completes. this matters particularly in the case
	of resuming an interrupted run, where sync entry creation must resume
	exactly where it left off, while loading the box must use the old limit
	to ensure that all messages are available for actual propagation.

2017-03-31 10:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	de-duplicate journal replay somewhat

	we've been using indices to separate master/slave state for a long time,
	so there is no point in using pairs of matching brackets to signify the
	side in the journal. instead, use somewhat descriptive letters (S[een],
	F[ind], T[rashed]) and the index itself.

2017-04-02 13:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, config.h, drv_imap.c, drv_maildir.c,
	  socket.h, tst_timers.c:

	use typedefs for structs more

	makes the code more compact (and consistent, as typedefs were already
	used in some places).

2017-04-02 13:24  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	factor out jFprintf()

2017-03-29 13:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix signedness of 'nex' variables

	they are derived from srec->status, which is unsigned. for not
	understood reasons, the compiler complains only after extending status
	to a full unsigned int.

	on the way, localize the declarations.

2017-04-02 10:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c:

	don't use strncpy() to copy TUIDs

	latest since 77acc268, the code prior to these statements ensures that
	the full length is available, so just use memcpy(). the code for
	comparing TUIDs uses memcmp() anyway.

2017-03-26 19:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: improve valgrind integration

	introduce recognition of $USE_VALGRIND to run all mbsync invocations
	through valgrind.

	this also removes the seemingly purposeless --log-fd=3 indirection.

2017-03-29 14:31  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: write logs to files

	they can get long, and having actual files also helps with diffing.

2017-03-29 14:24  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: factor out readfile() function

2017-03-14 13:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: de-duplicate error reporting paths

2017-03-14 13:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: print consistent information for journal replay failures

2017-03-14 13:20  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: don't print expected result if the mbsync run itself fails

	there isn't an actual result to compare with anyway.

2017-03-31 11:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: de-duplicate: use print*() in show*()

	this actually adds some (minimal) transformation overhead, but it makes
	the relationship clearer.

2017-03-14 14:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: determine path of mbsync prior to chdir()

	that allows tmp/ to be a symlink to a ramdisk.

2017-03-14 10:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: use warnings

2017-03-14 10:09  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	autotest: remove stray close() call from printstate()

2017-03-11 12:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't populate sync record map with invalid UIDs

	this would obviously just bloat the hash with nonsense, slowing down the
	actual lookup later.

2017-02-15 10:45  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	fix mislabeling of test

2017-01-28 17:26  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make -DN print also the sent data

2017-02-15 16:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't arbitrarily limit UIDs to a billion, part 2

	imap_find_new_msgs() had the same fixed limit as imap_load_box().

	amends 815822d8.

2016-12-18 19:50  Oswald Buddenhagen <ossi@users.sf.net>

	* README, src/driver.c, src/driver.h, src/drv_imap.c,
	  src/drv_maildir.c, src/mbsync.1, src/sync.c:

	implement Message-Id based UIDVALIDITY recovery

2016-12-18 20:22  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	don't fetch message size unless necessary

	when syncing flags but not re-newing non-fetched messages, there is no
	need to query the message size for all messages, as the old ones are
	queried only for their flags.

2016-11-06 16:26  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	some reshuffling in maildir_scan() for clarity

2016-12-18 20:24  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make fetching of partial UID ranges more flexible

	instead of a single hard-coded branch, use a generic method to split
	ranges as needed.

	this is of course entirely over-engineered as of now, but subsequent
	commits will make good use of it.

2016-11-05 17:33  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	factor out app_cr

2016-11-05 17:33  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	factor out copy_msg_convert()

2016-11-05 17:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	factor out copy_msg_bytes()

2016-12-29 13:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, drv_imap.c:

	make more use of strnlen()

	includes adding the so far superfluous prototype for the replacemnt to
	common.h.

2016-12-29 14:08  Oswald Buddenhagen <ossi@users.sf.net>

	* src/util.c:

	make use of memchr() in strnlen() replacement after all

	turns out the comment advising against it was bogus - unlike for
	memcmp(), the standard does indeed prescribe that the memchr()
	implementation may not read past the first occurrence of the searched
	char.

2016-12-29 14:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/util.c:

	adjust return type of strnlen() replacement

	it doesn't really matter, but it's nicer to stay consistent with the
	official prototype.

2016-12-29 13:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, sync.c:

	standardize on 'int' for message sizes

	that's what the sources already assumed anyway. size_t is total
	overkill, as No Email Ever (TM) will exceed 2GiB.

	this also fixes a harmless format string warning in 32 bit builds.

2016-11-13 21:20  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	print actually read TUID in debug message

2016-11-13 21:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	null-terminate lines read from state file & journal

	makes the subsequent code less convoluted.

2016-11-06 16:23  Oswald Buddenhagen <ossi@users.sf.net>

	* src/common.h:

	mark string_list_t as packed

	otherwise we'll regularly over-allocate due to the struct's stride.

2016-12-18 20:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, sync.c, util.c:

	make more use of shifted_bit()

	technically, this introduces a redundant AND, but the compiler is smart
	enough to prove that (((A & M) ^ B) & M) == ((A ^ B) & M).

2016-11-06 16:22  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c:

	make more use of nfstrndup()

2016-11-12 13:15  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	document some additional uses for PipelineDepth

2016-12-11 11:09  Oswald Buddenhagen <ossi@users.sf.net>

	* src/util.c:

	silence bogus [-Wmaybe-uninitialized] with -O0/-O1/-Os

2016-12-04 10:23  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	accept NAMESPACE responses without hierarchy delimiter

	RFC2342 states that the delimiter may be NIL, which some servers
	apparently actually make use of.

	REFMAIL: CAM0xXk_FQ83CPrd37iQCMKtc1B2P8=u-r5jX0n2WE5Y+3483nQ@mail.gmail.com

2016-12-04 10:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	validate NAMESPACE response earlier

	... and don't silently fail later on.

2016-12-03 18:18  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	inform user if LOGIN was skipped because of missing SSL

	'AuthMechs *' technically includes LOGIN, so it is a bit unintuitive
	when it's still not used.

2016-12-03 19:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make * not match LOGIN even in non-SSL builds

	this is consistent with the plain text transmission warning below.

2016-12-03 19:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	be more helpful when no SASL mechanisms are available

2016-12-03 19:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix LOGIN in SASL builds

	if AuthMechs includes more than just LOGIN and the server announces any
	AUTH= mechanism, we try SASL. but that can still fail to find any
	suitable authentication mechanism, and we must not error out in that
	case if we are supposed to fall back to LOGIN.

2016-12-03 13:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix LOGIN in non-SASL builds

	specifically, if AuthMechs included more than just LOGIN (which would be
	the case for '*') and the server announced any AUTH= mechanism, we'd
	immediately error out upon seeing it, thus failing to actually try
	LOGIN.

2016-11-20 10:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't arbitrarily limit UIDs to a billion

	the number was chosen to make queries more comprehensible when the
	server sends no UIDNEXT, but it appears that such insanely large UIDs
	actually show up in the wild. so send 32-bit INT_MAX instead.

	note that this is again making an assumption: that no server uses
	unsigned ints for UIDs. but we can't sent UINT_MAX, as that would break
	with servers which use signed ints. also, *we* use signed ints (which is
	actually a clear violation of the spec).

	it would be possible to special-case the range [1,inf] to 1:*, thus
	entirely removing arbitrary limits. however, when the range doesn't
	start at 1, we may actually get a single message instead of none due to
	the imap uid range limits being unordered. this gets really nasty when
	we need to issue multiple queries, as we may list the same message
	twice.

	a reliable way around this would be issuing a separate query to find the
	actual value of UID '*', to make up for the server not sending UIDNEXT
	in the first place. this would obviously imply an additional round-trip
	per mailbox ...

2016-11-04 20:23  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	wrap message trashing into simple transactions

	trashing many messages at once inevitably overtaxes m$ exchange, and the
	connection breaks. without any progress tracking, it would restart from
	scratch each time, which would lead to a) it never finishing and b) many
	copies of the messages in the trash.

	full transactions as we do for "proper" syncing would be over the top,
	as it's not *that* bad if some messages get duplicated in the trash. so
	we record only the messages for which trashing completed, thus allowing
	some overlap between the attempts.

2016-11-05 17:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	use a temporary for sanity

2016-11-04 20:09  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, drv_imap.c, drv_maildir.c, sync.c, util.c:

	pre-sort exception list passed to driver->load_box()

	... and use that to optimize the maildir driver somewhat.

2016-11-04 20:48  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac, src/common.h, src/driver.h, src/drv_imap.c,
	  src/drv_maildir.c, src/sync.c, src/util.c:

	abstract growable arrays somewhat

	... and sneak in a C99 requirement on the way. just because.

2016-11-04 15:21  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, mbsync.1:

	fix SubFolders style Maildir++

	turns out i misread the spec in a subtle way: while all other folders
	are physically nested under INBOX, the IMAP view puts them at the same
	(root) level. to get them shown as subfolders of INBOX, they need to
	have _two_ leading dots.

	this also implies that the Maildir++ mode has no use for a Path, so
	reject attempts to specify one.

2016-07-24 09:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	fix build with openssl 1.1

	they finally made their structs opaque, and provided proper getters.

2016-07-24 09:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	prune obsolete #include

	hmac.h was needed only for the cram-md5 implementation.

2016-05-21 11:08  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	fix server certificate validation error reporting

	use the right function to decode the error code.

	found by Andrés Ramírez <sunshavi@fastmail.fm>.

2015-11-08 11:19  Oswald Buddenhagen <ossi@users.sf.net>

	* .gitignore, src/.gitignore, src/compat/.gitignore:

	improve .gitignore files

	- add missing entries
	- remove redundant entries which are inherited from parent dirs
	- mark dirctories as such
	- anchor specific files

2015-11-06 07:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/isync.1, compat/isyncrc.sample, mbsyncrc.sample:

	fix CertificateFile docs & samples

	the mbsync manual says explicitly that the system's default certificate
	store should *not* be specified.
	however, the isync manual talked about CA certificates, which is (and
	always was) exactly wrong.
	also adjust both .sample rc files.

2015-09-27 10:13  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	don't crash when dns lookup fails (ipv6 path)

	we call socket_connect_bail() when getaddrinfo() failed, so it must deal
	with no addrinfo being there yet.

2015-09-27 09:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	remove legacy (bsd-style) locking

	flock() may be implemented via fcntl(), which may cause the process to
	deadlock itself when trying to apply both types of locks. this is the
	case even on linux when the file lives on NFS.

	it's unlikely that anything except mbsync would try to access the
	.uidvalidity files anyway, so there is no point in trying to be
	compatible with anything else ...

	REFMAIL: uddy4g589ym.fsf@eismej-u14.spgear.lab.emc.com

2015-09-06 20:56  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't attempt to issue LOGOUT on bad stores

	amends 9d22641b.

2015-09-06 19:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	de-duplicate cleanup of name-related data in error paths

	"name" being both the ipv6 dns info and our own socket label.

	sort-of amends 9d22641b.

2015-09-07 10:23  Oswald Buddenhagen <ossi@users.sf.net>

	* README, src/mbsync.1:

	mention safety of concurrent access; wording improvements

2015-09-01 12:21  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, drv_imap.c, sync.c, util.c:

	tolerate case changes in X-TUID header name

	it is legal for an email system to simply change the case of rfc2822
	headers, and at least one imap server apparently does just that.
	this would lead to us not finding our own header, which is obviously not
	helpful.

	REFMAIL: CA+fD2U3hJEszmvwBsXEpTsaWgJ2Dh373mCESM3M0kg3ZwAYjaw@mail.gmail.com

2015-08-08 17:45  Anton Khirnov <anton@khirnov.net>

	* src/: drv_imap.c, mbsync.1, socket.c, socket.h:

	add support for sending a TLS client certificate

2015-07-18 16:17  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	fix configure for static libdb, libnsl, and libsocket

	the right variable to put libraries into is LIBS, not LDFLAGS.

	REFMAIL: CAABPU68s3uy0Gv-vfAGzeNn0s5Ow--+p+y8W7xE7US_7iXpdjw@mail.gmail.com

2015-05-24 16:20  Oswald Buddenhagen <ossi@users.sf.net>

	* README:

	mention m$ exchange MOVE workaround in compat section

2015-05-24 16:20  Oswald Buddenhagen <ossi@users.sf.net>

	* README:

	list more deps (sasl and zlib)

2015-05-24 16:20  Oswald Buddenhagen <ossi@users.sf.net>

	* README:

	less technical info

	no point in listing IMAP extensions in the README

2015-05-23 09:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, main.c:

	make it possible to specifiy Pattern INBOX* with no Path defined

	that pattern may very well expand to INBOXNOT, which would naturally
	live under Path, so we need to look into the Path. of course, this
	actually makes sense only if there *is* a Path, and complaining about
	it being absent is backwards.

2015-05-23 08:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	remove support for multi-char imap path delimiters again

	the idea that this is even possible was based on an incomplete reading
	of the imap spec.

	however, the infrastructure for supporting multi-char delimiters as such
	is retained, as the Flatten option can be used with them.

2015-05-24 09:37  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, main.c, socket.c:

	make server connection a cancellable operation

	this entails splitting drv->open_store() into alloc_store() and
	connect_store().

2015-05-17 14:28  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	validate Path earlier

	we cannot know whether it will be needed later, but we can validate it
	if it's set.

2015-05-17 10:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: main.c, sync.h:

	prune dead SYNC_FAIL_ALL define

2015-05-17 15:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't make bogus attempts at enabling compression

	recycling server connections skips everything up to setting up the
	prefix (Path/NAMESPACE). "everything" should obviously include enabling
	compression, as that must be done at most once per connection.

2015-05-09 16:00  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	bump version

2015-05-09 15:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	rename misnamed functions concerning sending imap commands

	cmd_submittable() => cmd_sendable()
	cancel_submitted_imap_cmds() => cancel_sent_imap_cmds()

	the sequence is exec -> submit -> send.

2015-05-09 17:18  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.c, socket.h:

	ensure direct exit after calling back

	any structures may be invalid after callback invocation.

	this has the side effect that the socket write callback now returns
	void, like all other callbacks do.

2015-05-09 17:17  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.c, socket.h:

	fix socket_write() recursion

	the synchronous writing to the socket would have typically invoked the
	write callback, which would flush further commands, thus recursing.

	we take the easy way out and make it fully asynchronous, i.e., no data
	is sent before (re-)entering the event loop.

	this also has the effect that socket_write() cannot fail any more, and
	any errors will be reported asynchronously. this is consistent with
	socket_read(), and produces cleaner code.

	this introduces a marginal performance regression: the maildir driver is
	synchronous, so all messages (which fit into memory) will be read before
	any data is sent. this is not considered relevant.

2015-05-09 15:12  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix #ifdefs around AuthMech & RequireCRAM

	these options don't depend on HAVE_LIBSSL.

2015-05-09 15:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	mask AUTHENTICATE PLAIN commands in error output as well

	amends bd0f3af5.

2015-05-02 16:59  Felix Janda <felix.janda@posteo.de>

	* configure.ac:

	Add configure option for zlib

2015-05-08 08:20  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1:

	add DisableExtension option to work around (server) bugs

2015-05-01 17:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, mbsync.1, mbsyncrc.sample, sync.c:

	support verbatim and real Maildir++ subfolder naming styles

	the legacy style is a poorly executed attempt at Maildir++, so introduce
	the latter for the sake of completeness. but most users will probably
	just want to use subfolders without any additional dots.

2015-05-01 15:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	make maildir_list_recurse() recursion less convoluted

	move the unconditional addition of INBOX out ouf the function.
	this makes it possible to move the folder check and addition to the
	listing before the recursion, which seems clearer.

2015-05-01 11:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	pass a maildir_store_conf_t to maildir_validate_path()

	casting early on makes the code clearer.

2015-05-01 18:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	make flags in pattern debugging non-cumulative

2015-05-01 16:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	use \fB and \fI consistently, take 2

	\fB means literal, while \fI means placeholder, value for placeholder,
	or emphasis.

2015-05-01 09:55  Oswald Buddenhagen <ossi@users.sf.net>

	* README, configure.ac:

	fix consistent misspelling of Berkeley

2015-05-01 09:48  Oswald Buddenhagen <ossi@users.sf.net>

	* README, configure.ac:

	the minimum required bdb version is in fact 4.1

	this is the one that introduced the transaction argument to db->open().

2015-05-01 09:45  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	make the bdb check actually check for a linkable library

	it only checked whether the header is compilable.

	amends e1d0ea8a1.

2015-04-26 18:54  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, main.c:

	make skipping of failed stores more thorough

	in the case of imap stores, the failure is bound to the server config,
	not just the store config.

	that means that the storage of the failure state needs to be private to
	the driver, accessible only through a function.

2015-04-06 14:49  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1, socket.c, socket.h:

	add socket timeout handling

2015-04-26 16:15  Oswald Buddenhagen <ossi@users.sf.net>

	* src/util.c:

	remove caching of current time

	it's too hard to reliably predict when invalidation will be necessary.

2015-04-26 16:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/util.c:

	don't get system time when dealing with null timers

	they fire immediately regardless of wall time, so we can save some
	pointless syscalls.

2015-04-26 10:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	fix -DN not implying -Dn

2015-04-18 09:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	make it possible to nest maildir Path under Inbox

	simply make the code symmetrical to the inverse case.

	note that the result will be sort of awkward, as the folders under Path
	(and thus the subfolders of Inbox) don't start with a dot, while the
	subfolders of these folders do. this needs to be addressed separately.

2015-04-18 09:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	make handling of Inbox-in-Path nesting less obfuscated

	when we run into Inbox while listing Path, check whether Inbox is being
	listed anyway, and just skip it if so, instead of listing it right away
	and resetting LIST_INBOX (and thus having a calling order dependency).

2015-04-18 08:54  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't list IMAP Path under INBOX twice

	if NAMESPACE is "INBOX.", listing INBOX recursively will already include
	it.

	REFMAIL: 1890363108.1020695.1428757117731.JavaMail.yahoo@mail.yahoo.com

2015-04-13 07:17  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	fix uninitialized variable warning

	the returned UID is not used when trashing messages, but we still
	shouldn't just return an undefined value.

2015-04-11 18:06  Reimar Döffinger <Reimar.Doeffinger@gmx.de>

	* README, configure.ac, src/Makefile.am,
	  src/compat/Makefile.am, src/drv_maildir.c:

	Make Berkley DB an optional dependency.

	It doesn't seem necessary for any of the basic functionality.

	Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>

2015-04-09 08:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix SASL, take 2

	USER (the authorization identity) specifies whom to act for.
	AUTHNAME (the authentication identity) specifies who is acting (and
	thus whose PASS is being used).
	USER is derived from AUTHNAME if omitted, but apparently the
	GSS-API module automatically adds the REALM, which is not helpful.

	it appears to be common to set both USER and AUTHNAME to the same value,
	so let's just do it as well.

	REFMAIL: 20150407194807.GA1714@leeloo.kyriasis.com

2015-04-03 20:38  Dmitrij D. Czarkoff <czarkoff@gmail.com>

	* src/drv_maildir.c:

	fix crash in maildir_set_msg_flags()

	memcpy(3)'s behavior is undefined when source and destination addresses
	overlap, and it actually crashed on OpenBSD. use memmove() instead.

2015-04-03 12:03  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	add cov-scan target

2015-04-03 11:24  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	bump version

2015-03-30 12:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1:

	don't insert unnecessary linebreaks upon PassCmd invocation

	the PassCmd will be typically non-interactive (or it will use a gui
	password agent), so starting a new line just makes the progress counter
	uglier. so make it configurable and default to no line break.

2015-03-30 12:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	fix crash when no mailboxes match Patterns

	filter_boxes() just returns a null pointer in this case.

	REFMAIL: 20150330121211.GA10315@venus.fritz.box

2015-03-30 10:59  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix SASL PLAIN for User != $USER

	REFMAIL: 87d29mysnx.fsf@ericabrahamsen.net

2015-03-26 17:09  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, main.c, mbsync.1:

	add debugging for main()

	so far, that's mostly mailbox listing

2015-03-23 07:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, drv_imap.c, drv_maildir.c, main.c, mbsync.1,
	  sync.c, util.c:

	revamp console output options

	- the old meaning of -V[V] was moved to -D{n|N}, as these are really
	  debugging options.
	- don't print the info messages by default; this can be re-enabled with
	  the -V switch, and is implied by most debug options (it was really
	  kind of stupid that verbose/debug operation disabled these).
	- the sync algo/state debugging can be separately enabled with -Ds now.

2015-03-28 16:26  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, drv_imap.c, main.c, mbsync.1, sync.c:

	make progress counters global

	which means they are now cumulative, and include channels and boxes.

2015-03-28 16:51  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	pre-calculate channel and box lists (as far as possible)

	... instead of determining them on the fly, because
	- it enables early display of totals (to be used soon)
	- it enables re-use of the data (to be used at some point)
	- the code is less cryptic

	note that we leak the data created in main(), consistently with other
	configuration-related data.

2015-03-26 16:28  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	don't claim that INBOX is absent even if it was not listed

	IMAP defines that INBOX is always present.

2015-03-26 16:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	rework Pattern application

	instead of creating three lists of mailboxes (common, master, slave)
	and deriving the mailbox presence from the list being processed, create
	a single joined list which contains the presence information.
	additionally, the list is sorted alphabetically (with INBOX first),
	which is neater.

2015-03-26 16:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, util.c:

	static my_strndup() => extern nfstrndup()

2015-03-26 13:28  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	make sure that INBOX always exists

	makes the Maildir driver consistent with IMAP.

2015-03-23 19:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't refuse to strip Path just because it's INBOX/

	no ambiguity can result from this, so there is no reason to treat
	sub-folders of INBOX differently from any other namespace.

2015-03-23 17:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	mask AUTHENTICATE PLAIN commands in debug output

	they are almost as bad as LOGIN.

2015-03-22 12:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	remove double "Logging in ..." when using legacy LOGIN

2015-03-23 18:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	fix out-of-Path INBOX never being matched by Patterns

	"(null)I" really doesn't cut it.

	amends cf0f32f8.

2015-03-22 10:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsyncrc.sample:

	escape backslashes in PassCmd examples

	the config parser strips one level of backslash escapes.

2015-03-21 11:18  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix bogus "unexpected command continuation request"

	it helps if the code actually does what the comment above it claims.
	clarify it a bit, so i don't get stupid ideas again.

	This reverts commit cf6a7b4d182d2fe82f7371af9e5a857818f3d02d.

2015-03-07 16:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix chaining of COMPRESS invocation

	it was bound to the use of NAMESPACE, which made no sense at all.

2015-02-15 17:13  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, config.c, driver.h, drv_imap.c,
	  drv_maildir.c, main.c, mbsync.1, socket.c, socket.h, sync.c:

	soft-limit peak memory usage

	propagating many messages from a fast store (typically maildir or a
	local IMAP server) to a slow asynchronous store could cause gigabytes of
	data being buffered. avoid this by throttling fetches if the target
	context reports memory usage above a configurable limit.

	REFMAIL: 9737edb14457c71af4ed156c1be0ae59@mpcjanssen.nl

2015-02-15 11:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/config.c:

	complain about excess values supplied to options

2015-02-15 11:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	handle clean SSL connection shutdowns

	some servers actually bother to close down the SSL connection before
	closing the socket.

	this fixes the spurious "unhandled SSL error 6" messages.

	REFMAIL: 20150120114805.GA17586@leeloo.kyriasis.com

2015-02-15 11:15  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.c, socket.h:

	refactor socket EOF handling

	handling EOF already at the socket level isn't a very good idea - it
	breaks the abstraction, and makes implementing sane semantics hard.

2015-02-14 13:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	fix crash on shutdown of compressed connection

	the callback may destroy the socket, so it is very unwise to use it for
	buffering the return value. use a temporary instead.

2015-02-14 12:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	handle clean shutdown of zlib stream

	the server can actually close the zlib stream before closing the socket,
	so we need to accept it.

	we don't do anything beyond that - the actual EOF will be signaled by
	the socket, and if the server (erroneously) sends more data, zlib will
	tell us about it.

	REFMAIL: 1423048708-975-1-git-send-email-alex.bennee@linaro.org

2015-02-15 10:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	don't try to flush if there is nothing to flush

	zlib reports Z_BUF_ERROR when a flush is attempted without any activity
	since the previous flush (if any). while this is harmless as such,
	discerning the condition from genuine errors would be much harder than
	avoiding the pointless flush in the first place.

	REFMAIL: eb5681612f17be777bc8d138d31dd6d6@mpcjanssen.nl

2015-02-15 10:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, drv_maildir.c:

	introduce and use pending_wakeup()

	so we don't need to peek into internal data structures.

2015-01-03 23:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, main.c:

	deal sensibly with permanent errors

	don't retry dead Stores for every Channel.

	this also introduces a state for transient errors (specifically, connect
	failures), but this is currently unused.

2015-01-01 18:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	unify .isyncuidmap.db handling with that of .uidvalidity

	that is, open the database on demand when locking and close it again
	when unlocking.

2015-01-01 18:18  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	refactor maildir_set_uid() and maildir_store_uidval()

	the latter now handles both the db and the plaintext file, so the former
	can make use of it.

2015-01-01 17:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	rename some *uid*() => *uidval*() to better reflect their function

2015-01-01 15:49  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	lock .uidvalidity on demand

	a maildir re-scan doesn't need to lock it if it doesn't need to allocate
	any new uids.

2015-01-01 12:24  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	delay unlocking of .uidvalidity

	it's wasteful to re-lock all the time. instead, unlock in the background
	after 1-2 seconds of inactivity.

2014-12-29 01:08  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, driver.h, drv_imap.c, drv_maildir.c, main.c,
	  mbsync.1, sync.c, sync.h:

	add support for propagating folder deletions

2015-01-17 14:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	don't make intermediate directories proper maildirs

	"phantom" mailboxes waste time on syncing. furthermore, mutt's mailbox
	navigator provides no means to enter subfolders of maildirs.

2014-12-29 01:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	deal sensibly with incomplete maildir directories

	a directory is no mailbox unless it contains a cur/ subdir.
	but if that one is present, create new/ and tmp/ if they are missing.

	this makes it possible to resume interrupted maildir creations.

2014-12-29 01:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	factor out maildir_clear_tmp()

2014-12-30 14:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: main.c, sync.c, sync.h:

	supplement open_box() with box existence information from list_store()

	there is no point in trying to open a non-existing box before trying to
	create it.

2014-12-29 00:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	split create_box() off from open_box()

	this allows us to do something else than creating missing boxes
	depending on circumstances. hypothetically, that is.

2015-01-03 22:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	open the mailboxes after loading the sync state

	this allows us to react differently to a box'es absence depending on the
	state. hypothetically, so far.

2014-12-27 22:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	lock sync state lazily

	don't try to lock it until we actually read or write it.
	the idea is to not fail with SyncState * if we tried to load the state
	before selecting a non-existing mailbox. this is ok, because if the
	mailbox is missing, we obviously have no sync state pertaining to it,
	either.
	as a side effect, this allows simplifying an error path.

2014-12-27 22:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, main.c, sync.c:

	split off open_box() from select_box()

	aka prepare_paths() reloaded. we'll need it in a moment.

2014-12-27 22:13  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	factor out {prepare,lock,save,load}_state()

2014-12-14 16:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/config.c:

	de-duplicate handling of box operation (create & expunge) options

	loops work just fine ...

2014-12-27 21:13  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, main.c, sync.c:

	make some driver function names more descriptive

2014-12-14 11:36  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	rename driver::prepare_opts() => prepare_load()

	... and move it to the right place in the structure and fix the doc to
	not claim that it is called before select().

2014-12-13 17:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	disable use of LITERAL+ for payloads > 100k

	when LITERAL+ is used, the server has no chance for early rejection of
	messages. this means that the client can upload megabytes for nothing.
	so simply don't use LITERAL+ for big messages. of course this adds
	server roundtrips, but that's tough luck.

	the limit could be arguably higher than 100k (or even configurable).
	i set it to ~2 sec with my fairly average DSL line.

2014-12-13 17:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.c, socket.h:

	fix handling of unsolicited BYE responses

	they can come in at any time, after which we must expect the connection
	to be closed (and not complain about it).

2014-12-13 16:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix treatment of untagged NO and BAD responses

	they aren't possible greeting responses. however, they are warning resp.
	error reports from the server, so print them accordingly.

2014-12-13 11:09  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac, src/Makefile.am, src/drv_imap.c, src/socket.c,
	  src/socket.h:

	added support for IMAP DEFLATE

	initial patch by Jesse Weaver <pianohacker@gmail.com>, but mostly
	rewritten by me.

2014-11-08 14:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: socket.c, socket.h:

	make socket writing buffered

	the primary objective is reducing the number of small SSL packets (which
	are always padded), but fewer syscalls in the non-SSL case should be
	good as well.

2014-10-26 20:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.c, socket.h:

	vectorize socket_write()

	the objective is making the buffer code aware of the total size of a
	write in advance. this commit doesn't take advantage of that yet.

2014-11-30 18:51  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, util.c:

	remove support for faking notifications

	with the existence of timers, this is now superfluous.

2014-11-30 18:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: socket.c, socket.h:

	use null timer instead of faking a socket notification

2014-11-30 17:41  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: Makefile.am, common.h, tst_timers.c, util.c:

	add timers to mainloop

	they are called "wakeups", though, as timer_t already exists in time.h.

2014-11-29 18:15  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, socket.c, socket.h, util.c:

	change socket notifier design

	instead of keeping the structures in an opaque array (which was a shadow
	of the struct pollfd array if poll() was supported), make them directly
	addressable.

	this has the advantage that notifier-altering operations (mostly
	en-/disabling) don't need to look up the structure by file handle each
	time.
	on the downside, data locality in the main loop is worse.
	neither of these have any real effect on performance.

	note that the structures are not allocated separately, but embedded into
	the the parent structure (like sockets already were).

2014-12-07 11:51  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	factor out socket_open_internal()

2014-12-07 12:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: common.h, config.c, driver.h, drv_imap.c,
	  drv_maildir.c, sync.c, sync.h, util.c:

	introduce uchar, ushort & uint typedefs

2015-01-11 13:18  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	skip merges during ChangeLog generation

2015-01-11 13:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	fix UID assignment with some non-UIDPLUS servers

	the seznam.cz IMAP server seems very eager to send UIDNEXT responses
	despite not supporting UIDPLUS. this doesn't appear to be a particularly
	sensible combination, but it's valid nonetheless.

	however, that means that we need to save the UIDNEXT value before we
	start storing messages, lest imap_find_new_msgs() will simply overlook
	them. we do that outside the driver, in an already present field - this
	actually makes the main path more consistent with the journal recovery
	path.

	analysis by Tomas Tintera <trosos@seznam.cz>.

	REFMAIL: 20141220215032.GA10115@kyvadlo.trosos.seznam.cz

2015-01-02 11:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix conditional for early failure in cancel_done()

2015-01-02 10:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	don't leave 2nd store in limbo if opening 1st store fails synchronously

	we can't leave the store FRESH, as otherwise the error handling code
	will assume it is still being opened and will return to the main loop.
	depending on the config this would cause an immediate termination or an
	indefinite wait.

2014-10-26 21:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	remove stray CRLF from AUTHENTICATE continuations

	this re-introduces 6741bc94 (just a bit differently), thus effectively
	reverting fbfcfea5. i suppose this extra CRLF is needed by a broken
	CRAM-MD5 implementation of some server, which is why it was there in the
	original implementation as well. however, it breaks more pedantic
	non-broken servers. if somebody complains, we'll need to add a much
	more sophisticated hack.

2014-10-26 19:17  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.h:

	cleanup dead cram() prototype

2014-12-29 01:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix more memcmp() abuse

	amends 1217193fb and 4f383a807.

2014-11-08 12:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: socket.c, socket.h:

	fix acceptance of trusted SSL certs

	we should make no assumptions about the layout of OpenSSL's certificate
	store, in particular when they are wrong. so copy the interesting part
	instead of "deep-linking" into it.

	this code is uglier than it should be, but OpenSSL's extensive use of
	macros to manage data types would force us to include the ssl headers
	into our headers otherwise, which would be even uglier.

	REFMAIL: <545442CC.9020400@nodivisions.com>

2014-10-25 15:30  Oswald Buddenhagen <ossi@users.sf.net>

	* README, src/common.h, src/config.c, src/drv_maildir.c,
	  src/main.c, src/mbsync.1, src/sync.c:

	introduce FieldDelimiter and InfoDelimiter options

	... for windows fs compatibility.

	the maildir-specific InfoDelimiter inherits the global FieldDelimiter
	(which affects SyncState), based on the assumption that if the sync
	state is on a windows FS, the mailboxes certainly will be as well, while
	the inverse is not necessarily true (when running on unix, anyway).

	REFMAIL: <CA+m_8J1ynqAjHRJagvKt9sb31yz047Q7NH-ODRmHOKyfru8vtA@mail.gmail.com>

2014-10-25 13:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, sync.c:

	move orig_name out of store_t

	it's state specific to the synchronizer.

2014-07-27 16:41  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.c:

	nuke home-grown CRAM-MD5 support

	it was obsoleted by SASL support.
	i deem the additional dependency acceptable when one wants the feature.

2014-07-27 16:41  Oswald Buddenhagen <ossi@users.sf.net>

	* README, configure.ac, src/Makefile.am, src/drv_imap.c,
	  src/mbsync.1:

	add SASL support

	patch initially by Jack Stone <jwjstone@fastmail.fm>,
	cleaned up by Jan Synacek <jsynacek@redhat.com>,
	... and then almost completely rewritten by me. ^^

2014-07-27 17:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	factor out ensure_user() and ensure_password()

2014-07-12 19:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1:

	rework authentication mechanism configuration

	RequireCRAM (another fairly stupid "use if available" option) is now
	deprecated. instead, the AuthMech option can be used to give a precise
	list of acceptable authentication mechanisms (which is currently "a bit"
	short). in particular, this allows *not* using CRAM-MD5 even if it's
	available.

2014-07-27 13:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1, socket.c, socket.h:

	make it possible to disable usage of system cert store

2014-07-27 16:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: mbsync.1, socket.c:

	require Host if SSL is used despite Tunnel

2014-07-27 13:12  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: socket.c, socket.h:

	make SSL certificate verification less arcane

	instead of using a callback which messes with the certificate chain
	verification, simply let OpenSSL ignore errors during that phase and
	check the result only afterwards.

2014-07-12 18:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, config.h, drv_imap.c, mbsync.1, socket.c,
	  socket.h:

	re-design SSL/TLS configuration

	the combinations of the various options made quite a mess. additionally,
	'RequireSSL no' is inherently insecure - "use SSL if available" is plain
	stupid.

	the old options are still accepted, but will elicit a warning.

2014-07-06 08:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.c, socket.h:

	move use_imaps out of server_conf_t

	it doesn't belong there - it's a property of imap_server_conf_t.
	the port setup is now done while reading the config.

	this makes socket.[hc] imap-agnostic.

2014-07-12 11:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/: isync.1, main.c:

	deprecate the compat wrapper

	after a decade, it's about time to phase it out.

2014-07-05 14:37  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	bump version

2014-10-04 16:26  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: driver.h, drv_imap.c, drv_maildir.c, sync.c:

	fix memory management of current mailbox name

	it was a stupid idea to store the pointer to a variable we need to
	dispose in a structure which has its own lifetime.

2014-10-04 15:07  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac, src/common.h, src/compat/config.c,
	  src/compat/isync.h, src/compat/util.c, src/drv_imap.c,
	  src/drv_maildir.c, src/main.c, src/sync.c, src/util.c:

	stop abusing memcmp()

	memcmp() is unfortunately not guaranteed to read forward byte-by-byte,
	which means that the clever use as a strncmp() without the pointless
	strlen()s is not permitted, and can actually misbehave with
	SSE-optimized string functions.

	so implement proper equals() and starts_with() functions. as a bonus,
	the calls are less cryptic.

2014-10-04 11:12  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1:

	permit IMAP Stores with explicitly empty Path

	this is useful if the server sends an unhelpful NAMESPACE like
	"INBOX." (which precludes clean use of Patterns with the real INBOX).

2014-10-04 13:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't attempt to filter LIST response if there is no Path

	we won't filter anything in that case anyway.

2014-10-04 10:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, drv_imap.c, drv_maildir.c:

	permit Maildir Stores without a Path

	it is perfectly reasonable to have a Store which has only an Inbox.

2014-10-04 13:37  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	use resolved Path for initial filtering of LIST response

	otherwise we'd ignore NAMESPACE, and funny things could happen.

2014-10-04 15:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	consider unexpected structure of NAMESPACE fatal

2014-10-04 09:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	ignore INBOX only in Path itself, not its subfolders

	a box foo/INBOX cannot be mistaken for the INBOX, so there is no point
	in filtering these out.

2014-07-12 12:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	use \fB and \fI consistently

	notably, the docu for the Sync option had it mixed up in the
	description.

2014-07-05 21:11  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	complain about RequireSSL with no SSL versions enabled

2014-07-05 21:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	actually use STARTTLS if only TLSv1.1 or TLSv1.2 is enabled

2014-07-05 21:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	clarify error message about missing connection details

2014-07-05 21:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make store/account error messages less redundant

	this will become more relevant when more are added.

2014-07-05 20:53  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	clarify effect of Tunnel on Host and Port

2014-07-05 20:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1:

	don't ignore RequireSSL for PREAUTHenticated connections

	such connections don't support STARTTLS. that is reasonable, as whatever
	makes the connection preauthenticated (typically a Tunnel used to launch
	imapd via a shell login) must already rely on the connection's security.
	consequently, we would not try to use STARTTLS with such connections.
	unfortunately, we'd also skip the RequireSSL check as a side effect.

	this means that a rogue server (via a MITM attack) could simply offer a
	preauthenticated connection to make us not use SSL, and thus bypass
	server authentication. as a result, we could send potentially sensitive
	data to the attacker:
	- with Patterns used, we would send a LIST command which reveals the
	  remote Path setting. this isn't very useful to an attacker. also, IMAP
	  Accounts usually rely on the server-provided NAMESPACE to start with.
	- with Create enabled for the remote Store, we would upload messages
	  from newly appeared local folders. this isn't a very likely situation,
	  unless the attacker manages to convince the victim to move/copy
	  interesting mails to a new folder right before the attack.
	- with Expunge enabled for the local Store, previously synchronized
	  folders would be wiped. however, this would require the attacker to
	  know the correct UIDVALIDITY of each remote folder, which would
	  require incredible luck or convincing the victim to disclose them.
	  the first mismatch would likely tip off the victim.

	in practice, someone with the level of technical and social engineering
	skills required for this attack would very likely find more attractive
	attack vectors. therefore, i don't consider this a particularly serious
	issue.

	configurations with UseIMAPS enabled or using a secure Tunnel were not
	affected to start with.

	a side effect of this fix is that most users of Tunnel will now need to
	explicitly set RequireSSL to false.
	an alternative approach would be defaulting all SSL-related settings to
	off when Tunnel is used. this would be too invasive for a patch release,
	but i'll consider it for 1.2.

	see also CVE-2014-2567 for the Trojita MUA.

2014-07-05 20:54  Oswald Buddenhagen <ossi@users.sf.net>

	* .gitignore:

	ignore coverity state directory

2014-07-02 06:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	initialize store_t::name

	the field is marked foreign (for the drivers), so a recycled store may
	contain an old pointer in it. that would make our error path crash.

	REFMAIL: CAF_KswU7aBS7unnK+rdZy1PG_8SZUAW=tcg75HixDLLE0w3Lhw@mail.gmail.com

2014-07-02 06:40  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	actually print the faulty mailbox name, not some garbage

	REFMAIL: CAF_KswU7aBS7unnK+rdZy1PG_8SZUAW=tcg75HixDLLE0w3Lhw@mail.gmail.com

2014-06-28 12:27  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	bump version

2014-06-28 09:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	detect inconsistent state of highest assigned UID

	the highest assigned UID must always be at least as high as the highest
	actually found UID, as otherwise we'd hand out duplicate UIDs at some
	point. also, getting into such a state in the first place indicates some
	potentially serious trouble, or at least external interference (e.g.,
	moving/copying a message from another folder without giving it a
	pristine filename).

	REFMAIL: 20140626211831.GA11590@sie.protva.ru

2014-06-28 09:04  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	zero-terminate imap literals

	now that we properly support literals for strings, we must expect that
	the consumer code will use them as strings.

	amends fc77feacc.

	discovered by Armands Liepins <armandsl@gmail.com>

	REFMAIL: CAF_KswXoxdm7KXnWW4b_1odf=XsE4qRqRN4AsecwcPF1d+dSTA@mail.gmail.com

2014-04-13 15:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	don't lie about the default of User

	unlike the isync wrapper, mbsync does not have a default for the IMAP
	user. the remote user seldomly matches the local one, so "forwarding" it
	is more confusing than helpful.

	CCMAIL: 744389@bugs.debian.org

2014-04-12 17:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	don't forget to reset message counts when skipping scan

	amends b6949c64d2.

	CCMAIL: 744259@bugs.debian.org

2014-04-12 17:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	remove apparently pointless resetting of recent message count

	past this point, it's not used for anything anyway.

2014-04-12 16:59  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/convert.c:

	error-check renaming of uid mapping database

	for pedantry.

	found by coverity.

2014-04-12 16:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/convert.c:

	error-check reading of old uidvalidity and maxuid files

	found by coverity.

2014-04-12 16:31  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	error-check committing of sync state

	a failure here is rather unlikely, but let's be pedantic.
	a failure is not fatal (we'll just enter the journal replay path next
	time), so only print warnings.

	found by coverity.

2014-04-12 16:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	better error messages for sync state and journal related errors

	we can make perfectly good use of errno here.

2014-04-12 16:28  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	remove pointless/counterproductive "Disk full?" error message suffixes

	the affected functions will set errno to ENOSPC when necessary.

2014-04-12 14:56  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/config.c:

	fix "inverse copy&pasto" in account labeling code

	the code was copied and the original adjusted ... but not quite
	completely.
	this means that clashing server names never really worked since - not
	that i would have expected this to be a particularly common
	configuration to start with. :D

	also added comments explaining why there are two implementations of the
	same thing.

	amends aea4be19e3 (anno 2006).

	found by coverity.

2014-04-12 14:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/config.c:

	assert !where implying !pseudo

	to help poor coverity.

2014-04-12 13:28  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't crash in message expiration debug print

	we would try to print the uids from the non-existing srec of unpaired
	messages while preparing expiration.
	this would happen only if a) MaxMessages was configured and b) new
	messages appeared on the slave but we were not pushing, so it's a bit of
	a corner case.

	found by coverity.

2014-04-12 13:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	fix segfault on passing --{create,expunge}-{master,slave}

	stupid copy&pasto.

	found by coverity.

2014-04-12 13:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't crash on malformed response code

	this would happen in the absurd corner case that the response code is
	properly terminated with a closing bracket, but the atom itself is an
	unterminated double-quoted string.

	NOT found by coverity.

2014-04-12 12:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't crash on truncated LIST response

	found by coverity.

2014-04-12 11:08  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/main.c:

	remove pointless pointer assignment

2014-04-12 11:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, mdconvert.c:

	fix hypothetical buffer overflows

	if something managed to make the maildir .uidvalidity files big enough
	(possible only by appending garbage or scrambling them alltogether), we
	would overflow the read buffer by one when appending the terminating
	null.
	this is not expected to have any real-world impact.

	found by coverity.

2014-04-12 10:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, mdconvert.c:

	close a bunch of fd leaks in error paths

	found by coverity.

2014-03-19 09:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/util.c:

	actually use prime numbers for all hash bucket sizes

	for some reason lost in history, the prime_deltas were actually wrong,
	leading to using composite numbers.
	the right sequence is available at http://oeis.org/A092131.

2014-03-19 09:09  Oswald Buddenhagen <ossi@users.sf.net>

	* src/config.c:

	fix zero MaxSize override in Channels

	REFMAIL: CA+Tk8fzb9i9LrC_k4G978c5XR5urNz_s0fpOn_-6EsdrBnEzSQ@mail.gmail.com

2014-03-10 10:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/: config.c, isync.h, util.c:

	rework maildir store mapping

	the trivial approach of having "home" and "root" stores produced ugly
	results, and totally failed with the introduction of nested folder
	handling.
	instead, create a store per local directory, just as one would manually.

	CCMAIL: 737708@bugs.debian.org

2014-03-10 10:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/config.c:

	don't needlessly quote strings

2014-03-10 10:54  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/main.c:

	don't needlessly spell out INBOX

2014-03-09 15:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/config.c:

	write Sync and Expunge to global section if applicable

	makes for leaner Channel sections.

	note: the global delete and expunge variables exist so the command line
	can override the config file despite the otherwise backwards behavior.

2014-03-09 14:56  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/config.c:

	don't bother checking impossible condition

	the config readear already verified that at least host or tunnel are
	set.

2014-02-08 12:21  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix crash on store without prior fetch with non-UIDPLUS servers

	we'd never initialize the message list append pointer, so
	imap_find_new_msgs()'s FETCH would go awry.

	REFMAIL: <20140207101719.GB17125@mac.home>

2014-02-02 11:24  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	remove pointless use of AI_V4MAPPED flag

	this flag is ineffective if ai_family is not explicitly AF_INET6.
	on top of that, attempting to use it breaks on FreeBSD.

2014-01-25 12:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	fix typos

2014-01-25 10:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't error out if we don't get an X-TUID header

	the BODY[] item in the FETCH response corresponds to what we requested,
	and its presence doesn't imply that it actually contains anything useful
	- new messages may appear in the mailbox in addition to those we stored
	ourselves, and these will obviously have no TUID.

2014-01-02 19:50  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac, src/common.h, src/drv_imap.c, src/util.c:

	make date parsing portable, take 2

	the global timezone variable is glibc-specific.
	so use timegm() instead of mktime() for the conversion.
	as that is specific to the BSDs and glibc, provide a fallback.
	amends 62a6099.

2014-01-02 18:36  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, sync.c:

	fix _POSIX_SYNCHRONIZED_IO usage

	it can be -1 for unsupported, or 0 for runtime detection (which we don't
	do).

2014-01-02 20:08  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	bump version

2013-12-08 21:29  Oswald Buddenhagen <ossi@users.sf.net>

	* README, src/mbsyncrc.sample:

	pre-release doc updates

2013-12-14 11:37  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	elaborate on expunging and trashing

2013-12-13 18:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	clarify wording in MapInbox doc

2013-12-15 11:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	avoid array underflow in IMAP LIST .lock workaround

	suggested by Mark Wielaard <mark@klomp.org>.

	fwiw, the workaround really is still necessary with panda imap ...

2013-12-13 14:36  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	MaxMessages: ignore entries with no master while calculating bulk fetch

2013-12-11 15:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	adjust comments to new reality

2013-12-11 15:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	ensure sequencing of message propagation and store closing

	by putting the message propagation last, d3f634702 uncovered a
	long-standing problem: we might have closed the source store before all
	messages were propagated from it.

2013-12-11 15:13  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix error paths wrt sync drivers, take 3

	msgs_copied() was not checked at all, and msgs_flags_set() was doing it
	wrong (sync_close() was not checked).

	instead of trying to fix/extend the msgs_flags_set() model (ref-counting
	and cancelation checking in lower-level functions, and return values to
	propagate the status), place the refs/derefs around higher-level scopes
	and do the checking only there. this is effectively simpler, and does
	away with some obscure macros.

2013-12-11 13:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't use UID EXPUNGE unless trashing

	a simple CLOSE is way more efficient, so use it if no adverse effects
	can come from it.

2013-12-08 19:46  Oswald Buddenhagen <ossi@users.sf.net>

	* .gitignore, configure.ac, src/Makefile.am, src/common.h,
	  src/compat/isync.h, src/config.c, src/config.h, src/driver.c,
	  src/driver.h, src/drv_imap.c, src/drv_maildir.c, src/main.c,
	  src/mdconvert.c, src/socket.c, src/socket.h, src/sync.c,
	  src/sync.h, src/util.c:

	reshuffle sources a bit

	split header and move some code to more logical places.

2013-12-08 15:37  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, main.c:

	tag verbose output when channel links two verbose stores

	otherwise it's pure guesswork to assign the output to particular stores.

2013-12-08 15:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.c:

	move verbose socket logging out of socket driver

	the way it's used, it's more of a high-level function.

2013-12-08 14:49  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, main.c:

	remove own_store() function from driver model

	the drivers which support it can abstract it inside open_store() just
	fine.

2013-12-08 14:11  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make use of IMAP MOVE extension

	the Maildir driver is always exposing behavior equivalent to this - it's
	more efficient.

2013-12-08 09:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	don't check for INBOX more than necessary

2013-12-08 09:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	fix listing of nested maildir mailboxes

2013-12-08 08:49  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: main.c, mbsync.1, mbsyncrc.sample:

	allow prefixes to Patterns

	this makes it possible to "rename" a "namespace" while syncing.

2013-12-08 08:51  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	less spaghetti

2013-12-07 16:24  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	factor out sync_listed_boxes()

2013-12-07 15:41  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: main.c, mbsync.1:

	refuse box list overrides if Channel has no Patterns

	as the named boxes are the same on both sides, they logically make
	sense only when the channel is in that mode anyway, which is the case
	when using patterns.

2013-12-07 15:11  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, main.c, util.c:

	treat manually specified box list the same as one coming from Patterns

2013-12-01 16:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	make host resolution error messages more useful in non-ipv6 builds

2013-12-01 16:45  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	avoid useless delay after creating maildir box

	we would see the recent timestamp of the creation and conclude that
	something is going on, so we'd wait. this is obviously nonsense.
	as we know that a freshly created mailbox is empty, simply skip the
	message scan alltogether.

2013-11-02 20:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, drv_maildir.c, isync.h, mbsync.1,
	  run-tests.pl, sync.c:

	reduce FSync option to a boolean

	there is no use for Thorough mode any more, so simplify the
	configuration.

2013-11-02 20:41  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't fsync after logging every TUID

	as we now don't actually start propagating new messages until all TUIDs
	have been generated, it's sufficient to sync just once. this makes it
	a cheap operation, so we can do it at SYNC_NORMAL level already.

2013-11-24 19:26  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, isync.h, mbsync.1, run-tests.pl, sync.c:

	add ExpireUnread option

2013-11-24 18:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, mbsync.1:

	make it possible to specify CopyArrivalDate and MaxMessages globally

	sneaky change on the side: the wording of the man page is changed from
	"outside any section" to "before any section" to get global options.
	this is not entirely true ... the previously existing options behave as
	before, while the two newcomers actually affect subsequent channels.

2013-11-24 18:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, isync.h, main.c, sync.c:

	replace global_* with a channel_conf_t instance

	this makes the (growing) list of getopt_helper()'s parameters
	manageable. the few wasted bytes are worth it.

2013-11-24 18:55  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, isync.h, main.c:

	do not unnecessarily use bitfields

	they don't save much (if any) space in our usage, while they make the
	machine code more bloated and slow.

2013-11-24 17:26  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	move handling of new messages after that of old ones

	i.e., move it back. whatever the original reason was, it's now gone.

	this order is way more natural, which allows us to remove the osrecadd
	and S_DONE hacks.

2013-11-04 08:54  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	verify idempotence of all sync operations

2013-11-30 12:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: run-tests.pl, sync.c:

	make MaxMessages work for new mails as well

	this helps enormously on the first sync of a 100k message box with a
	limit of 1k messages. it also happens to make the syncing idempotent.

	in a few conditionals we now explicitly test for max_messages being
	enabled, not smaxxuid != 0, as after the initial fetch with no important
	messages smaxxuid is zero, but we still have to skip over 99k messages
	in the above case.

2013-11-23 14:55  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	delay propagation of new messages

	previous sequence:
	  examine & propagate new => examine old => propagate old
	new sequence:
	  examine new => examine old => propagate new => propagate old

	this alone does not buy us much ...

2013-11-02 18:33  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	make message propagation recording less magic

	assign the sync record to the source message asap, and later on rely
	on a more explicit condition than not doing so.

2013-11-02 19:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	log maxuid bumping less aggressively

	we can bump the internal variable whereever convenient, but we cannot
	log it until we know that all messages were copied, as otherwise we
	could miss some new messages after an interruption. with the new
	approach, interruption would merely cause some additonal traffic.

2013-11-17 16:36  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	document message expiration transactions

2013-11-24 14:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	propagate deletions with other flag changes

	less code duplication, more logical order of issued driver commands
	(especially after the next commit), and the "side effect" of letting the
	message expiration code see those deletions if they are asynchronous.

2013-11-17 10:23  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't delay loading master even if messages were expired

	the delay optimized the corner case of previously important but now
	expired messages on the slave disappearing, either through an external
	expunge or after a journal replay. no point in pessimizing the common
	case.

2013-11-17 08:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: run-tests.pl, sync.c:

	remove cleanup of expired entries during setup of master load

	the removed code would only ever trigger if a) we were after a journal
	replay or b) something external expunged the expired messages - both are
	corner cases not worth the extra code.
	however, this means that the syncing code further down now needs to take
	care of these zombies.
	in the end, the normal cleanup will take care of all expired entries,
	new and old.

2013-11-24 18:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	micro-optimization/-clarification: swap condition order

2013-11-23 11:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	make message counting in expiration code less confusing

2013-11-10 18:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	count unread messages like flagged messages when expiring

	that is, don't count them towards the total only below the cut-off
	point. making them extend the working set even though they are inside it
	is counterintuitive.

2013-11-09 10:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	use post-sync "seen" flag to determine expirability

	otherwise it wouldn't be idempotent.

2013-11-08 11:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/isync.1, sync.c:

	don't protect recent messages from MaxMessages

	while maildir has a clearly defined meaning of "recent" and for example
	mutt handles it graciously, IMAP's definition is fubared to the point
	that some servers (for example gmail) simply refuse to support it.
	for symmetry reasons it is best to pretend that it doesn't exist at all.
	it doesn't seem too useful anyway (the user can simply mark the messages
	as read to allow pruning).
	and last but not least, the man page of mbsync says nothing about
	"recent", only "unread". unlike the isync man page, though.

2013-11-23 11:22  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	always get slave flags when we are expiring

	even if we are not propagating new messages, the appearance of new
	messages on the slave can lead to expiring older messages. for that, we
	need to know their importance, and thus flags.

	the alternative would be not doing an expiration run when not fetching
	new messages, but that would mean more conditionals all over the place.
	as the decision is somewhat arbitrary, just do the simpler thing.

2013-11-16 16:59  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	do not trash expired messages

	we are not actually deleting them, so there is no point in saving them
	in the trash.

2013-11-16 12:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: run-tests.pl, sync.c:

	make sync state header format less obscure

	the header is not space-critical, so use proper name-value pairs.
	this has the additional advantage that subsequent format changes can be
	done much easier.

2013-11-16 12:21  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	make state loading in showstate() similar to ckstate()

2013-11-09 12:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	take configs out of target state defs

	cleaner and less duplication

2013-11-16 12:41  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	more precise failure reporting

2013-11-03 19:17  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	make it possible to run only selected tests

2013-11-09 10:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	set srec->msg[] when finding messages by tuid

	otherwise we would propagate phantom deletions.

	this affected only sync runs after an interruption while storing
	messages, so it went (mostly?) unnoticed.

2013-11-09 10:41  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	remove pointless assignment

	we already know that tmsg->srec is null at this point.

2013-11-02 22:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	assert no stray TUIDs

2013-11-30 14:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	initialize struct tm

	strptime() does not initialize at least tm_isdst, which leads to an
	uninited value reference in mktime().

2013-11-09 13:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, main.c:

	make use of strptime() portable

	it does not (officially) support the %z conversion, so re-implement that
	part by hand.

2013-11-09 12:53  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix compilation with older gcc versions

	the warning suppression pragma within function scope is apparently a new
	thing.
	as i don't want to disable the check for the entire function (even if
	this currently would make no difference), just use a wrapper function
	to suppress the format string check.

2013-11-09 12:50  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac:

	fix strftime() %z conversion specifier check

	only glibc does something sane with gmtime()+strftime(). on bsd (incl.
	mac os), strftime() can be used only with localtime().

2013-11-06 07:40  Oswald Buddenhagen <ossi@users.sf.net>

	* .gitignore:

	ignore automake's "compile" script

2013-11-06 07:37  Oswald Buddenhagen <ossi@users.sf.net>

	* autogen.sh:

	use autoreconf instead of calling separate tools

	this has been the correct way since a long time.

	Pointed-out-by: Felipe Contreras <felipe.contreras@gmail.com>

2013-11-02 19:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, main.c, run-tests.pl, sync.c:

	add/fix comments and improve debug messages

2013-11-02 19:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	simplify condition

	... and document the cases.

2013-11-02 18:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	micro-optimization/-clarification

2013-10-26 09:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	move initializations for clarity

2013-05-20 16:54  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	MaxMessages: make condition exactly symmetrical to condition below

2013-05-20 16:53  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	rewrite condition for readability and consistency

2013-11-02 14:04  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	remove assumption about value of M constant

2013-11-02 11:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix enum abuse

	amends 9c86ec344.

	S_FIND was for the sync record status field. it has no business in the
	sync vars status fields. its value coincided with ST_SELECTED, which
	luckily only means that we always tried to match up TUIDs even if there
	was nothing to do.

	the need for TUID matching arises in two mostly independent
	circumstances, so add two separate flags ST_FIND_{OLD,NEW}.

2013-11-03 19:20  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	create unseen messages in /new/

	seen messages still go to /cur/.
	this is consistent with the actual maildir driver.

2013-11-03 11:59  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	be a bit more verbose

2013-11-03 11:59  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	properly handle unexpected exit while replaying journal

2013-11-03 11:49  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	ensure that the journal replay pass really does nothing

2013-11-02 15:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	sort messages by serial number instead of UID in box dumper

	the input data is sorted that way, so it's easier to compare.

2013-11-02 14:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	fix error message in sync state dumper

2013-09-25 15:13  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	deal with messages disappearing between being listed and fetched

2013-09-25 18:56  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, mbsync.1:

	support backslash-escaping in the config file

	note that no attempt is made at making this work in the compat wrapper.

2013-09-25 18:55  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	support backslashes and quotes in quoted IMAP strings

	the RFCs require it - well hidden in the BNF at the bottom.

	patch somewhat inspired by "guns" <self@sungpae.com>.

2013-09-25 16:53  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make next_arg() more readable & efficient

2013-09-01 15:35  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac, src/isync.h, src/socket.c:

	IPv6 support

	inspired by a patch by "Todd T. Fries" <todd@fries.net>.

2013-09-01 14:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, socket.c:

	support multi-homed servers

2013-08-03 13:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, drv_imap.c, isync.h, main.c, mbsync.1,
	  sync.c, util.c:

	support multi-character path separators

	this applies to both the IMAP PathDelimiter (which is needed by Lotus
	Domino), as well as the Flatten-ed separators.

2013-07-27 16:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	CHECK before FETCH after STORE

	m$ exchange does not seem to update the index in time otherwise.

2013-07-28 13:55  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.ac, src/config.c, src/drv_imap.c,
	  src/drv_maildir.c, src/isync.h, src/mbsync.1, src/sync.c:

	added sync support for the arrival date of messages

	initial patch by Marc Hoersken <info@marc-hoersken.de>

2013-07-27 18:17  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	warn if we cannot find some messages by TUID

2013-07-27 16:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, sync.c:

	make better use of ATTR_UNUSED

2013-07-27 13:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	be somewhat stricter about the LIST response syntax

	the first token *must* be a list.

2013-07-27 13:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	allow the mailbox names in LIST responses to be literals

	Lotus Domino seems to send them like that.

2013-07-27 12:31  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make parse_list() callback based

	this allows us to parse IMAP literals ({}) in every list.

2013-07-27 08:37  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1, mbsyncrc.sample:

	add PassCmd option to query IMAP password dynamically

	inspired by patches by
	Aurélien Francillon <aurelien.francillon@eurecom.fr>,
	Martin Stenberg <martin@gnutiken.se> and
	sbfnk@users.sf.net.

2013-05-09 16:51  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't unnecessarily use continue

2013-05-11 08:12  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, sync.c:

	use INT_MAX instead of zero for "no size limit"

	this simplifies the actual conditions

2013-04-20 14:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, mbsync.1, socket.c, sync.c:

	update copyrights

2013-04-13 17:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	man page fixups

2013-04-13 17:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: main.c, mbsync.1:

	don't let wildcards match INBOX, unless it lives under Path

	it's counter-intuitive to have '*' match the (always present) INBOX
	when the rest of the mailboxes lives in a different namespace.

2013-04-13 17:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	always list INBOX when asked for it

	it's there even if it's not there. says IMAP. no need to contradict.

2013-04-01 10:20  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	split maildir_list_part()

	the boolean argument switched two entirely separate functions.

2013-04-01 10:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	remove some temporaries in maildir_list_part()

2013-04-13 08:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	fix CRAM-MD5 authentication

	the decoded challenge may be padded, so we really need to use strlen()
	rather than just the decoded length.

2013-04-13 08:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	more consistency in char signedness

2013-04-07 15:20  Felipe Contreras <felipe.contreras@gmail.com>

	* src/drv_maildir.c:

	maildir: fix trash path double-free

	It should be freed at the very end.

	Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

2013-04-07 14:53  Felipe Contreras <felipe.contreras@gmail.com>

	* configure.ac:

	Fix build with recent autoconf and modernize configure.ac

	configure.ac:2: warning: macro 'AM_CONFIG_HEADERS' not found in library
	configure.ac:7: error: 'AM_PROG_CC_STDC': this macro is obsolete.
	    You should simply use the 'AC_PROG_CC' macro instead.
	    Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
	    but upon 'ac_cv_prog_cc_stdc'.
	configure.ac:3: warning: AM_INIT_AUTOMAKE: two- and three-arguments

	Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

2013-04-07 10:42  Felipe Contreras <felipe.contreras@gmail.com>

	* configure.ac:

	Rename configure.in to the modern equivalent

	Fixes:

	 aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'

	Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

2013-04-07 14:54  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	discourage use of MapInbox

2013-03-30 09:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't try to fetch status of minus one message

	this would happen if we were trying to find newly pushed messages, but
	none actually arrived.
	as imap's ranges are not ordered, this would actually fetch one message.

2013-03-30 15:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: run-tests.pl, sync.c:

	don't record newuid in the sync state

	this value is only ever used to find just pushed messages by TUID, so we
	can simply use the UIDNEXT value from before we started pushing - and of
	course, we need to record that in the journal. it makes no sense to log
	the new value after completing a search, as there won't be a next search
	before we push the next messages.

2013-03-30 08:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	rename sync_vars_t::uidnext => newuid & fix comment

	the purpose of this variable is to hold the UIDNEXT value from before
	we started pushing new messages, i.e., the minimal uid we can expect
	them to have.

2013-03-30 13:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, mbsync.1, util.c:

	make paths relative to CWD, after all

	the test suite actually relies on it. it would be possible to adjust it,
	but there is not much reason to make paths relative to HOME (as we
	support convenient tilde expansion). so use the least invasive approach,
	which is simply the old behavior. adjust the documentation accordingly.

	This reverts commit da5ce5d8f42a15a2842d6d14043452f1a7892a0a.

2013-03-29 17:22  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	improve socket error reporting

	always use getsockopt() to query the meaning of POLLERR, rather than
	reporting "Unidentified socket error".
	this is unlikely to have any effect when using select(), as that one
	pretty much never signals exceptional conditions.

2013-03-29 16:51  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	factor out socket_connect_failed()

2013-03-29 17:11  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	improve socket connect() error reporting with poll()

	turns out that poll() may (and on linux does) signal POLLERR on
	connection failure. this is unlike select(), which is specified to
	signal write readiness in every case.
	consequently, check whether we are connecting before checking for
	POLLERR.

2013-03-29 15:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, main.c:

	introduce -DC option to only install a crash handler

2013-03-24 13:46  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	don't claim that we are looking for exactly bdb 4.2

2013-03-24 12:09  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	match flag names in man page

	"Full" is an alias for "All", but let's stick to one.

2013-03-24 10:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, util.c:

	make path expansion match docu: paths are relative to ~

	the current behavior of being relative to the current directory sort of
	makes no sense, and contradicts the docu.

2013-03-24 10:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/: isync.1, main.c:

	disable SSLv2 by default in the wrapper as well

2013-03-23 14:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	downcast time_t to long for printing

	time_t may be long long. to keep the sprintf format strings simple, just
	downcast - this is not going to be a problem for the next 30 years, and
	until then long will be 64-bit everywhere anyway.

	suggested 3.5 years ago by Antoine Reilles <tonio@NetBSD.org>.

2013-03-23 08:59  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix cram-md5 authentication

	we need to send a newline after the response for imap to grok it.

2013-03-23 09:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix crashes in imap_open_store() error paths

	it's not a good idea to invoke imap_open_store_bail() twice, either ...

2013-03-17 13:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	fix crash in ssl connection error path

	not a good idea to invoke the callback twice ...

2013-03-17 11:41  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, mbsync.1, socket.c:

	rewrite SSL certificate verification. again.

	leave all the hard work to OpenSSL. this has several consequences:
	- certificate chain validation actually works instead of throwing
	  around error 20
	- the interactive approval is gone. i don't expect it to be useful
	  anyway, as mbsync is mostly a batch tool
	- the code is much shorter

2013-02-21 07:02  Oswald Buddenhagen <ossi@users.sf.net>

	* README:

	language fix

2013-02-21 07:01  Oswald Buddenhagen <ossi@users.sf.net>

	* README:

	make build instructions more explicit

2013-02-03 16:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	fix CVE-2013-0289: add SSL subject verification

	we did not check a valid certificate's subject at all so far.
	this is no problem if the certificate file contains only exactly the
	wanted host's certificate - before revision 04fdf7d1 (dec 2000, < v0.4),
	this was even enforced (more or less - if the peer cert had been
	signed directly by a root cert, it would be accepted as well).
	however, when the file contains root certificates (like the system-wide
	certificate file typically does), any host with a valid certificate
	could pretend to be the wanted host.

2013-02-03 16:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, isync.h, mbsync.1, socket.c:

	add support for (disabling) TLS v1.1 and v1.2

2012-10-16 07:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	more error checking of IMAP responses

	REFMAIL: CA+Tk8fyu-6bwXq=ee2BgcKK_13m9S0RS+-0DhM=_jFqSKCH8aw@mail.gmail.com

2012-09-22 15:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.c, util.c:

	flush stdout more

	to make sure it is timely written and not interleaved with stderr even
	when when redirected.

2012-09-22 15:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix TrashRemoteNew copy direction

2012-09-16 11:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	consider hierarchy delimiter flattening when deciding what to list

	flattened sub-folders of INBOX actually end up in Path, so list that
	instead.

	REFMAIL: 6c0ecbff0d025387020281c5d2f5e6e8@smallsys.org

2012-09-16 10:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	try harder to list all necessary boxes

	the pattern "INB*" may or may not refer to something in the INBOX. even
	just "*" may. so list both the INBOX and the Path in case of
	uncertainty.

2012-09-15 13:15  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, drv_maildir.c, isync.h, mbsync.1,
	  run-tests.pl, sync.c:

	add option to control amount of fsync()ing

2012-09-15 12:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	avoid that a system crash can cause messages to be propagated twice

	fdatasync() the journal after creating the pair record and recording
	the TUID, but before the message propagation actually starts.

	all other writes to the journal are not flushed, as they will at worst
	cause some unnecessary network traffic without visible effect.

2012-09-15 12:15  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	avoid that a system crash can lose mails

	this fixes two possible failure scenarios:
	- if the journal is committed but the mails are not, the missing files
	  would be erroneously interpreted as deletions which would be
	  propagated
	- less seriously, if the mail files' meta data was committed but the
	  file contents were not, we would end up with empty files, which would
	  have to be re-fetched "behind mbsync's back" (just deleting the files
	  would not work - see above)

2012-09-15 11:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	avoid that a system crash can clobber the sync state file

	make sure that the new state is committed to disk before overwriting the
	old version - by default meta data is committed first, so we may end up
	with no valid state at all otherwise.

2012-09-15 09:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/config.c:

	quote mailbox names written to config file

2012-09-15 09:49  Oswald Buddenhagen <ossi@users.sf.net>

	* src/config.c:

	make more config file errors fatal

	we really shouldn't just synchronize despite config parsing errors.

2012-09-15 09:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, drv_imap.c, drv_maildir.c, isync.h:

	store config error status in conffile_t object

	this makes passing it around more straight-forward

2012-09-15 09:24  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, drv_imap.c, isync.h, util.c:

	make config parser a bit more careful about quotes

	the parsing is more shell-like now:
	- quoted and unquoted parts can be mixed in one argument
	- the hashmark can be meaningfully quoted

2012-09-09 10:18  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	call fdatasync() after updating .uidvalidity files

	they must be flushed before the file system meta data, as otherwise we
	may end up with duplicate UIDs after a system crash.

2012-09-02 15:35  Ben Kibbey <bjk@luxsci.net>

	* src/socket.c:

	Fix certificate verification.

	The connection state wasn't getting updated.

2012-08-26 13:17  Oswald Buddenhagen <ossi@users.sf.net>

	* README, src/compat/isync.1, src/mbsync.1:

	pre-release doc updates

2011-04-10 17:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/main.c, config.c, drv_imap.c, drv_maildir.c,
	  isync.h, main.c, sync.c, util.c:

	update copyrights

	make the wrapper's help string also mention copyrights pertaining only
	to the actual syncer, as this is the only string many people will ever
	see.

2011-04-10 17:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/config.c, compat/convert.c, compat/isync.1,
	  compat/isync.h, compat/main.c, compat/util.c, config.c,
	  drv_imap.c, drv_maildir.c, isync.h, main.c, mbsync.1,
	  mdconvert.1, mdconvert.c, run-tests.pl, socket.c, sync.c,
	  util.c:

	replace FSF address with something more ... contemporary

2012-08-26 14:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: Makefile.am, compat/Makefile.am:

	install the config examples to docdir

2012-08-26 14:16  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	update debian packaging

2012-08-26 13:02  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am, isync.spec.in:

	fix rpm packaging

2012-08-26 11:36  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, sync.c, util.c:

	use a hash table for message => sync record lookup

	this removes the pathological O(<number of sync records> * <number of
	new messages>) case at the cost of being a bit more cpu-intensive (but
	O(<number of all messages>)) for old messages.

2012-08-25 18:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1:

	make use of UID EXPUNGE

2012-08-18 11:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, isync.h, main.c, mbsync.1, sync.c:

	introduce ability to flatten the hierarchy of Stores

2012-08-11 16:34  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in, src/drv_imap.c, src/drv_maildir.c, src/isync.h,
	  src/main.c, src/mbsync.1, src/util.c:

	add support for hierarchical mailboxes

2012-08-11 15:11  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	calculate trash box path already in maildir_open_store()

	this gives us some cleaner code paths later on, as we can treat the
	trash box like a regular mailbox.

2012-08-11 15:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	ensure that mailbox creation in maildir_store() is limited to trashing

	other mailboxes would have been maildir_select()ed already.

2011-06-13 10:13  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	refactor: imap_select2_p2 => imap_refcounted_done_box

	soon, we'll use it for something different, too

2012-08-25 13:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't crash when select() on master fails synchronously

	svars->drv[S] would not be initialized yet, so cancel_sync() would
	crash.

2012-08-18 10:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, main.c, sync.c:

	fix error handling of invalid SyncState *

	when we find that the store is incompatible with in-store sync state,
	we want to fail the whole channel. however, we must not claim that the
	store died, otherwise it won't be disposed of properly.

2011-06-02 17:21  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c:

	reject qualified mailboxes with the magic name INBOX

	otherwise we couldn't tell them apart from the real INBOX after
	stripping away the Path.

2011-07-25 07:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, mdconvert.c:

	suppress bdb complaints about unknown file format

	pass DB_TRUNCATE when creating databases. otherwise bdb will complain
	about the empty file we pass it (we have to create it upfront to
	implement our locking).

2011-06-02 10:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1:

	Revert "fix UIDNEXT handling"

	in fact, UIDNEXT (and UIDVALIDITY) null is *not* allowed (see RFC3501
	section 9). them popping up nonetheless was a dovecot bug (which would
	also confuse dovecot itself).
	having it in as a workaround was no good either, as quite some other
	code in mbsync assumes that UIDs are not null.

	This reverts commit e1fa867 and most of 39006d7.

	-REFMAIL: 4CA62BA1.4020104@lemma.co.uk

2012-08-25 13:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, isync.h, main.c, run-tests.pl:

	deal with concurrent maildir modifications during listing

	files may be renamed (due to new -> cur transition or flag changes),
	which may lead to two effects if ignored:
	- we see both the old and the new name, so we report a spurious
	  duplicate UID
	- we see neither name, so we report a spurious deletion

	as countermeasure, record and compare directory modification times. upon
	mismatch, we just start over - as usual.

2011-05-03 07:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	make maildir uidvalidity change fatal

	it's best to give the user a chance to fix it rather than completely
	messing up the syncstate by re-enumerating the UIDs.

2011-05-22 15:53  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	cleanup maildir error paths

	don't try to unlock and close databases and files - this will happen a
	moment later anyway, through cancelation or re-selection.
	ironically, this plugs a memory leak, because an open main database is
	used as a signal to close a temporary db in maildir_scan().

2011-05-22 15:23  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	fix potential double free

	the store may be discarded before we reach maildir_select() again, which
	will leave us with a dangling pointer.

2011-05-22 15:22  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	plug memory leak in maildir_store_msg() upon failure to acquire UID

2011-04-10 11:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, run-tests.pl,
	  sync.c:

	employ alternative scheme to finding messages by TUID

	instead of SEARCHing every single message (which is slow and happens to
	be unreliabe with M$ Exchange 2010), just FETCH the new messages from
	the mailbox - the ones we just appended will be amongst them.

2011-04-03 09:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	clearer debug msg

2011-04-11 08:46  Oswald Buddenhagen <oswald.buddenhagen@nokia.com>

	* src/: isync.h, mdconvert.c:

	use ATTR_PRINTFALIKE

2012-09-01 15:21  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: socket.c, sync.c, util.c:

	fix line wrapping before info messages

	unless an info message is explictly marked as a continuation, it must
	terminate any pending line (typically the progress information) first.

	debug output is not affected, as it is mutually exclusive with info
	output, and no debug lines are left unterminated outside clear scopes.

2011-06-02 08:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, main.c, util.c:

	remove Ontty flag

	i can't figure out why i added it in the first place. it doesn't seem to
	make any sense ...

2011-04-11 08:45  Oswald Buddenhagen <oswald.buddenhagen@nokia.com>

	* src/: isync.h, sync.c, util.c:

	centralize flushing of unfinished debug lines

2011-04-10 13:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/config.c, compat/convert.c, compat/isync.h,
	  compat/main.c, compat/util.c, config.c, drv_imap.c,
	  drv_maildir.c, isync.h, mdconvert.c, socket.c, sync.c,
	  util.c:

	unify error reporting

	- introduce sys_error() and use it instead of perror() and
	  error(strerror()) in all expected error conditions
	- perror() is used only for "something's really wrong with the system"
	  kind of errors
	- file names, etc. are quoted if they are not validated yet, so e.g. an
	  empty string becomes immediately obvious
	- improve and unify language
	- add missing newlines

2011-03-27 18:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	don't complain about disappearing temp files

	some other process might be cleaning up concurrently ...

2011-03-27 15:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/isync.h:

	enlarge receive buffer considerably

	the tiny buffer makes no sense in the face of huge payloads and now
	additionally masses of replies from pipelined commands.

2011-03-13 14:03  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in, src/drv_imap.c, src/mdconvert.c:

	compile with -ansi -pedantic on gcc

	greatly helps portability ...

2012-09-01 19:14  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in, src/compat/isync.h, src/compat/main.c,
	  src/isync.h:

	define _GNU_SOURCE on the command line

	that way it is already set in configure and can thus be used by tests.

2011-03-20 17:23  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	centralize imap_cmd_refcounted_state refcount decrementing

	no else branches remain, so the if() can be put into
	imap_refcounted_done()

2011-03-12 15:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	get rid of redundant literal_pending state flag

2012-08-25 16:26  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in, src/drv_imap.c, src/isync.h, src/mbsync.1,
	  src/socket.c:

	fully asynchronous IMAP operation

	- asynchronous sockets using an event loop
	  - connect & starttls have completion callback parameters
	  - callbacks for notification about filled input buffer and emptied
	    output buffer
	- unsent imap command queue
	  - used when
	    - socket output buffer is non-empty
	    - number of commands in flight exceeds limit
	    - last sent command requires round-trip
	    - command has a dependency on completion of previous command
	  - trashnc is tri-state so only a single "scout" trash APPEND/COPY is
	    sent at first. a possibly resulting CREATE is injected in front of
	    the remaining trash commands, so they can succeed (or be cancel()d
	    if it fails).
	  - queue's presence necessitates imap_cancel implementation

2011-03-13 13:29  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in, src/isync.h, src/main.c, src/util.c:

	add simple mainloop implementation

	not used so far

2011-03-19 18:40  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	move responsibility for closing sockets on error to user

	the only user being imap and the first thing in imap_cancel_store()
	being a call to socket_close(), this code was pretty pointless anyway.

2011-03-27 14:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, isync.h, socket.c:

	make socket read/write error reporting callback-based

	the functions still have synchronous return codes as well - this enables
	early error returns without having to resort to refcounting.

2011-04-03 16:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, isync.h, socket.c:

	decouple the filling of the read buffer from consuming it

	this prepares the code for being called from a callback.

	notably, this makes the imap list parser have a "soft stack", so the
	recursion can be suspended at any time.

2011-03-27 10:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	centralize imap_cmd disposal

2011-03-13 13:12  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, isync.h, socket.c:

	make socket_write() capable of taking ownership of the buffer

	that way the user code doesn't have to free it any more.

2011-03-13 12:40  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, socket.c:

	change socket_write() return code semantics

	instead of returning a write()-like result, return only a binary status
	code - write errors are handled internally anyway, so user code doesn't
	have to check the write length.

2011-03-27 14:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1:

	make IMAP pipeline depth configurable

	currently, this affects only "clustered" message listings and
	flag stores.

2011-03-19 21:12  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	cancel submitted commands when canceling store

	we already have some minimal asynchronicity, so there might be commands
	in flight when a fatal error comes in.

2011-01-23 13:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, isync.h, socket.c:

	Socket_t + buffer_t => conn_t

	remove the layering, in favor of a "buffered connection" abstraction.

2011-04-10 11:28  Oswald Buddenhagen <ossi@users.sf.net>

	* src/socket.c:

	security fix: failure to load the certificate file is *not* OK ...

2011-01-23 12:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: Makefile.am, drv_imap.c, isync.h, socket.c:

	move socket code to a separate file

	this makes the layering more obvious

2011-03-13 11:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	move greeting response handling into get_cmd_result()

	the primary purpose of this is getting rid of the "free-standing"
	buffer_gets() call.

2011-04-03 16:21  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, isync.h, sync.c:

	docs

	- insert "separator comments" between driver entry points
	- document driver API
	- document sync_vars_t parts that are stored in the sync state header

2011-04-03 16:15  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make imap_exec() result reporting callback-based

	this makes the IMAP command submission interface asynchronous.

	the functions still have synchronous return codes as well - this enables
	clean error return paths. only when we invoke callbacks we resort to
	refcounting.

	as a "side effect", properly sequence commands after CREATE resulting
	from [TRYCREATE].

2011-07-24 18:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	rely on the maildir's existence with "SyncState *"

	now that we open the box first, we know that it will exist at this
	point.

2011-07-24 18:26  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	validate maildirs more strictly

	now that "SyncState *" won't create fake mailboxes any more, we can make
	a full validity check again.

2011-07-23 14:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, sync.c:

	split out drv->load() from drv->select()

2011-07-23 14:13  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	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.

2012-07-29 23:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	minor cleanup: use ctx->gen instead of gctx for consistency

2012-07-29 21:15  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	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-29 21:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, sync.c:

	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.

2011-04-03 14:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't call cancel() repeatedly on a store

	erroring command replies will trickle in even after canceling

2012-07-15 10:55  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, main.c, sync.c:

	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-22 15:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	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-22 15:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, sync.c:

	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-06-17 12:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	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.

2011-03-20 12:45  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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.

2010-12-05 15:49  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make response code parse failure of untagged OK/NO/BYE/BAD non-fatal

	as such, it does not disrupt the data stream

2012-07-15 10:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	de-duplicate code a bit

2010-12-15 18:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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.

2010-11-20 22:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/isync.h:

	DRV_SERVER_BAD is and will probably stay unused => trash

2010-11-20 09:17  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	after [TRYCREATE], just resend the same command instead of cloning it

2011-03-20 15:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	use return values from correct set in get_cmd_result()

	DRV_OK == RESP_OK, so this worked by accident

2010-11-15 09:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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.

2010-11-15 09:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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.

2011-06-13 10:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, main.c:

	move setting of ctx->listed outside the drivers

	it's essentially an external state flag

2011-04-10 07:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	de-duplicate error paths

	makes the code more compact. yay for gotos.

2011-07-23 10:49  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	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 15:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/convert.c, drv_imap.c, drv_maildir.c, sync.c:

	fix a bunch of warnings

2011-03-27 10:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/main.c, drv_imap.c, main.c:

	avoid preprocessor warnings on missing features: #if => #ifdef

2011-03-12 15:20  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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-01-23 12:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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

2010-11-20 22:04  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't compare find_old_done with find_new_total

	this didn't have any effect as no async drivers currently exist.

2010-12-19 22:33  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	don't hang if store cannot be opened asynchronously

2011-03-06 22:04  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't leak SSL objects

2011-03-27 09:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	add CR after TUID during LF => CRLF conversion

2011-03-27 08:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	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.

2010-11-14 16:23  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	document some breakage

2010-11-14 15:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/convert.c, drv_imap.c, drv_maildir.c:

	turns out, free(NULL) is just fine ...

2010-10-03 12:31  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix UIDNEXT handling

	UIDNEXT *can* be legally zero, so deal with it.

	-REFMAIL: 4CA62BA1.4020104@lemma.co.uk

2010-10-03 09:53  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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-09-26 13:26  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	remove useless message

	don't complain about missing greeting response - we already complained
	about an unexpected EOF anyway.

2010-04-05 11:15  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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-04-05 11:08  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	formatting

2010-04-05 11:08  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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-04-05 11:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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-02-28 21:23  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/isync.1, mbsync.1:

	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-07 20:20  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix compile with SSL on Mac OS X

	patch by Remko Tronçon <remko@el-tramo.be>
	BUG: 2126899

2010-02-07 16:36  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/: isync.1, main.c:

	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 21:13  Oswald Buddenhagen <ossi@users.sf.net>

	* isync.spec.in:

	fix rpm spec file

	-REFMAIL: 20090122213325.GA11572@crow.ths.tcoek12.org

2010-02-07 21:12  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	(new?) automake already sets docdir correctly for us

2010-02-07 11:24  Oswald Buddenhagen <ossi@users.sf.net>

	* .gitignore, Makefile.am, src/.gitignore,
	  src/compat/.gitignore:

	cvsignore => gitignore

2010-02-07 11:23  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am, autogen.sh:

	adjust ChangeLog generation to git

	now that log generation is cheap, don't store it in the SCM any more.

2010-02-06 18:38  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	fix "make distcheck"

	this makes the deb-clean target shadow build safe

2010-02-06 09:40  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/main.c, drv_imap.c, isync.h, main.c:

	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 09:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, isync.h, sync.c:

	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 09:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	some more error reporting relating malformed messages

2008-08-31 20:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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-23 07:54  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, sync.c:

	deal with UIDVALIDITY of 0 properly.
	-REF: 20080822094543.GA3528@ugly.local

2008-04-13 09:56  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	give the implicitly created imap account config the name of the store.

2008-04-13 09:51  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	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-12 08:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	- accept unset CertificateFile
	- print the certificate's fingerprint
	- make the certificate acceptance prompt much less scary

2008-04-12 08:13  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	ignore system flag extensions (\X-...)

2008-03-16 09:09  Oswald Buddenhagen <ossi@users.sf.net>

	* README:

	minor updates

2008-02-23 14:18  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/config.c:

	compat wrapper: don't crash if neither host nor tunnel are specified.
	fixes:
	CCMAIL: 449006@bugs.debian.org

2008-02-23 09:37  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/config.c:

	quote user name in generated config.
	fixes:
	CCMAIL: 456775@bugs.debian.org

2008-02-23 09:18  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	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:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/convert.c, drv_maildir.c, mdconvert.c:

	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 08:53  Oswald Buddenhagen <ossi@users.sf.net>

	* AUTHORS:

	reshuffle for "contact priority's" sake

2007-09-22 08:45  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't use #ifdef inside htons() arguments - it can be a macro.
	-REF: <lyy7ezyjah.fsf@gfn.org>
	CCMAIL: Scott Gifford <sgifford@suspectclass.com>

2007-04-04 17:03  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	forward port (finally ...): add target for creating signed package

2007-04-04 16:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	#ifdef __linux__ for the crash handler. it compiles on other platforms,
	but the functionality is bound to linux' /proc structure.

2007-02-10 15:37  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix crash due to uninited var when parsing IMAPServer. Thanks to
	CCMAIL: Antoine Reilles <tonio@NetBSD.org>
	REF: <20070118182534.GA22288@arcelot.loria.fr>

2006-12-09 10:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, sync.c:

	fix error paths wrt sync drivers

2006-12-09 10:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	handle abnormal program exit during regtest

2006-12-04 17:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	initialize mvars->t[1] to 1. helps enormously ... :}

2006-11-18 13:17  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	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-09 17:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/main.c:

	make compat wrapper default to current user for imap login

2006-11-01 06:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/config.c:

	put INBOX in Maildir

2006-10-24 17:37  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	don't crash on truncating database. seems to affect only some bdb
	versions (e.g., 4.2).

2006-08-10 07:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix bug in newline conversion causing buffer overflows.
	this leads to segfaults and has some security impact.

2006-08-10 06:33  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	memmove for overlapping mem copies.

2006-07-31 05:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	glibc seems to be *really* fucked up.

2006-07-29 11:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_maildir.c, mdconvert.c:

	work around glibc bug: printf("%.*s", INT_MAX, s) tries to allocate 2G.

2006-06-05 11:59  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/config.c:

	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:55  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/: config.c, isync.h:

	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-05-28 16:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	don't crash in imap driver when Host is not specified.

2006-05-28 16:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	be *slightly* more explicit about which options Tunnel makes
	superfluous.

2006-05-28 15:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, mbsync.1:

	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 13:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	move assigning default port to the place of use

2006-05-27 12:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	add comment

2006-05-27 12:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	seen messages are eligible for expiration even if they are recent in the
	mailbox.

2006-03-21 20:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	no/empty mailbox name means INBOX

2006-03-21 20:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, main.c, sync.c,
	  util.c:

	make the driver model, sync_chans() and sync_boxes() fully async.
	async drivers to follow ...

2006-03-21 17:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	unscrew lf=>crlf conversion and tuid insertion

2006-03-21 17:40  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	ok, mismerging and not running the reg-tests is lame. unscrew expunging
	again.

2006-03-21 16:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	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 15:53  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: main.c, sync.c:

	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 10:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	split box list preparation from "consumption".

2006-03-21 10:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, main.c, sync.c:

	info() about opening of stores

2006-03-20 20:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	do not repeatedly get namespace from server.

2006-03-20 20:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	handle socket() failure and correctly report gethostbyname() failure.

2006-03-20 20:16  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, main.c, sync.c,
	  util.c:

	update copyrights

2006-03-20 19:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, main.c:

	move whole responsibility for recycling open stores/server connections
	to the drivers.

2006-03-20 19:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, main.c:

	keep the result of driver->list() and a flag whether it is valid in the store.

2006-03-20 18:36  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, isync.h:

	aggregate all (two ...) drivers in an array instead of naming them in
	each (one ...) location explicitly.

2006-03-20 17:21  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	whitespace and code verbosity

2006-03-20 15:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	merge imap_t into imap_store_t - there is really no point in having them
	separated.

2006-03-19 11:29  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, drv_imap.c, drv_maildir.c, isync.h, main.c,
	  sync.c, util.c:

	"fprintf( stderr," => "error(". new functions debugn() and infon()
	for messages with missing newline; warn() and error() act upon this.

2006-03-19 10:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	make config parsing more robust against bogus input and report errors
	more clearly.

2006-02-12 11:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	factor out box selection from sync_boxes to avoid code dupe

2006-02-11 20:28  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	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:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	don't barf at directories with none of {tmp,new,cur}/ and turn them
	into maildirs instead. see next commit.

2006-02-11 20:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't commit state file when a fatal error occurs

2006-02-11 19:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	unbelieveable, but close() can actually fail

2006-02-11 19:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	add copyright + license

2006-02-09 17:44  Oswald Buddenhagen <ossi@users.sf.net>

	* acinclude.m4, get-cert, src/compat/config.c,
	  src/compat/convert.c, src/compat/isync.1, src/compat/isync.h,
	  src/compat/main.c, src/compat/util.c, src/config.c,
	  src/drv_imap.c, src/drv_maildir.c, src/isync.h, src/main.c,
	  src/mbsync.1, src/mdconvert.1, src/mdconvert.c, src/sync.c,
	  src/util.c:

	update fsf's postal address. i think it's sort of useless nowadays
	anyway, but heck ...

2006-02-05 17:42  Oswald Buddenhagen <ossi@users.sf.net>

	* src/mbsync.1:

	typos

2006-02-05 17:39  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	bump version. no, i'm not releasing yet ... :)

2006-02-05 17:38  Oswald Buddenhagen <ossi@users.sf.net>

	* src/Makefile.am:

	include run-tests.pl in distribution

2006-02-03 23:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	and now don't clobber the mails ...

2006-02-03 21:33  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, sync.c, util.c:

	wrap message storing into transactions. nice side effect: drivers don't
	need to deal with line end conversion any move.

2006-02-02 17:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, sync.c:

	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 13:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	crash handler that launches gdb. activated when started with -D option.
	simplifies debugging crashes during the reg-tests.

2006-02-02 11:23  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	less cluttered debug output

2006-02-02 11:12  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	cosmetics: move around variable declarations and remove obsolete comment

2006-02-02 11:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	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 10:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	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:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	much improved journal replay testing.
	some clenup.

2006-02-02 10:04  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: run-tests.pl, sync.c:

	orphan/kill all affected entries after expunge

2006-01-31 13:57  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	deal with branches in "make log"

2006-01-30 13:49  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, sync.c:

	M_EXPIRED -> M_EXPIRE

2006-01-30 13:11  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	sanitize S_DEL

2006-01-30 13:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	remove superfluous temporary rflags from sync_boxes

2006-01-30 11:12  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, sync.c:

	now that messages know their sync records, M_SYNCES is superfluous.

2006-01-30 10:26  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, sync.c:

	establish bi-directional mapping between mails and sync records. use it
	to merge the --renew case into the --new case.

2006-01-30 09:33  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	declaring ex[M] instead of ex[2] is, indeed, no good. long live watchpoints.

2006-01-29 18:40  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/main.c:

	whoops - 'isync -w' would write .mbsyncrc to a wrong directory

2006-01-29 15:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	move fetching new messages in front of syncing old entries. this alone
	does not buy us a whole lot ...

2006-01-29 15:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	test for journalling and journal replay.

2006-01-29 15:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, main.c, sync.c:

	undocumented flag -J to skip committing the new sync state.

2006-01-29 14:46  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, isync.h, main.c, sync.c, util.c:

	merge Quiet, Verbose & Debug into DFlags

2006-01-29 11:49  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: isync.h, sync.c:

	M_NOT_SYNCED => M_SYNCED. now that sync records know their messages, it
	is simpler to track the positive case.

2006-01-29 11:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	move driver options composition below journal replay - it might make
	additional actions necessary (it doesn't, yet).

2006-01-29 11:22  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: drv_imap.c, drv_maildir.c, isync.h, sync.c:

	split driver->prepare into ->prepare_opts and ->prepare_paths

2006-01-25 06:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	#include limits.h (for INT_MAX)
	REF: <a8e45e1b0601241753j1e14cc1cm3fc3c65c7acb0c1b@mail.gmail.com>

2006-01-13 16:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	less confusing uid ranges in debug

2006-01-12 06:36  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in, src/drv_imap.c:

	solaris 10 fix: use sys/filio.h for FIONREAD. untested.
	REF: <20060111215014.GA601@49.180.97-84.rev.gaoland.net>

2006-01-08 19:25  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	adjust to: omit flags other than "deleted" when expunging target.

2006-01-03 09:28  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	collect stderr as well.

2005-12-29 13:08  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't record we synced flags if we didn't.

2005-12-28 20:45  Oswald Buddenhagen <ossi@users.sf.net>

	* src/util.c:

	have to flush debug as well ...

2005-12-28 20:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	of course F_DELETED will have been added to expired slave messages, so
	don't complain about it.

2005-12-28 19:17  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	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:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	"reformat" S_EXP_S setting logic for understandability.

2005-12-28 11:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	whoops

2005-12-28 10:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, isync.h, main.c, sync.c:

	- 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-27 17:44  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	show debug output on error.

2005-12-27 17:31  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	make the error case output more useful by dumping the entire data set.

2005-12-26 16:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	fix error message

2005-12-26 16:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	add expiration tests

2005-12-26 16:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	add MaxSize tests

2005-12-26 16:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	when dumping mailboxes, sort by uid 1st.

2005-12-26 15:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	detect excess messages after sync

2005-12-26 15:57  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	sync state reader:
	- grok negative uids
	- more robust

2005-12-26 15:54  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	don't eat array lead-in on empty arrays

2005-12-26 15:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	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 14:55  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	message tweaks

2005-12-23 10:22  Oswald Buddenhagen <ossi@users.sf.net>

	* src/run-tests.pl:

	more logical order

2005-12-22 18:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: .cvsignore, run-tests.pl:

	add some regression testing.

2005-12-22 14:59  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	fix sync entries not being purged due to c&p error.

2005-12-21 13:04  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	less confusing error message on invalid mailbox.

2005-12-18 14:10  Oswald Buddenhagen <ossi@users.sf.net>

	* src/config.c:

	it's beyond me what this memset was supposed to do ...

2005-12-18 13:41  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, main.c:

	trailing whitespace

2005-12-17 13:47  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	revert 1.8 - what was i smoking?! the CREATE argument is already quoted;
	we just extracted it from the previous command.

2005-09-29 21:07  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	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.

2005-09-29 21:05  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	don't call the driver's set_flags() if the flags did not change at all.

2005-09-21 16:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	64-bit cleanness

2005-03-28 10:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	quote CREATE argument

2005-03-28 10:26  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	bump version

2005-03-28 10:26  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	fix inverted condition leading to endless loop when message is changed
	while isync is running.

2004-11-13 09:19  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	cope with out-of-disk-space halfways gracefully (that is, don't clobber
	the sync state including the journal, but exit immediately).

2004-10-17 16:31  Oswald Buddenhagen <ossi@users.sf.net>

	* AUTHORS:

	sf.net -> sourceforge.net. otherwise the list-post is different from the
	actual address, which makes mutt add two to addresses on list-reply ...

2004-10-17 15:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	ignore user-defined flags (for now).
	also, split off the backslash from the "core" flag names.

2004-10-17 09:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix segfault due to wrong pointer being passed to parse_response_code.
	inspired by Raimar Döffinger

2004-10-17 08:30  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	remove spurious crlf during cram auth. not sure that this instance of
	socket_write should be (re)moved, but as long as the .cont callback is
	used only for this ...
	investigation & patch by Mike Delaney.

2004-09-24 08:45  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	install supplementary doc files.
	REF: 38C5E3CF30C73C4984F41AE8786C852AB739@khyron.ads.cs.umass.edu

2004-09-20 11:31  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	use legacy flock() only on linux. at least on OS X flock aliases to
	fcntl.

2004-09-20 11:28  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/main.c, drv_imap.c, isync.h, util.c:

	stdarg.h at the right places

2004-09-15 09:33  Oswald Buddenhagen <ossi@users.sf.net>

	* README:

	update c-client compatibility

2004-09-15 09:06  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	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.

2004-09-15 08:44  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	whoops, wrong define

2004-09-08 16:40  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	don't encode maturity in version number

2004-09-08 16:38  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	optimize rpms for i686

2004-09-08 16:28  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	sanitize the OpenSSL detection

2004-09-08 16:14  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	stddef.h for offsetof

2004-09-08 14:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	first check _both_ bounds, then compare ...

2004-09-07 11:59  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	print name of mailbox being opened.

2004-08-13 11:03  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_imap.c:

	fix -C for imap mailboxes:
	- SELECT does not return [TRYCREATE]
	- fix bit field truncation

2004-06-17 13:44  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	A{C,S}_HELP_STRING aliasing tricks.

2004-05-23 16:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/drv_maildir.c:

	store new UIDVALIDITY immediately after initializing it

2004-04-27 20:23  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/main.c:

	old -l is new -l -C

2004-04-26 14:48  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/: config.c, isync.h, main.c:

	full support for absolute paths in Mailboxes

2004-04-26 14:09  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/config.c:

	strip $HOME and ~ from Mailbox paths

2004-03-29 22:32  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: compat/util.c, util.c:

	fix return values of asprintf replacement.

2004-03-29 06:52  Oswald Buddenhagen <ossi@users.sf.net>

	* src/compat/: config.c, isync.1, isync.h, main.c:

	unscrew --delete by merging it into the config file. merge --expunge as
	well for symmetry.

2004-03-27 16:07  Oswald Buddenhagen <ossi@users.sf.net>

	* .cvsignore, Makefile.am, README, configure.in, isync.spec.in,
	  src/.cvsignore, src/Makefile.am, src/compat/.cvsignore,
	  src/compat/Makefile.am, src/compat/config.c,
	  src/compat/convert.c, src/compat/isync.1, src/compat/isync.h,
	  src/compat/isyncrc.sample, src/compat/main.c,
	  src/compat/util.c, src/config.c, src/cram.c, src/dotlock.c,
	  src/dotlock.h, src/drv_imap.c, src/drv_maildir.c, src/imap.c,
	  src/isync.h, src/list.c, src/maildir.c, src/main.c,
	  src/mbsync.1, src/mbsyncrc.sample, src/mdconvert.1,
	  src/mdconvert.c, src/sync.c, src/util.c:

	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.

2004-03-26 16:34  Oswald Buddenhagen <ossi@users.sf.net>

	* get-cert:

	excessively secure temp file creation.
	more user friendliness.

2004-02-07 15:36  Oswald Buddenhagen <ossi@users.sf.net>

	* src/dotlock.c:

	portability: don't rely on struct flock layout

2004-02-01 16:44  Oswald Buddenhagen <ossi@users.sf.net>

	* .cvsignore:

	shht

2004-02-01 16:27  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: main.c, sync.c:

	once again: (slightly) better output.
	make maildir flag setting failure non-fatal. maildir sucks ...

2004-01-31 01:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: imap.c, isync.h:

	more sophisticated CAPABILITY handling. also, don't issue the command if
	the initial response already had it in the status code.

2004-01-30 23:39  Oswald Buddenhagen <ossi@users.sf.net>

	* src/imap.c:

	don't ask for NAMESPACE if Folder was specified

2004-01-30 23:35  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: imap.c, isync.h:

	following the "screw murphy" principle and commiting untested patch:
	obey LOGINDISABLED

2004-01-27 21:01  Oswald Buddenhagen <ossi@users.sf.net>

	* src/imap.c:

	PREAUTH cannot come out of the blue

2004-01-27 20:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/imap.c:

	cleanup around parse_fetch

2004-01-27 20:50  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: imap.c, isync.h, main.c:

	make Tag int, move it to imap.c

2004-01-27 00:11  Nicolas Boullis <nboullis@users.sf.net>

	* acinclude.m4, configure.in:

	Add a --disable-maintainer-mode option to configure.

2004-01-20 01:55  Oswald Buddenhagen <ossi@users.sf.net>

	* src/imap.c:

	don't use STARTTLS for PREAUTH connections. uw-imap doesn't seem to like
	it, and it does not make too much sense anyway - i think - state converse
	opinions now.

2004-01-20 01:27  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	exclude ChangeLog (do'h), NEWS and TODO when creating ChangeLog. exclude
	debian/ as well, based on the fact that it already has a detailed log -
	is that ok with everybody?

2004-01-18 02:22  Oswald Buddenhagen <ossi@users.sf.net>

	* isync.1, src/imap.c, src/isync.h, src/maildir.c, src/main.c,
	  src/sync.c:

	another message output cleanup, still not perfect (info messages will be
	interleaved with progress dots).
	support specifying -q twice to suppress warnings as well.

2004-01-17 11:38  Oswald Buddenhagen <ossi@users.sf.net>

	* isync.1:

	document mua interaction

2004-01-16 10:11  Oswald Buddenhagen <ossi@users.sf.net>

	* AUTHORS:

	credit where credit is due. are the comments satisfactory for everybody?

2004-01-15 03:51  Theodore Ts'o <tytso@users.sf.net>

	* get-cert:

	Script that can be used to extract the server's certificate from an IMAP
	server.

2004-01-15 02:23  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	remove useless define and more verbose error message.

2004-01-13 03:56  Theodore Ts'o <tytso@users.sf.net>

	* configure.in:

	Use a more sophisticated test for the existence of libdb that works for
	berk_db 4.0.

2004-01-12 01:49  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	bah, forgot to remove debian/Makefile.in from AC_OUTPUT. :}
	kde's overly sophisticated build system does that automatically ...

2004-01-12 01:24  Theodore Ts'o <tytso@users.sf.net>

	* src/: imap.c, isync.h, main.c:

	Optimized isync by not fetching the sizes of messages if they are
	unneeded (i.e., if MaxSize is not specified in the config file).

	Patch and idea originally from Nicolas Boullis <nboullis@debian.org>,
	modified/polished by Theodore Ts'o per comments by Oswald Buddenhagen.

2004-01-12 00:52  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in, src/isync.h, src/maildir.c, src/sync.c:

	sync uid database after every message. this is accompanied by a dbm ->
	db4 migration. patch by theodore, with some final polishing by me.

2004-01-12 00:38  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	use ../CVSROOT/accounts for UID mapping in ChangeLog.

2004-01-12 00:36  Oswald Buddenhagen <ossi@users.sf.net>

	* AUTHORS:

	be more explicit about contact address

2004-01-11 12:38  Oswald Buddenhagen <ossi@users.sf.net>

	* .cvsignore:

	new stuff

2004-01-11 12:35  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	getting rid of Makefile.am in debian/ - it seems to be non-standard and
	is a pita to maintain anyway. instead, make distdir and distclean depend
	on a partial debian-clean.

2004-01-11 11:53  Oswald Buddenhagen <ossi@users.sf.net>

	* autogen.sh:

	don't call configure

2004-01-09 20:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	ignore anything that does not look remotely like a maildir when
	collecting mailboxes for OneToOne.

2003-12-07 15:37  Oswald Buddenhagen <ossi@users.sf.net>

	* isyncrc.sample:

	add sample CertificateFile

2003-12-07 15:36  Oswald Buddenhagen <ossi@users.sf.net>

	* src/imap.c:

	add trailing space to password prompt

2003-12-07 15:34  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	make imaps: on the command line adjust the port and ssl options as well

2003-12-07 15:09  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	bump version

2003-12-02 02:53  Oswald Buddenhagen <ossi@users.sf.net>

	* src/imap.c:

	echo the mailbox the password is for

2003-11-11 03:02  Oswald Buddenhagen <ossi@users.sf.net>

	* AUTHORS:

	be more explicit about maintainership, as people don't seem to get it.

2003-09-02 12:06  Oswald Buddenhagen <ossi@users.sf.net>

	* isync.1:

	minor additions

2003-07-02 17:18  Oswald Buddenhagen <ossi@users.sf.net>

	* src/imap.c:

	fix crash when syncing multiple mailboxes over a Tunnel

2003-05-14 13:42  Oswald Buddenhagen <ossi@users.sf.net>

	* isync.1:

	minor

2003-05-07 00:06  Oswald Buddenhagen <ossi@users.sf.net>

	* .cvsignore, Makefile.am, autogen.sh, configure.in,
	  src/config.c, src/cram.c, src/dotlock.c, src/imap.c,
	  src/isync.h, src/list.c, src/maildir.c, src/main.c,
	  src/sync.c:

	- make it work without SSL
	- switch from -Ds in Makefile to config.h
	- small header cleaup

2003-05-07 00:04  Oswald Buddenhagen <ossi@users.sf.net>

	* isync.spec.in:

	make it actually work

2003-05-06 02:17  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	minors

2003-05-06 02:15  Oswald Buddenhagen <ossi@users.sf.net>

	* README:

	i'm bored :)

2003-05-05 17:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, isync.h, main.c:

	don't free any config strings - who cares for a few bytes?
	this fixes some crashes at exit.

2003-05-05 17:17  Oswald Buddenhagen <ossi@users.sf.net>

	* Makefile.am:

	switch ChangeLog generation to cvs2cl

2003-05-05 13:43  Oswald Buddenhagen <ossi@users.sf.net>

	* isync.1:

	minor fixes

2003-05-05 13:41  Oswald Buddenhagen <ossi@users.sf.net>

	* configure.in:

	cleanup

2003-05-05 13:24  Oswald Buddenhagen <ossi@users.sf.net>

	* src/main.c:

	accumulate status over multiple mailboxes, i.e., don't abort after first
	failure

2003-05-05 12:54  Oswald Buddenhagen <ossi@users.sf.net>

	* src/imap.c:

	fix imaps:

2003-02-27 18:43  Oswald Buddenhagen <ossi@users.sf.net>

	* src/sync.c:

	ignore \Recent, as it is voided by the syncronization run itself.

2002-12-28 15:31  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: config.c, cram.c, imap.c, isync.h, list.c, maildir.c,
	  main.c, sync.c:

	- update copyrights. 2003 didn't begin yet, but who cares? :)

2002-12-28 04:14  Oswald Buddenhagen <ossi@users.sf.net>

	* isync.1:

	- fixed typo
	- updated maintainer and location

2002-12-28 04:12  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: maildir.c, sync.c:

	- update isyncmaxuid properly

2002-12-28 04:04  Oswald Buddenhagen <ossi@users.sf.net>

	* src/config.c:

	- fixed two crashes

2002-12-28 04:02  Oswald Buddenhagen <ossi@users.sf.net>

	* src/imap.c:

	- handle bogus search responses more gracefully

2002-12-28 04:00  Oswald Buddenhagen <ossi@users.sf.net>

	* src/imap.c:

	- workaround imap server bug: lock files are no mailboxes

2002-12-28 03:58  Oswald Buddenhagen <ossi@users.sf.net>

	* src/: imap.c, sync.c:

	- improve console output

2002-12-28 03:11  Oswald Buddenhagen <ossi@users.sf.net>

	* .cvsignore:

	- ssht!

2002-12-28 03:05  Oswald Buddenhagen <ossi@users.sf.net>

	* .cvsignore, AUTHORS, Makefile.am, README, autogen.sh,
	  configure.in, isync.spec.in, src/.cvsignore, src/Makefile.am,
	  src/config.c, src/cram.c, src/dotlock.c, src/dotlock.h,
	  src/imap.c, src/isync.h, src/list.c, src/maildir.c,
	  src/main.c, src/sync.c:

	- took over maintenance
	- moved to sourceforge
	- reorganized cvs structure

2002-10-30 02:31  Michael Elkins <me@mutt.org>

	* config.c, cram.c, dotlock.c, dotlock.h, imap.c, isync.1,
	  isync.h, list.c, maildir.c, main.c, sync.c:

	Updated the copyright notice to allow an exception for linking with OpenSSL,
	which has a non-GPL compatible license.

2002-10-30 02:23  Michael Elkins <me@mutt.org>

	* .cvsignore, config.c, imap.c, isync.1, isync.h, maildir.c,
	  main.c, sync.c:

	Bunch 'o patches from Oswald Buddenhagen:

	i implemented some cool stuff (tm).
	first, the long missing "create server-side missing mailboxes". -C now
	creates both local and remote boxes; -L and -R create only local/remote.
	second, i implemented a 1:1 remote:local folder mapping (-1) with an
	optional INBOX exception (inbox/-I). the remote folder is specified with
	the folder keyword (or -F switch) and takes precedence over the
	namespace setting. the local directory with the mailboxes can now be
	specified on the command line, too (-M).

	another patch:
	- made the -1 switch settable permanently (OneToOne). after all, you
	  usually define your mailbox layout once forever. removed -A, as it is
	  semantically -a modified by -1.
	- cleaned up message output a bit. still, the quiet variable should be
	  used throughout the program. at best, create some generic output
	  function, which obeys a global verbosity level variable.
	- optimized + cleaned up configuration parser slightly
	- minor cleanups

	add an (almost) unique id to every uploaded message and search for it
	right after. i thought about using the message-id, but a) it is not
	guaranteed to be unique in a mailbox (imagine you edit a mail and store
	the dupe in the same box) and b) some mails (e.g., postponed) don't even
	have one. a downside of the current implementation is, that this
	id-header remains in the mailbox, but given that it wastes only 27 bytes
	per mail and removing it would mean several roundtrips more, this seems
	acceptable.
	i changed the line-counting loop to use a mmapped file instead of
	reading it in chunks, as it makes things simpler and is probably even
	faster for big mails.
	the amount of goto statements in my code may be scary, but c is simply
	lacking a multi-level break statement. :)

	this is the "shut up" patch. :) it makes the -q option consequent, so to
	say.
	additionally it adds an -l option which gathers all defined/found
	mailboxes and just outputs the list. don't ask what i need it for. ;)

2002-10-30 02:01  Michael Elkins <me@mutt.org>

	* maildir.c:

	fixed missing closedir() call (Joey Hess)

2002-06-27 03:55  Michael Elkins <me@mutt.org>

	* imap.c:

	explicitly set global.pass to NULL when getpass() returns an empty string.

2002-06-27 03:51  Michael Elkins <me@mutt.org>

	* imap.c:

	Oswald Buddenhagen <ossi@kde.org>
	* fix imap_open() brokeness with PREAUTH (missed hunk from previous patch)

2002-06-22 17:06  Michael Elkins <me@mutt.org>

	* dotlock.c, imap.c:

	fixed errors introduced by ME when hand-applying Oswald Nuddenhagen's
	patch.

2002-06-22 01:21  Michael Elkins <me@mutt.org>

	* autogen.sh, dotlock.c, imap.c, isync.h, main.c:

	Patch from Oswald Buddenhagen <ossi@kde.org>
	        - move prompt for password to imap_open()
	        - don't ask for global password in PREAUTH state
	        - use socketpair() to create one full-duplex fd in tunnel mode
	          instead of two half-duplex pipes
	        - don't set lck.l_pid in fcntl() call (its read-only)
	        - use F_SETLK instead of F_SETLKW to avoid infinite waiting
	        - use "$@" in autogen.sh to get proper word expansion

2002-06-21 00:26  Michael Elkins <me@mutt.org>

	* configure.in, isync.h:

	Fixed to compile under FreeBSD 4.6-RELEASE.  Must include ndbm.h rather than
	db.h.

2002-06-20 23:33  Michael Elkins <me@mutt.org>

	* Makefile.am, dotlock.c, dotlock.h, maildir.c:

	remove debian/files

	move dotlocking code to dotlock.c.

	dotlocking code fixed to ignore whether or not the lockfile exists on
	open().  we only care about whether fcntl() was able to lock it.

2002-06-19 02:31  Michael Elkins <me@mutt.org>

	* sync.c:

	Don't bother uploaded messages marked deleted when we are going to expunge.

2002-06-19 01:11  Michael Elkins <me@mutt.org>

	* AUTHORS, imap.c, maildir.c:

	fixed unused var warning in imap_open()

	locking cleanups from Oswald Buddenhagen <ossi@kde.org>
	        * don't need to stat the lockfile since it will always be size 0
	        * only remove lockfile when we actually succeeded in locking

2002-06-19 00:44  Michael Elkins <me@mutt.org>

	* Makefile.am:

	Debian package cleanups from Oswald Buddenhagen <ossi@kde.org>

2002-06-18 06:37  Michael Elkins <me@mutt.org>

	* README, isync.1, isync.h, maildir.c, main.c, sync.c:

	updated URL for project

	fixed segmentation fault caused by double free() when an error occurred
	during the IMAP transmission.

	fixed bug where isync could not handle a 0 value UIDVALIDITY

2002-04-19 19:43  Michael Elkins <me@mutt.org>

	* config.c, configure.in, imap.c, isync.1, isync.h,
	  isyncrc.sample, main.c:

	PREAUTH support from Oswald Buddenhagen <ossi@kde.org>

	Added Tunnel directive to allow the user to specify a shell command to run
	to set up an IMAP connection in place of a TCP socket (eg., to run over
	an SSH session).

2002-01-28 19:39  Michael Elkins <me@mutt.org>

	* isync.spec.in:

	post 0.8 release commit

2002-01-28 19:34  Michael Elkins <me@mutt.org>

	* configure.in:

	check for dbm_open() in libc and libdb

2002-01-17 19:33  Michael Elkins <me@mutt.org>

	* sync.c:

	don't bother renaming the message file if we are about to unlink() it

2002-01-16 22:23  Michael Elkins <me@mutt.org>

	* AUTHORS, Makefile.am, sync.c:

	remove tilde backup files for distclean

	fixed indentation

	added full name to AUTHORS

	reformated NEWS blurb for 0.8

2002-01-16 22:13  Michael Elkins <me@mutt.org>

	* maildir.c, sync.c:

	sync_mailbox() did not update the msg struct when flags were changed,
	causing the expunge command to fail

	remove bogus strfcpy() line

2002-01-16 21:51  Michael Elkins <me@mutt.org>

	* Makefile.am, configure.in:

	added debian build files dist target so that people can use them to build
	their own .deb packages without having to use CVS

2002-01-16 21:43  Michael Elkins <me@mutt.org>

	* isync.1, maildir.c, sync.c:

	added debian build files

	fixed indentation

	added bug note to manpage about db file format not being architecture
	independent

2002-01-16 21:22  Michael Elkins <me@mutt.org>

	* maildir.c, sync.c:

	remove the uid from the db when a message is deleted from the maildir

	optimize db fetch/store to not copy the base filename

2002-01-16 19:47  Michael Elkins <me@mutt.org>

	* config.c, configure.in, cram.c, imap.c, isync.1, isync.h,
	  list.c, maildir.c, main.c, sync.c:

	updated year in copyright notice

	the uid for each message in the maildir is now stored in a dbm database
	rather than the filename.  this change was necessary because isync became
	confused if you copied a message to another folder, in which case the uid
	was invalid.

	as a result of the above change, isync now acquires a mutex on the mailbox
	to protect the dbm database from concurrent access.

	main() was reworked to continue gracefully when an error is encountered, and
	to always call maildir_close() so that the lock can be disabled, and the
	database closed.

2001-11-20 18:28  Michael Elkins <me@mutt.org>

	* Makefile.am, isync.spec.in:

	post 0.7-release commit

2001-11-20 18:06  Michael Elkins <me@mutt.org>

	* Makefile.am, isync.1, isync.h, maildir.c, main.c:

	added --create/-C command line option to force creation of the local
	maildir-style mailbox if nonexistent

	debug.h was not included in isync_SOURCES in Makefile.am

2001-11-19 19:41  Michael Elkins <me@mutt.org>

	* Makefile.am, config.c, configure.in, isync.h, list.c, main.c:

	added memory debugging code

	fixed memory leak in free_list()

	free memory associated with global settings on exit

2001-11-16 21:23  Michael Elkins <me@mutt.org>

	* cram.c, imap.c, isync.h, sync.c:

	remove c++ style comments

	use %lu and cast off_t to unsigned long in printf()

2001-11-15 23:59  Michael Elkins <me@mutt.org>

	* config.c, isync.1, isync.h, main.c, sync.c:

	Added MaxMessages patch from Eivind Eklund <eivind@FreeBSD.org>.

	config_defaults() can just use memcpy() instead of assigning each struct
	member individually.

	config_defaults() can be declared static

2001-11-14 17:40  Michael Elkins <me@mutt.org>

	* config.c, configure.in:

	move strndup() code into config.c for less complexity

	change AC_REPLACE_FUNC(strndup) to AC_CHECK_FUNCS(strndup)

	sed expression checking for gcc-3.0 should be quoted beccause it
	fails under Solaris 2.7

2001-11-13 00:36  Michael Elkins <me@mutt.org>

	* config.c, sync.c:

	strndup() could return a non-NULL terminated string

	size_t should be printed with %lu

	when expending tildes (~), an extra slash was inserted after the user's home
	directory

2001-11-12 23:03  Michael Elkins <me@mutt.org>

	* isync.h, maildir.c, main.c:

	merge maildir_sync() and maildir_close().  the maxuid in a maildir still
	needs to be updated in --fast mode, and the sync code already checks to see
	if any changes were made to the mailbox.

2001-11-09 00:35  Michael Elkins <me@mutt.org>

	* README:

	add FreeBSD to the list of tested platforms

2001-11-09 00:23  Michael Elkins <me@mutt.org>

	* config.c, configure.in, imap.c, maildir.c:

	update version to 0.7

	detect short write in write_strip()

	fix compilation warnings with gcc-2.95.4

2001-10-31 19:50  Michael Elkins <me@mutt.org>

	* configure.in, imap.c, isync.h, main.c, sync.c:

	set compiler warnings for gcc-3.0 as well

	display message with count of uploaded messages

	--quiet now supresses warnings in sync_mailbox()

	fixed compiler warnings with -Wshadow

2001-10-31 06:06  Michael Elkins <me@mutt.org>

	* isync.1:

	post 0.6 commit

2001-10-30 22:57  Michael Elkins <me@mutt.org>

	* README, configure.in:

	add strndup replacement function for systems which lack it

2001-10-03 17:10  Michael Elkins <me@mutt.org>

	* Makefile.am, maildir.c:

	fixed broken code in maildir_clean_tmp()

2001-10-03 16:48  Michael Elkins <me@mutt.org>

	* maildir.c:

	added code to clean the tmp directory in a maildir to comply with
	maildir(5)

2001-10-03 06:32  Michael Elkins <me@mutt.org>

	* config.c:

	forgot to add code to parse the `Delete' option

2001-10-03 06:18  Michael Elkins <me@mutt.org>

	* main.c:

	forgot conditional #if HAVE_LIBSSL around setting of .use_imaps in main()
	from command line arguments

2001-10-03 06:15  Michael Elkins <me@mutt.org>

	* main.c:

	update Copyright printed by --help

	add compile time option list to --help output

2001-10-03 05:42  Michael Elkins <me@mutt.org>

	* config.c, isync.1, isync.h, isyncrc.sample, main.c, sync.c:

	added `Delete' configuration option to force -d option

	sync_mailbox() didn't consider MaxSize == 0 to mean "unlimited".

	load_config() needs to print a newline in its error messages since
	next_arg() kills the newline of the line that was read out of the config
	file.

2001-10-03 00:01  Michael Elkins <me@mutt.org>

	* imap.c, sync.c:

	fixed maildir message filenames to comply with the maildir(5) specification.

	fixed write_strip() and imap_fetch_message() to check the return code of
	write() and fsync() to comply with maildir(5) spec.

2001-10-02 23:43  Michael Elkins <me@mutt.org>

	* main.c:

	the `Expunge' config directive didn't work since only the -e command line
	argument was consulted.

2001-10-02 22:46  Michael Elkins <me@mutt.org>

	* config.c, imap.c, isync.h:

	we should issue a CAPABILITY even if we aren't going to use ssl/tls so that
	cram-md5 auth still works.

2001-07-18 18:56  Michael Elkins <me@mutt.org>

	* config.c:

	find_box() should attempt to expand all filenames if none of the other
	methods found a match.

2001-07-18 18:49  Michael Elkins <me@mutt.org>

	* config.c, isync.h, maildir.c:

	fixed to not expand filenames until they are used inside of maildir_open(),
	so that aliases are not required for simple filenames.
	[re: http://bugs.debian.org/102255]

2001-06-22 23:30  Michael Elkins <me@mutt.org>

	* main.c:

	--host option didn't check for imaps: prefix

2001-06-21 20:45  Michael Elkins <me@mutt.org>

	* main.c:

	fixed core when specifying multiple mailboxes on the command line

2001-06-18 21:38  Michael Elkins <me@mutt.org>

	* configure.in, imap.c, isync.1:

	handle untagged responses in imap_fetch_message() so that it doesn't bomb
	out if new mail arrives while in the process of downloading

	noted in BUGS section of man page that if new mail arrives after the initial
	message list has been retrieved from the IMAP server, that new mail will not
	be fetched until the next invocation of isync.

2001-06-18 17:49  Michael Elkins <me@mutt.org>

	* config.c, imap.c, isync.h, main.c:

	isync should continue to process additional mailboxes even if there is an
	error with a previous mailbox.

	added -a (--all) flag to synchronize all mailboxes defined in ~/.isyncrc

2001-02-28 01:02  Michael Elkins <me@mutt.org>

	* config.c, imap.c:

	fixed compiler warnings under Solaris 2.7

2001-02-19 18:44  Michael Elkins <me@mutt.org>

	* cram.c, imap.c, maildir.c:

	rfc2595 compliance patch from Daniel Resare <noa@metamatrix.se>
	        - CAPABILITY should be reissued after starting TLS since the
	          previous call was not protected

2001-02-14 20:46  Michael Elkins <me@mutt.org>

	* config.c, imap.c, isync.1, main.c, sync.c:

	patch from Daniel Resare <noa@metamatrix.se>:
	1 giving a path to a nonexistant rc-file with the -c argument dumps core

	  The patch adds a check to ensure that the given rc-file is accessible

	2 the error messages given from failed openssl calls are bogus

	  The handles the error from SSL_connect () correctly. The bug is
	  understndable since the error handling in openssl is quite obfuscated.
	  Good news is that the documentation manapges has been greatly updated in
	  the latest version (0.9.6). See in particular err(3), ERR_get_error(3)
	  and SSL_get_error(3).

	  Please note that possible SSL_ERROR_SSL type errors from SSL_read() and
	  SSL_write() is not handled. This should also be fixed.

	3 connecting using the STARTTLS command with an imap server that is
	  configured only to accept the TLSv1 protocol gives an error because isync
	  sends an SSLv2 Hello message for backwards compability. (This is the case
	  with the uw-imap 2000 that ships with redhat-7.0)
	  I've read RFC2595 several times to see if it says something about
	  compability SSL2/SSL3 hello messages but can't find anything. IMHO the
	  correct thing to do is change the default to not use SSL2/3 compability
	  hello when using the STARTTLS command but use it if the imaps port is
	  used. The patch implements this change

	4 repeated calls to SSL_CTX_set_options overwrites the old settings (the
	  values needs to be ORed together)

	  fixed in the patch

	patch from me@mutt.org:
	        \Recent messages were put in the cur/ directory instead of new/

	        give error message when the LOGIN command fails

2001-02-01 23:35  Michael Elkins <me@mutt.org>

	* imap.c:

	patch from Daniel Resare <noa@metamatrix.se>
	        - don't initialize ssl support if none of use_sslv* is enabled

2001-01-26 20:21  Michael Elkins <me@mutt.org>

	* imap.c, isync.h:

	include <sys/types.h> for off_t

	patch from "lorenzo martignoni" <lorenzo.martignoni@technologist.com>
	        - fixed uploading of message to IMAP server

2001-01-24 07:09  Michael Elkins <me@mutt.org>

	* config.c, cram.c, imap.c, isync.1, list.c, maildir.c, main.c,
	  sync.c:

	fixed cram compilation error under bsd

	updated man page

2001-01-16 19:45  Michael Elkins <me@mutt.org>

	* config.c, imap.c, isync.1, isync.h, main.c:

	added support for tilde (~) expansion in the `Mailbox' and `CertificateFile'
	configuration directives

	added `Maildir' configuration command to specify the default location of the
	user's mailboxes.  If a relative path is used in a `Mailbox' command, this
	path is used as a prefix.

2001-01-11 10:21  Michael Elkins <me@mutt.org>

	* configure.in, imap.c, isync.h:

	set imap->prefix to be the namespace prefix

	update version to 0.5

	fixed compilation warnings in imap.c

2001-01-11 10:13  Michael Elkins <me@mutt.org>

	* Makefile.am, config.c, imap.c, isync.1, isync.h,
	  isyncrc.sample, main.c, sync.c:

	broke config code into config.c

	added support for uploading local messages with no UID to the IMAP server

	added Expunge configuration option

	added CopyDeletedTo configuration option

2001-01-09 20:09  Michael Elkins <me@mutt.org>

	* maildir.c, sync.c:

	always put changed messages in the cur/ subdirectory since they are no
	longer new.

	don't set \Seen implicitly for messages in the cur/ folder.  Require the S
	flag on the message since Mutt will move Old (unread, but not recent)
	messges into cur/.

2001-01-08 09:45  Michael Elkins <me@mutt.org>

	* Makefile.am, main.c:

	patch from Hugo Haas <hugo@larve.net>
	        -c was not specified in the getopt*() calls

	        set global password to the one the user inputs and use that as the
	        default for remaining mailboxes

2001-01-05 21:20  Michael Elkins <me@mutt.org>

	* configure.in:

	added --with-ssl-dir to specify an alternate installation of OpenSSL

2000-12-31 22:39  Michael Elkins <me@mutt.org>

	* isync.spec.in:

	pre 0.4 commit.

	updated rpm spec file

2000-12-31 22:37  Michael Elkins <me@mutt.org>

	* sync.c:

	display how many messages were fetched from the server

2000-12-31 22:17  Michael Elkins <me@mutt.org>

	* imap.c:

	fixed compilation error with no libssl support ("lorenzo martignoni"
	<lorenzo.martignoni@technologist.com>)

2000-12-28 18:44  Michael Elkins <me@mutt.org>

	* main.c:

	fixed config parser to accept arbitrary whitespace

2000-12-27 21:16  Michael Elkins <me@mutt.org>

	* imap.c:

	use imap_close to terminate a connection in imap_open()

2000-12-27 21:14  Michael Elkins <me@mutt.org>

	* imap.c, isync.1, isync.h, maildir.c, main.c:

	allow leading whitespace in config files

	now possible to sync multiple mailboxes by specifying multiple aliases on
	the command line.  IMAP connections are reused if possible.

	don't initialize ssl unless we are going to use it.

2000-12-23 21:57  Michael Elkins <me@mutt.org>

	* imap.c, isync.h:

	don't use NAMESPACE unless the server supports it

2000-12-23 00:02  Michael Elkins <me@mutt.org>

	* Makefile.am, README, cram.c, imap.c, isync.h:

	added CRAM-MD5 authentication support.

	parse server capability string to determine if STARTTLS is available

2000-12-22 21:22  Michael Elkins <me@mutt.org>

	* README, imap.c, isync.1, isync.h, main.c:

	isync-brokenservers.diff (Jeremy Katz <katzj@linuxpower.org>)
	adds support for disabling NAMESPACE, and disable various flavors of TLS/SSL
	for use with some broken IMAP servers.

2000-12-22 19:30  Michael Elkins <me@mutt.org>

	* imap.c, sync.c:

	prompt user if they wish to continue if the server's X.509 certificate can't
	be verified.

	sync_mailbox should consider uid == 0 to be "unknown"

2000-12-22 15:48  Michael Elkins <me@mutt.org>

	* main.c, sync.c:

	fixed sync_mailbox() to correctly write new messages to the local maildir
	box (Thomas Roessler <roessler@does-not-exist.org>)

2000-12-22 15:24  Michael Elkins <me@mutt.org>

	* main.c:

	set default MaxSize to 0 (unlimited)

	invert test for password being set after getpass() call (Magnus Jonsson
	<bigfoot@acc.umu.se>)

2000-12-22 07:14  Michael Elkins <me@mutt.org>

	* configure.in, imap.c, isync.1, isync.h, isyncrc.sample,
	  maildir.c, main.c, sync.c:

	added MaxSize configuration variable

	fixed --fast to work robustly without relying on the \Recent flag in
	messages

2000-12-21 23:10  Michael Elkins <me@mutt.org>

	* imap.c, isync.h, maildir.c, sync.c:

	RFC822.PEEK is obsolete in RFC2060.  Use BODY.PEEK[] instead, which does
	the same thing

	keep track of the uidvalidity so isync can detect if the mailbox on the
	server has changed since the last sync.

2000-12-21 20:56  Michael Elkins <me@mutt.org>

	* Makefile.am, isync.spec.in:

	added support for building RPMS

2000-12-21 19:49  Michael Elkins <me@mutt.org>

	* Makefile.am, isync.1:

	added target for creating html version of the man page

	documented the imaps: prefix to the Host command

2000-12-21 19:11  Michael Elkins <me@mutt.org>

	* imap.c, sync.c:

	can't assume flag order when fetching a message.  just search for the
	first `{' to find the message size.

2000-12-21 18:16  Michael Elkins <me@mutt.org>

	* isync.1, sync.c:

	added BUGS section to manpage detailing the fact that we break the
	maildir(5) spec by parsing the filename

	change message delivery to use the method described in maildir(5)

2000-12-21 17:51  Michael Elkins <me@mutt.org>

	* configure.in, main.c, sync.c:

	use getpass() to get the user's password

	unlink the temp file if we are unable to fetch a new message from the
	server.

	update version to 0.3

2000-12-21 11:14  Michael Elkins <me@mutt.org>

	* isync.1:

	fixed typo in man page for --verbose option

2000-12-21 10:24  Michael Elkins <me@mutt.org>

	* Makefile.am, README, imap.c, isync.h, list.c:

	added generic IMAP list parser and rewrote imap_exec() to handle
	arbitrary data instead of hardcoded

2000-12-21 06:51  Michael Elkins <me@mutt.org>

	* Makefile.am, README, configure.in, main.c:

	fixes to compile cleanly under Solaris 2.7

2000-12-21 06:27  Michael Elkins <me@mutt.org>

	* configure.in, imap.c, isync.1, isync.h, main.c:

	added OpenSSL support

2000-12-21 00:35  Michael Elkins <me@mutt.org>

	* configure.in, main.c:

	config options were not case insensitive

2000-12-21 00:30  Michael Elkins <me@mutt.org>

	* imap.c, isync.h, maildir.c, main.c, sync.c:

	don't fetch deleted messages when expunging

	display number of messages that are to be deleted

	flags for \Recent messages were not properly fetched

	local messages with updated flags were not corrected renamed

2000-12-20 22:28  Michael Elkins <me@mutt.org>

	* Makefile.am:

	updated ChangeLog

	added log: rule in Makefile.am

2000-12-20 22:10  Michael Elkins <me@mutt.org>

	* autogen.sh:

	added autogen.sh to regenerate the build environment

2000-12-20 22:00  Michael Elkins <me@mutt.org>

	* COPYING:

	added missing files

2000-12-20 21:41  Michael Elkins <me@mutt.org>

	* AUTHORS, Makefile.am, README, configure.in, imap.c, isync.1,
	  isync.h, isyncrc.sample, maildir.c, main.c, sync.c:

	initial import

