-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

/*
8""""8                                 8""8""8                
8    " eeeee  e    e eeeee eeeee eeeee 8  8  8 eeeee e  e     
8e     8   8  8    8 8   8   8   8  88 8e 8  8 8   8 8  8     
88     8eee8e 8eeee8 8eee8   8e  8   8 88 8  8 8eee8 8e 8e    
88   e 88   8   88   88      88  8   8 88 8  8 88  8 88 88    
88eee8 88   8   88   88      88  8eee8 88 8  8 88  8 88 88eee 


88     eeeeeee 
8      8     8 
8      8     8 
8      8     8 
8888   8     8 
8888 8 88eeee8 
		  
Joshua Teitelbaum 06/24/2004
*/		  

Hi there, you made it this far, but you may need more courage and kung-foo.

This is the OpenPGP Version of CryptoMail.
This README is for the SOURCE VERSION.

IMPATIENT DIRECTIONS:
See INSTALL
WHAT'S NEW:
See WHATSNEW

WARNING WARNING WARNING:  If you have an existing version of CryptoMail, see WHATSNEW.

REQUIREMENTS:
CrytoMail Server:
a)  Unix-Like OS.
b)  SSL Enabled Apache 1.2+
c)  Sendmail 8.5+
d)  MySQL 3.23.56+
e)  GnuPG from source 1.04+ 
f)  gcc

CryptoMail Client:
a)  Java enabled web browser whos VM understands how to obtain escalated privs.
b)  gpg target build (included in this distribution)
- ------------------------------------------------------------------------------

Ok, fellow hackers....
The following (less terse) entries describe what you should do in order to get CryptoMail compiled, installed, and running.  Right now, admittedly it's a bit tricky, but it's open source, and requires some somewhat standard software, and hopefully you can help with this process.

My personal goal is to give anyone and everyone who wants to get CryptoMail running, an opportunity to do so.  I can be reached at joshuat@cryptomail.org or joshuat@gmail.com.  If you put in the subject of your message CryptoMail BUILD HELP I will take it upon myself to answer any question you have to the best of my ability.
Let's begin...

1)  Get and install mysql 3.23+ http://www.mysql.com.
CryptoMail has not been tested on any version < 3.23.56

If you get a version < 3.23 like 3.22 you'll think CryptoMail sucks and hate me for no reason.  Set the variable max_allowed_packet to something that represents the biggest message that you can allow your users.  You can do this by editing my.cnf in /etc/, or you can set parameters.  Please read up on this.  This step is also metioned in the SQL/MYSQL/README I'm mentioning it here cause it's kind of important.

In my /etc/my.cnf, I have the following entry:
set-variable = max_allowed_packet=10M

Test mysql.  You can quickly acid test mysql's installation by invoking it's command line mysql tool.  If you can get in, and execute the command "show databases", the direction up, is indeed, truly up.

2) Get and install an SMTP server.   sendmail 8+ should be ok.

Test sendmail: - From outside your machine, see if your machine accepts mail to a user.  Or, telnet localhost 25

The mail drop:
To get incoming mail to work.....
The whole idea of CryptoMail is to not make a system-user per CryptoMail-user necessary.  CryptoMail stores *all* incoming mail within the MySQL database.  This can be accomplished by configuring Sendmail or your other agent to accept mail for a particular domain, and dispatch it to a different mailer other than "local".  This mailer is the cryptomail mailer program CMMailDropWrapper.exe and takes the username and puts the mail into the database.

The configure.sh script, after running, will have generated a default cryptomail.cf in the Server Directory (this directory).  You will have to either copy this file entirely, or merge it's underlying functionality with your site, And then restart sendmail with this new configuration.
- ---------------------------------------------------------------------------
See the included macro file cryptomail.mc for cryptomail's implementation.
- ---------------------------------------------------------------------------

Please also read the README in the CMMailDrop directory.

If you plan to use CryptoMail for all mail, then you should be able to use the generated cryptomail.cf file as the main configuration file.  After building and installing CryptoMail, simply kill all instances of sendmail, and then run sendmail -C /the/path/to/should/be/etc/mail/cryptomail.cf -bd 

3)  Get and install an HTTP and ***HTTPS*** Server.

See http://www.apache.org and  http://www.modssl.org
CryptoMail employs some extra security tactics, and checks the SSL strength.  In your SSL implementation YOU MUST ENSURE THAT YOU HAVE THE VARIABLES OPTION ON.  The SSL strength is passed to ensuing programs, like CryptoMail.cgi via the environment.  It's important to note that if you are doing 128 Bit SSL, but don't have the environmental variables option ON, then CryptoMail won't work.
Below is the code to accomplish this:

##############################################
<Directory "/usr/local/apache2/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>
##############################################

Your SSL cgi-bin directory may or may not be the same place as your non-SSL directory.  Some sites make it their practice to not have the SSL portions of their site in the same directory as their unencrypted portions.  You should change the path to your SSL cgi-bin directory.

4)  Create a system user named "crypto". 

