KMail is a part of the KDE project http://www.kde.org. KMail can be found on ftp://ftp.kde.org/pub/kde/, the main ftp site of the KDE project, in the kdenetwork distribution.
In order to compile and install KMail on your system, type the following in the base directory of the KMail distribution:
% ./configure
% make
% make install
Since KMail uses autoconf
you should have not trouble compiling it.
Should you run into problems please report them to the