Revert "lmtp_sieve: remove unused buffer"

This reverts commit e3a56e6f7d31622f90186493fd8347963c5c44ca.
Bug #3664 - revert username changes

This is just:

Revert "Bug #3452 - fix username in sieve vacation notice"

This reverts commit e02ff014b1d6d6351e835a5e32d899a5afc6ae31.
rehash: force 32 bit during dir_hash_c in both locations

(includes all the commits from 2.4.x)
Bug #3667 - ignore .SILENT if qresync enabled

This is required by RFC 4551, that at least the new MODSEQ is
returned to keep the client cache in sync.  Given that, we will
just return the UID/MODSEQ/FLAGS triplet, same as any other case.

Thanks Leena for reporting and following up.
Revert "Bug 3652 - install Perl modules into 'vendor' dirs"

This reverts commit 7dc331023e4869b782a1fe0217415e8ce868381d.
Bug 3652 - set Perl search paths correctly

Finding Cyrus Perl modules in Perl code is not trivial.

 - There are up to 4 possible installation directories: (site,vendor) X
   (arch,lib).

 - Installation directories are derived in unobvious ways from the
   configuration of the build-time Perl, not the run-time Perl, and are
   different on different OSes.

 - Cassandane runs Cyrus executables from an installation staging
   directory, not a full install, whose value is not predictable at
   build time.

 - The code to work this out is non-trivial and should be centralised,
   yet it cannot be put in a module because it's needed to...find
   modules.

So this latest approach does most of the work at build time, in a Perl
script which is used as a pre-install filter for Perl scripts.  It
calculates the part of the include paths which can be calculated at
build-time and emits Perl code which does the remainder at run-time.
This boilerplate inserted by the filter before the first "use" statement
in the script.

Also, changed the way cyradm.sh bootstraps from shell to Perl to be
consistent with installsieve and sieveshell.

The rest of the commit is mostly build-time glue to get the arguments
for the pre-install script into the actual Makefiles that need them.
MakeMaker makes this unobvious, of course.

Thanks to Rob Mueller for discussions and review.
Bug 3668 - merge Fastmail changes to annotator

 - handle messages with no text part

 - change the handling of ANNOTATIONS to match wire protocol

 - Fix warnings on perl modules.

 - Don't die in annotator on 0 length body part

 - RFC2047 supercedes RFC1522.
Add --with-ldap=/usr switch to autobuild.sh
sieve/message.c: remove #include "parseaddr.h"

message.c does not use any declaration from parseaddr.h, so it
does not have to include it.
ptclient: fix top level coverage_all target

This broke Jenkins build #519
ptclient: fix various compile warnings

Some due to old code, some due to partially-applied API changes in the
2.5 series.
ptclient: update cvsignore -> gitignore
Document switching on improved_mboxlist_sort.  bug #3627
rehash: consistent messages and better options

Can now pass '-n' to not make any changes, '-v' for verbose output,
and -f|F and -i|I to change the hashing options.  If no hashing
options are given on the command line, they are read from imapd.conf.

There are some risks with running this command with 1 char named
top level mailboxes or users - so don't do that.
rehash: improve virtdomains handling
rehash: handle top level folders ('random') properly
mboxname: reject single character toplevel folder names
mboxname: also reject single-char folder names
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.
GUID IMAP COMMANDS

This patch factors out stuff we used to have in the old MD5UUIDs
patch, the following FETCH responses in imapd:

FETCH DIGEST.SHA1 => 40 character hex string (message sha1)
FETCH RFC822.SHA1 => 40 character hex string (message sha1, calculated)
FETCH RFC822.FILESIZE => size of actual file on disk (via stat or mmap)

It also adds a capability string item: "DIGEST=SHA1"

Totally non-standard of course, but way useful for our replication checking
scripts.  Embrace and extend 'r' us.

Anyone feel like writing an RFC for fetching the digest of a message via
IMAP?  If the server calculated it on delivery and cached it then you'd have
a great way to clean up after a UIDVALIDITY change or other destabilising event
without having to fetch every message again.