Jsmtpd 2.x ********************************** * This code is still a big draft * * Don't use it yet ! * ********************************** see http://www.jsmtpd.org/wiki/ This project is a set of beans designed toward smtp processing. Assembled all together, you will eventually get a smtp server. The project uses spring framework to wire it's core, but you could use something else. IO is handled by the mina framework, and passed to simple java beans. (ie: If you don't like mina, use something else). Jsmtpd 2.x is made of several stages you can wire together: Smtp server, smtp client (for sending), filter processor, delivery schedulers, and so on. Because synchronous thread blocking (simple) and event based based models are mixed, you'll use Queues between theses components. Typically, a smtp server component will place received mails into a inQueue. A filter processor (Ie threaded executor) will pump mails from inQueue, process them using filters and place them on a filteredQueue; The last stage is a delivery scheduler (single threaded), that pumps mails from the filteredQueue to send them using DeliveryExecutor. There are two kinds of delivery executor: event based (like mina nio executor), or thread pooled wrappers. Building and running demo server You need maven 2.x installed. run maven assembly:assembly in Jsmtp's sources and you'll get a tar.bz2 archive. In this archive: jsmtpd.sh to run the server, config is in etc/ To add users, aliases, relays, edit etc/simple/* files. You'll need to set the following properties in etc/jsmtpd.properties jsmtpd.hostname : dns name of the server running jsmtpd jsmtpd.bind : ip:port where Jsmtpd will listen (25 in prod, 2500 in tests) jsmtpd.storage.path : a writable path where Jsmtpd will place mailqueues. jsmtpd.dns1 : ip of your dns server Dev Eclipse + maven plugin + spring beans plugin Quickstart places org.jsmtpd.service.SimpleConfig main/resources/*.xml main/resources/jsmtpd.properties