This user will be the maildropper, the session sweeper, and the database user.  On Linux, "adduser crypto" , and I think on FreeBSD: "useradd crypto" suffices.  Also, if you are old, you know what to do by hand :) The configure.sh does NOT create this user for you.  It's part of your job as the admin to do this prepwork.

5)  Get and install The Gnu Privacy Guard from source.

CryptoMail heavily employs the GPG's symmetric cipher cryptographic faculties.  Go to http://www.gnupg.org and download 1.2x.  This version of CryptoMail has been working best with gpg version 1.24.

6)  type ./configure.sh and answer the questions  You're almost home!

7)  type 'make all'

You should note in the CMServer there will be a program called CryptoMailMAcidTest.exe.  You should be able to execute this file, and get a clean bill of health for the cgi executables.  The idea is that this program basically emulates the desired actions of the cgi programs.  Based on your configuration, the AcidTest program  should:
a)  Connect to your database
b)  Create a session
c)  Write to the meta database user table
d)  Write to the main database user table
e)  Tear down and delete all session and users created. 

If this program gives you errors, then there may be something wrong.  Typically, failures are due to authentication issues with MySQL.

If the CryptoMailAcidTest.exe executes with a clean bill of health...you may continue.

In the event you need to change your parameterization, and re-configure, you should go back up to the main directory, and call 'make immaculate', and then re-run configure.sh

8)  Assuming the AcidTest program does not error out, then 'make install'

When you make install, the cgi programs should be put in their place, and the mail drop program should be put in it's place as well.  
The maildrop has another VERY IMPORTANT README, so....

9)  go to the CMMailDrop directory

10)  Read that 'README' if you want to understand how incoming mail works.  again, you can read cryptomail.cf and cryptomail.mc for some ideas.

11)  FINALLY, DO WHAT YOU NEED TO DO IN ORDER TO ENSURE NO ONE FROM THE OUTSIDE WORLD / UNAUTHORIZED USER / BOZO CAN GET TO YOUR https://yourserver/cgi-bin/Adm/CryptoMailAdm.cgi or MetaCryptoMailAdm.cgi.  These are two cgi files that control the whole cryptomail system.  I am not putting them in the cgi-bin/Adm directory...you should conciously do it.  It's a good way to check to see if the DB connections are operational based on your parameters without actually having to create cryptomail users , or actually use the other cgi programs.
With regard to the Administration cgi's, I suggest the following:
Create another cgi-bin executable directory: cgi-bin/Adm.  Configure an htaccess there.  Put the CryptoMailDB.cfg there if you chose file based authentication / db connection parameterization.
ENSURE THAT ONLY THE CORRECT PEOPLE CAN ACCESS THOSE TWO PROGRAMS.
THEY CAN DELETE USERS AND OR ADVERSELY AFFECT YOUR SYSTEM.
Also, ensure that normal http traffic cannot access that cgi-bin/Adm directory, and only https traffic can.  I refuse to put these programs in place as poor configuration will allow anyone with access to them the ability to control / "administrate" your CryptoMail system.

TO REITERATE:
You should put htaccess controls around the administration cgi programs.
You should deny access to /cgi-bin/Adm with normal HTTP traffic and only allow HTTPS to that directory.

Then you can put those files in the cgi-bin/Adm directory.

12)  Don't let anyone push you around.  Be a proponent for pervasive cryptography.  We must show all oppressors of free speech and privacy that  the laws of math and science rule; not greed and fear.

Finally,
I will do the best I can to help you get your system up and running.
Do not hesitate to ask any questions, or email. 

Joshua Teitelbaum
joshuat@cryptomail.org
joshuat@gmail.com

- - -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.1 (OpenBSD)

mQGiBEDmVZ0RBAC2ZqX8/iRohLvH75oiITvKL14yRda4dlaRmGA+RlwIYPCl0suJ
W5M02DydrlRHDCR2LPlci7gQjoc/rWasdKWzRbht8K3ArfIvxu00iZR24l8zS02f
X2r+S7sZ/4K7yeClYSKL7Lgu84in2gWx2vquBer1YN4rsVX+jrwT4woi6wCghCwE
Yy4z05Vccl2FklFQvDHLfekD/jPM9LSpOjjgN1sFegmjqKS9Jgpq11sALBzhE0lQ
BvXSM6UAKAv9XRkZ6F7EVfpuuhb20kEASiGUDh5hYNHAVlQa/c4fRxXrC+DFUp0v
nMMNWKU5EDcVu2MX2sV5JnIC25hpUNopEAaTz3Mqhatej5lrVvFkuDxoGBVgKvNS
DjUJBACow7kO64SKsXYRiRGNFm3GnLHPQDQ8ZXaXLbmZ1Onp9PKlzEiyvafrLRNt
twGVGTYzGIDWOipj9ScZkAzfkbd0+sDN/HZBYbVjyfkgAlCeP3CEDbshm2nb5+Br
i0tkCrJqyVYSknYcP/1oLkGSezHG41wtgGgMSYbm82WrX9JWbbQqSm9zaHVhIFRl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ueGAJ9D8SueYOG+3XJmviswaCO68Q2F1ACeKfXn
/cNZNU7HxBqxguUHHtm5qao=
=2kBn
-----END PGP SIGNATURE-----
