k n i f e

Knife was a project to build a free Java mail and news agent. It has now split into a number of distinct efforts. If you are looking for a complete MUA in Java, I recommend IceMail, which can be configured to use the providers accessible here.

The GUI toolkit formerly used by Knife is now no longer under active development due to improvements in Swing performance. You can download a jar archive containing both the classes and the source files of the last version. If you are a Java débutant and want to understand the technologies underlying the AWT lightweight component model, this might be an interesting place to start. Please refer to the documentation as to installation, usage, etc. There is also a demo page for the components here.

The JavaMail providers formerly accessible from this page are still under active development. However, they now form part of the GNU classpathx project. You can download and build GNU JavaMail as follows (when prompted for a password for anoncvs, simply press the Enter key):

export CVS_RSH="ssh"
cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/classpath co inetlib
cd inetlib
make install
cd ..
cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/classpathx co activation
cd activation
make install
cd ..
cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/classpathx co mail
cd mail
make install

Alternatively, if you have Apache Ant, there is also a buildfile included.

This should result in 2 files being installed in the /usr/local/share/java directory:

The procedure above builds and installs GNU inetlib and JAF in /usr/local/share/java as well.

The provider jar can be used with Sun’s JavaMail implementation if you so desire: you need to specify your own $JAVA_HOME/lib/javamail.providers detailing the providers you want. The default one for the GNU providers is as follows:

protocol=smtp; type=transport; class=gnu.mail.providers.smtp.SMTPTransport; vendor=nferrier@tapsellferrier.co.uk;
protocol=imap; type=store; class=gnu.mail.providers.imap.IMAPStore; vendor=dog@gnu.org;
protocol=pop3; type=store; class=gnu.mail.providers.pop3.POP3Store; vendor=dog@gnu.org;
protocol=nntp; type=store; class=gnu.mail.providers.nntp.NNTPStore; vendor=dog@gnu.org;
protocol=nntp-post; type=transport; class=gnu.mail.providers.nntp.NNTPTransport; vendor=dog@gnu.org;
protocol=mbox; type=store; class=gnu.mail.providers.mbox.MboxStore; vendor=dog@gnu.org;
protocol=maildir; type=store; class=gnu.mail.providers.maildir.MaildirStore; vendor=dog@gnu.org;

You can also use Ant to generate Javadoc, which lists all the session properties for the providers.

At runtime, you need activation.jar from JAF, and for the network-based providers (smtp, imap, pop3, and nntp), you need inetlib.jar, in your classpath. Additionally, for all the above providers except nntp, you need:

These enable you to use cryptographically secure connections when sending and receiving mail, as well as a wealth of authentication mechanisms that may be supported by your server.


The mbox store uses the dotlocking mechanism, compatible with most UNIX MUAs and MTAs, to synchronise concurrent access to the mailbox. Use of non-dotlocking mail agents that access the same mailboxes as are used by the mbox provider at the same time is likely to result in data loss. Examples include Netscape under Windows, among others.

As always with free software, the work is never finished. Please send any requests or bug reports to dog@gnu.org.