Makefile.am: imap_libimap_a_SOURCES += imap/index.c

imap/index.c defines index_finduid(), uses search_prefilter_message()
and is not included in imap/libimap.a .

imap/search_engines.c defines search_prefilter_message(), uses
index_finduid() and is included in imap/libimap.a .

Obviously imap/search_engines.c and imap/index.c can be used only together,
so if the one file is in libimap.a, the other belongs there, too.

-- remove imap/index.c from all executables and add it to imap/libimap.a
autoconf: replace all AC_ERROR with AC_MSG_ERROR

The Autoconf macro AC_ERROR is obsolte, the newer version is called
AC_MSG_ERROR.
Merge SSL_{LDFLAGS,LDADD} -> SSL_LIBS

as Dilyan points out, it's unnecessary to have these two being separate
in the Makefile (it *is* actually necessary at one point in the
configure script, but that doesn't need to be visible outside of it).

Presumably this will help Dilyan remove LD_BASIC_FLAGS et al.
Fix warnings in htmlstrip.c
Fix warning in quota.c
Remove 256 byte limit on cyrus.conf arg values

by pre-splitting the line into arguments when the line is parsed from
the file and not later on demand.  The limits are now

- lines must be at most 4095 bytes long
- lines must contain at most 64 arguments

This also removes an aliasing problem, where the following

    foo cmd="/usr/bin/foo --listen=bar --fnarp" listen=quux

would do the wrong thing when asked for the value of the "listen" arg.

The 256 byte limit was very annoying when running Cassandane with
--valgrind, which would generate "cmd" arguments longer than that.
idled: fork after creating socket

this avoids a race condition at startup where preforked imapds would try
to talk to idled before idled had created it's rendezvous socket.
idle: shut down on SIGQUIT
idle: don't lose socket after first use

Also - clean up after self by using idle_init()/idle_done()
rather than the braindead "idle_enabled()" multipurpose
interface.
Makefile.am: remove LD_(BASIC,SERVER,SIEVE,UTILITY)_FLAGS

The LDFLAGS (like "-Lsomething") and LDADD/LIBADD flags (-lsomething), as
used in Makefile.am can be unified in LDADD/LIBADD, so that
LD_..._FLAGS stay empty and can be removed.
Makefile.am: remove LD_SIEVE_FLAGS
timsieved/scripttest.c: mark internal functions with "static"
Makefile.am: build doc/text/htmlstrip only on "make dist"

before this patch, htmlstrip was build on "make all", whereas it was
necessary only during "make dist".
Makefile.am: move the defintion of COM_ERR_LIB here

When the implementation of libcom_err.a, distributed with cyrus-imapd is
used, com_err/et/libcom_err.a shall be build, before the programs depending
on it are linked with it (as linking does not work otherwise).  By moving
the definition of COM_ERR_LIB from configure.ac to Makefile.am (for this
case) Automake knows, that the value of COM_ERR_LIB might be
com_err/et/libcom_err.a and Automake can and does create the necessary
dependencies.  In turn, when building something that depends on the bundled
libcom_err.a, it is ensured, that com_err/et/libcom_err.a is built on the
right time.
quotalegacy: store records starting with '%' cleanly

This is to later allow DLIST items to be stored in the quota db.
add quota_changelock and use in mboxlist
quota: use dlist for storage and replace 'quota -f' again

This time we store a 'SCAN' item in the quota file, like
so - a regular file might be:

%(S (123456 1000000) M (500) AS (0))

And during the scan, might be:

%(S (123456 1000000) M (500) AS (0) SCAN %(MBOX "user.foo.Sent Mail" S 85764 M 400 AS 0))

Everything which updates quotas can just use the name of MBOX
in the 'SCAN' key to determine if it should also update the
scanuseds[] array - if the mailbox is sort-order less than or
equal to, then it should.

This is race-free except for creation of a folder AFTER the
last folder name during a quota -f run which covers multiple
folders.  This could be fixed by putting mailbox create/delete
under the $QUOTACHANGE lock - but it means nobody can create
or delete any folder while 'quota -f' is running, instead of
just blocking the creation and deletion of quotaroots.
XXX remove debugging
sync: add extra 'MAILBOXDELETE' log item which just causes a delete on the replica
Remove sieve action string

We use sieve to forward messages to a notification
daemon which can send SMSes, and we don't want them
filled with information about the actions which
Sieve took.

This patch stops the action_string being appended to
the message sent to the notify daemon.