freebsd-dev/contrib/sendmail/mail.local
Gregory Neil Shapiro e3793f7654 Merge sendmail 8.14.3 into HEAD.
Note: As the first merge since the conversion to svn, it includes many
propset changes to get the proper svn:eol-style and svn:mime-type on the
files (as merged from the fixed up vendor/dist area).

MFC after:	3 days
2008-08-28 06:08:29 +00:00
..
mail.local.8 Stage 1 of sendmail dist tree flattening. contrib/sendmail/contrib 2008-08-28 02:25:51 +00:00
mail.local.c Merge sendmail 8.14.3 into HEAD. 2008-08-28 06:08:29 +00:00
Makefile Stage 1 of sendmail dist tree flattening. contrib/sendmail/contrib 2008-08-28 02:25:51 +00:00
Makefile.m4 Stage 1 of sendmail dist tree flattening. contrib/sendmail/contrib 2008-08-28 02:25:51 +00:00
README Stage 1 of sendmail dist tree flattening. contrib/sendmail/contrib 2008-08-28 02:25:51 +00:00

This directory contains the source files for mail.local.

This is not intended to be used on *stock* System V derived systems such as
Solaris or HP-UX, since they use a totally different approach to mailboxes
(essentially, they have a set-group-ID program rather than set-user-ID, and
they rely on the ability to "give away" files to do their work).

If you choose to run *this* mail.local on these systems then you may also
need to replace the existing MUAs, as well as IMAP and POP servers, with
ones that are compatible with the BSD interface.  You have been warned!

For systems with maillock() support, compile with -DMAILLOCK and link with
-lmail to use the maillock() routines.  This can be accomplished in your
site.config.m4 file with:

	APPENDDEF(`conf_mail_local_ENVDEF', `-DMAILLOCK')
	APPENDDEF(`conf_mail_local_LIBS', `-lmail')

Defining CONTENTLENGTH (-DCONTENTLENGTH) will build a mail.local which
outputs a Content-Length: header.  Solaris 2.3 and later will automatically
include Content-Length: support.  This can be accomplished in your
site.config.m4 file with:

	APPENDDEF(`conf_mail_local_ENVDEF', `-DCONTENTLENGTH')

Defining MAILGID to a 'gid' (-DMAILGID=6) will cause mailboxes to be
written group writable and with group 'gid'.  This can be accomplished in
your site.config.m4 file with:

	APPENDDEF(`conf_mail_local_ENVDEF', `-DMAILGID=6')

mail.local will not be installed set-user-ID root. To use it as local
delivery agent without LMTP mode, use:

	 MODIFY_MAILER_FLAGS(`LOCAL', `+S')

in the .mc file.

Defining HASHSPOOL (-DHASHSPOOL) will build a mail.local which supports
delivering to subdirectories of the mail spool, based on a hash of the
username (i.e., a hash depth of 2 and a username of "user" will result in
/var/spool/mail/u/s/user).  If the hash depth is greater than the length
of the username, "_" will be used.  The necessary subdirectories must
exist; mail.local will not create them.  Use the "-H" option to set the
hash type and depth (like "-H u2" for a username hash two levels deep).

The HASHSPOOL option also adds two other options: "-p path" to specify
an alternate mail spool path (i.e., "-p /local/mail") and "-n" to specify
that mail.local should not strip the @domain part of recipient addresses
in LMTP mode.

In addition to HASHSPOOL, defining HASHSPOOLMD5 and linking against
libcrypto from OpenSSL like:

	APPENDDEF(`conf_mail_local_ENVDEF', `-DHASHSPOOL -DHASHSPOOLMD5')
	APPENDDEF(`conf_mail_local_LIBS', `-lcrypto')

will offer an alternate hash, using a base64 encoding (changing / to _)
of an MD5 hash of the username.  This results in a more balanced
subdirectory tree.  The subdirectories will be named with A-Z, a-z, 0-9,
+, and _.  The hash type is "m", so use "-H m3" to get a three level MD5
based hash.

$Revision: 8.11 $, Last updated $Date: 2003/10/20 20:19:13 $