avcache is meant to accelerate virus checks by caching previously
scanned mails that have been found to be OK.  The rationale is that
bulk mails (mailing lists, newsletters, spam) should only be scanned
once.

avcache needs to run in a directory where it can read and write a file
"cleanup-timestamp" and it needs two subdirectories called
"to-be-checked" and "uninfected", both readable and writable.

The virus scanner is given on the command line.  There are no further
options.  avcache is configured through environment variables.

If compiled with -DSMTP, avcache will deliver the email via SMTP to
$NEXTIP:$NEXTPORT.  The envelope sender and recipient are taken from the
environment (qmail style $SENDER and $RECIPIENT, or if compiled with
-DPOSTFIX $sender and $recipient).

Without -DSMTP the mail is piped into /var/qmail/bin/qmail-inject.

avcache is using the file "cleanup-timestamp" to keep track of cleanup.
If this file is older than 10 minutes, all files older than 10 minuets
in "uninfected" are deleted.  This keeps an upper bound on the space
usage.

avcache expects stdin to be a file, i.e. mmap and lseek must work.

Race conditions in to-be-checked are avoided by opening the files with
O_EXCL.  If they already existed, a random pause is done and avcache
tries again.  If the file is older than 60 seconds, avcache considers it
stale and overwrites it.

The file names are the MD5 checksum over the partial header and full
body of the email.  avcache disregards Delivered-To and Received lines
in the header.

avcache is meant to be compiled using the diet libc
(http://www.fefe.de/dietlibc/) and it needs libowfat
(http://www.fefe.de/libowfat/).
