138032SpeterThis directory contains the source files for mail.local.
238032Speter
338032SpeterThis is not intended to be used on *stock* System V derived systems such as
438032SpeterSolaris or HP-UX, since they use a totally different approach to mailboxes
590792Sgshapiro(essentially, they have a set-group-ID program rather than set-user-ID, and
690792Sgshapirothey rely on the ability to "give away" files to do their work).
738032Speter
838032SpeterIf you choose to run *this* mail.local on these systems then you may also
938032Speterneed to replace the existing MUAs, as well as IMAP and POP servers, with
1038032Speterones that are compatible with the BSD interface.  You have been warned!
1164562Sgshapiro
1264562SgshapiroFor systems with maillock() support, compile with -DMAILLOCK and link with
1364562Sgshapiro-lmail to use the maillock() routines.  This can be accomplished in your
1464562Sgshapirosite.config.m4 file with:
1564562Sgshapiro
1664562Sgshapiro	APPENDDEF(`conf_mail_local_ENVDEF', `-DMAILLOCK')
1764562Sgshapiro	APPENDDEF(`conf_mail_local_LIBS', `-lmail')
1864562Sgshapiro
1964562SgshapiroDefining CONTENTLENGTH (-DCONTENTLENGTH) will build a mail.local which
2064562Sgshapirooutputs a Content-Length: header.  Solaris 2.3 and later will automatically
2164562Sgshapiroinclude Content-Length: support.  This can be accomplished in your
2264562Sgshapirosite.config.m4 file with:
2364562Sgshapiro
2464562Sgshapiro	APPENDDEF(`conf_mail_local_ENVDEF', `-DCONTENTLENGTH')
2564562Sgshapiro
2664562SgshapiroDefining MAILGID to a 'gid' (-DMAILGID=6) will cause mailboxes to be
2764562Sgshapirowritten group writable and with group 'gid'.  This can be accomplished in
2864562Sgshapiroyour site.config.m4 file with:
2964562Sgshapiro
3064562Sgshapiro	APPENDDEF(`conf_mail_local_ENVDEF', `-DMAILGID=6')
3164562Sgshapiro
3290792Sgshapiromail.local will not be installed set-user-ID root. To use it as local
3364562Sgshapirodelivery agent without LMTP mode, use:
3464562Sgshapiro
3564562Sgshapiro	 MODIFY_MAILER_FLAGS(`LOCAL', `+S')
3664562Sgshapiro
3764562Sgshapiroin the .mc file.
3864562Sgshapiro
39132943SgshapiroDefining HASHSPOOL (-DHASHSPOOL) will build a mail.local which supports
40132943Sgshapirodelivering to subdirectories of the mail spool, based on a hash of the
41132943Sgshapirousername (i.e., a hash depth of 2 and a username of "user" will result in
42132943Sgshapiro/var/spool/mail/u/s/user).  If the hash depth is greater than the length
43132943Sgshapiroof the username, "_" will be used.  The necessary subdirectories must
44132943Sgshapiroexist; mail.local will not create them.  Use the "-H" option to set the
45132943Sgshapirohash type and depth (like "-H u2" for a username hash two levels deep).
46132943Sgshapiro
47132943SgshapiroThe HASHSPOOL option also adds two other options: "-p path" to specify
48132943Sgshapiroan alternate mail spool path (i.e., "-p /local/mail") and "-n" to specify
49132943Sgshapirothat mail.local should not strip the @domain part of recipient addresses
50132943Sgshapiroin LMTP mode.
51132943Sgshapiro
52132943SgshapiroIn addition to HASHSPOOL, defining HASHSPOOLMD5 and linking against
53132943Sgshapirolibcrypto from OpenSSL like:
54132943Sgshapiro
55132943Sgshapiro	APPENDDEF(`conf_mail_local_ENVDEF', `-DHASHSPOOL -DHASHSPOOLMD5')
56132943Sgshapiro	APPENDDEF(`conf_mail_local_LIBS', `-lcrypto')
57132943Sgshapiro
58132943Sgshapirowill offer an alternate hash, using a base64 encoding (changing / to _)
59132943Sgshapiroof an MD5 hash of the username.  This results in a more balanced
60132943Sgshapirosubdirectory tree.  The subdirectories will be named with A-Z, a-z, 0-9,
61132943Sgshapiro+, and _.  The hash type is "m", so use "-H m3" to get a three level MD5
62132943Sgshapirobased hash.
63132943Sgshapiro
64266711Sgshapiro$Revision: 8.11 $, Last updated $Date: 2003-10-20 20:19:13 $
65