	Reisersmtp - Qmail improvements for Integrated Linux and Hans Reiser


This software is in very early stage, don't expect it to be stable or
complete.

To give it a try, you must have a working Qmail installation.
Then, run ./configure . This script accepts some parameters :

--enable-debug : print a lot of debugging informations. Normally useless if
you don't intend to play with the source code.

--enable-leakfinder : another debugging option to find forgotten free()
calls. It works with the "leakfinder.pl" script and never reported any leak
in reisersmtp so far.

--enable-lf-nomem : intentionnaly simulate malloc() failures to see how the
program will behave in out-of-memory situations.

--enable-async : files that have to be reliable are fsync()ed synchronously.
It enables the group commit mechanism that was designed for ReiserFS.
***** Group commit is broken yet, please void this option *****

--enable-intd-compat : enable qmail-smtpd queue management emulation. Safe
but not faster than a vanilla Qmail install. You don't need to run
lmail-send if you enabled that option.

--enable-qmsend-compat : ask Qmail-send to do envelope preprocessing.
***** Lmail-queue does not have full preprocessing support yet. It also
require to patch Qmail in order to properly feed its priority queue. So you
need to enable this option *****

--enable-no-md-sync : don't sync metadata - obsolete and useless for ReiserFS.



So, unless you want to work on missing parts, you probably will run the
following commands :

./configure --enable-qmsend-compat
make
make install



Reisersmtpd changes a bit the Qmail queue structure, in a compatible way. In
most cases, running the following script should be enough :

./upgrade-queue.sh

Run it only once, and if possible, on an empty queue.

The major change is the presence of new "/var/qmail/queue/reisermess" and
"/var/qmail/queue/reisertodo" directories.

Now, run the queue exploder, unless "--enable-intd-compat" was used :

lmail-send &

Then, shut down anything listening on port 25, and run :

lmail-smtpd &

Everything should be running and mail clients should work as usual.



Configuration files recognized by Reisersmtp are :

/var/qmail/control/smtpgreeting
/var/qmail/control/databytes
/var/qmail/control/smtpdport
/var/qmail/control/maxhops
/var/qmail/control/maxclients
/var/qmail/control/badmailfrom
/var/qmail/control/rcpthosts
/var/qmail/control/morercpthosts

control/smtpdport is the port number lmail-smtpd will listen to. If the file
doesn't exist, 25 will be assumed. This is a temporary control file, it will
be replaced by a multiple IP/interface/port/config scheme in the future.

control/maxhops is the maximum hops a message can pass through, in order to
avoid looping. Without that file, it defaults to 100 (Qmail's fixed limit) .

control/maxclients is the maximum number of simultaneous incoming
connections. Defaults is 500. If you have a fast internet link without 
high end computer, don't choose a too high value here.

badmailfrom can be huge. Everything stays in memory and match lookups are
very fast. The same trick applies to rcpthosts.

ReiserSMTP supports the SIZE, 8BITMIME and PIPELINING extensions.

To gracefully kill the SMTP daemon, just send a TERM or QUIT signal to the
first lmail-smtpd process (its PID is usually less than its threads') . It
will exit as soon as every client are processed, or after a timeout (5
minutes by default) .

	- Frank DENIS (Jedi/Sector One) <j@4u.net>
