diff options
Diffstat (limited to 'contrib/sendmail/makemap')
-rw-r--r-- | contrib/sendmail/makemap/Makefile | 17 | ||||
-rw-r--r-- | contrib/sendmail/makemap/Makefile.m4 | 130 | ||||
-rw-r--r-- | contrib/sendmail/makemap/makemap.8 | 214 |
3 files changed, 156 insertions, 205 deletions
diff --git a/contrib/sendmail/makemap/Makefile b/contrib/sendmail/makemap/Makefile new file mode 100644 index 0000000..a6960c1 --- /dev/null +++ b/contrib/sendmail/makemap/Makefile @@ -0,0 +1,17 @@ +# $Id: Makefile,v 8.7 1999/09/23 22:36:37 ca Exp $ + +SHELL= /bin/sh +BUILD= ./Build +OPTIONS= $(CONFIG) $(FLAGS) + +all: FRC + $(SHELL) $(BUILD) $(OPTIONS) $@ +clean: FRC + $(SHELL) $(BUILD) $(OPTIONS) $@ +install: FRC + $(SHELL) $(BUILD) $(OPTIONS) $@ + +fresh: FRC + $(SHELL) $(BUILD) $(OPTIONS) -c + +FRC: diff --git a/contrib/sendmail/makemap/Makefile.m4 b/contrib/sendmail/makemap/Makefile.m4 index 983ffdf..4077239 100644 --- a/contrib/sendmail/makemap/Makefile.m4 +++ b/contrib/sendmail/makemap/Makefile.m4 @@ -1,110 +1,20 @@ -# -# This Makefile is designed to work on the old "make" program. -# -# @(#)Makefile.m4 8.21 (Berkeley) 7/12/1998 -# - -# C compiler -CC= confCC - -# Shell -SHELL= confSHELL - -# use O=-O (usual) or O=-g (debugging) -O= ifdef(`confOPTIMIZE', `confOPTIMIZE', `-O') - -# location of sendmail source directory -SRCDIR= ifdef(`confSRCDIR', `confSRCDIR', `../../src') - -# define the database mechanisms available for map & alias lookups: -# -DNDBM -- use new DBM -# -DNEWDB -- use new Berkeley DB -# The really old (V7) DBM library is no longer supported. -# -MAPDEF= ifdef(`confMAPDEF', `confMAPDEF') - -# environment definitions (e.g., -D_AIX3) -ENVDEF= -DNOT_SENDMAIL ifdef(`confENVDEF', `confENVDEF') - -# see also conf.h for additional compilation flags - -# include directories -INCDIRS=-I${SRCDIR} confINCDIRS - -# loader options -LDOPTS= ifdef(`confLDOPTS', `confLDOPTS') - -# library directories -LIBDIRS=confLIBDIRS - -# libraries required on your system -LIBS= ifdef(`confLIBS', `confLIBS') - -# location of makemap binary (usually /usr/sbin or /usr/etc) -SBINDIR=${DESTDIR}ifdef(`confSBINDIR', `confSBINDIR', `/usr/sbin') - -# additional .o files needed -OBJADD= ifdef(`confOBJADD', `confOBJADD') - -undivert(1) - -################### end of user configuration flags ###################### - -BUILDBIN=confBUILDBIN -COPTS= -I. ${INCDIRS} ${MAPDEF} ${ENVDEF} -CFLAGS= $O ${COPTS} - -BEFORE= confBEFORE safefile.c snprintf.c -OBJS= makemap.o safefile.o snprintf.o ${OBJADD} - -NROFF= ifdef(`confNROFF', `confNROFF', `groff -Tascii') -MANDOC= ifdef(`confMANDOC', `confMANDOC', `-mandoc') - -INSTALL=ifdef(`confINSTALL', `confINSTALL', `install') -BINOWN= ifdef(`confUBINOWN', `confUBINOWN', `bin') -BINGRP= ifdef(`confUBINGRP', `confUBINGRP', `bin') -BINMODE=ifdef(`confUBINMODE', `confUBINMODE', `555') - -MANOWN= ifdef(`confMANOWN', `confMANOWN', `bin') -MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin') -MANMODE=ifdef(`confMANMODE', `confMANMODE', `444') - -MANROOT=${DESTDIR}ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat') -MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8') -MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8') -MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0') - -ALL= makemap makemap.${MAN8SRC} - -all: ${ALL} - -makemap: ${BEFORE} ${OBJS} - ${CC} -o makemap ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} - -safefile.c: ${SRCDIR}/safefile.c - -ln -s ${SRCDIR}/safefile.c safefile.c - -snprintf.c: ${SRCDIR}/snprintf.c - -ln -s ${SRCDIR}/snprintf.c snprintf.c - -undivert(3) - -makemap.${MAN8SRC}: makemap.8 - ${NROFF} ${MANDOC} makemap.8 > makemap.${MAN8SRC} - -install: install-makemap install-docs - -install-makemap: makemap - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} makemap ${SBINDIR} - -install-docs: makemap.${MAN8SRC} -ifdef(`confNO_MAN_INSTALL', `dnl', -` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} makemap.${MAN8SRC} ${MAN8}/makemap.${MAN8EXT}') - -clean: - rm -f ${OBJS} makemap makemap.${MAN8SRC} - -################ Dependency scripts -include(confBUILDTOOLSDIR/M4/depend/ifdef(`confDEPEND_TYPE', `confDEPEND_TYPE', -`generic').m4)dnl -################ End of dependency scripts +include(confBUILDTOOLSDIR`/M4/switch.m4') + +# sendmail dir +SMSRCDIR= ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail') +PREPENDDEF(`confENVDEF', `confMAPDEF') +PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ') + +bldPRODUCT_START(`executable', `makemap') +define(`bldSOURCES', `makemap.c ') +define(`bldINSTALL_DIR', `S') +bldPUSH_SMLIB(`smutil') +bldPUSH_SMLIB(`smdb') +APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL') +bldPRODUCT_END + +bldPRODUCT_START(`manpage', `makemap') +define(`bldSOURCES', `makemap.8') +bldPRODUCT_END + +bldFINISH diff --git a/contrib/sendmail/makemap/makemap.8 b/contrib/sendmail/makemap/makemap.8 index 81f53a8..9f72208 100644 --- a/contrib/sendmail/makemap/makemap.8 +++ b/contrib/sendmail/makemap/makemap.8 @@ -1,4 +1,5 @@ -.\" Copyright (c) 1998 Sendmail, Inc. All rights reserved. +.\" Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers. +.\" All rights reserved. .\" Copyright (c) 1988, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -7,121 +8,144 @@ .\" the sendmail distribution. .\" .\" -.\" @(#)makemap.8 8.12 (Berkeley) 11/13/1998 +.\" $Id: makemap.8,v 8.21.16.1 2000/05/10 20:31:35 ca Exp $ .\" -.Dd November 16, 1992 -.Dt MAKEMAP 8 -.Os BSD 4.4 -.Sh NAME -.Nm makemap -.Nd create database maps for sendmail -.Sh SYNOPSIS -.Nm -.Op Fl N -.if \nP .Op Fl c Ar cachesize -.Op Fl d -.Op Fl f -.if \nP .Op Fl l -.Op Fl o -.Op Fl r -.Op Fl s -.Op Fl v -.Ar maptype -.Ar mapname -.Sh DESCRIPTION -.Nm +.TH MAKEMAP 8 "November 16, 1992" +.SH NAME +.B makemap +\- create database maps for sendmail +.SH SYNOPSIS +.B makemap +.RB [ \-C +.IR file ] +.RB [ \-N ] +.RB [ \-c +.IR cachesize ] +.RB [ \-d ] +.RB [ \-e ] +.RB [ \-f ] +.RB [ \-l ] +.RB [ \-o ] +.RB [ \-r ] +.RB [ \-s ] +.RB [ \-u ] +.RB [ \-v ] +.I +maptype mapnam +.SH DESCRIPTION +.B Makemap creates the database maps used by the keyed map lookups in -.Xr sendmail 8 . +sendmail(8). It reads input from the standard input and outputs them to the indicated -.Ar mapname . -.Pp +.I mapname. +.PP Depending on how it is compiled, -.Nm -handles up to three different database formats, +.B makemap +handles up to three different database formats, selected using the -.Ar maptype -parameter. +.I maptype +parameter. They may be -.Bl -tag -width Fl -.It Li dbm -DBM format maps. -This requires the -.Xr ndbm 3 +.TP +dbm +DBM format maps. +This requires the +ndbm(3) library. -.It Li btree -B-Tree format maps. -This requires the new Berkeley DB +.TP +btree +B-Tree format maps. +This requires the new Berkeley DB library. -.It Li hash -Hash format maps. -This also requires the Berkeley DB +.TP +hash +Hash format maps. +This also requires the Berkeley DB library. -.El -.Pp +.PP In all cases, -.Nm -reads lines from the standard input consisting of two -words separated by white space. -The first is the database key, -the second is the value. -The value may contain -``%\fIn\fP'' -strings to indicated parameter substitution. -Literal percents should be doubled +.B makemap +reads lines from the standard input consisting of two +words separated by white space. +The first is the database key, +the second is the value. +The value may contain +``%\fIn\fP'' +strings to indicate parameter substitution. +Literal percents should be doubled (``%%''). Blank lines and lines beginning with ``#'' are ignored. -.Ss Flags -.Bl -tag -width Fl -.It Fl N -Include the null byte that terminates strings -in the map. -This must match the \-N flag in the sendmail.cf +.PP +If the +.I TrustedUser +option is set in the sendmail configuration file and +.B makemap +is invoked as root, the generated files will be owned by +the specified +.IR TrustedUser. +.SS Flags +.TP +.B \-C +Use the specified sendmail configuration file for +looking up the TrustedUser option. +.TP +.B \-N +Include the null byte that terminates strings +in the map. +This must match the \-N flag in the sendmail.cf ``K'' line. -.if \nP \ -\{\ -.It Fl c +.TP +.B \-c Use the specified hash and B-Tree cache size. -.\} -.It Fl d -Allow duplicate keys in the map. -This is only allowed on B-Tree format maps. -If two identical keys are read, +.TP +.B \-d +Allow duplicate keys in the map. +This is only allowed on B-Tree format maps. +If two identical keys are read, they will both be inserted into the map. -.It Fl f -Normally all upper case letters in the key -are folded to lower case. -This flag disables that behaviour. -This is intended to mesh with the -\-f flag in the -\fBK\fP -line in sendmail.cf. +.TP +.B \-e +Allow empty value (right hand side). +.TP +.B \-f +Normally all upper case letters in the key +are folded to lower case. +This flag disables that behaviour. +This is intended to mesh with the +\-f flag in the +.B K +line in sendmail.cf. The value is never case folded. -.if \nP \ -\{\ -.It Fl l +.TP +.B \-l List supported map types. -.\} -.It Fl o -Append to an old file. +.TP +.B \-o +Append to an old file. This allows you to augment an existing file. -.It Fl r -Allow replacement of existing keys. +.TP +.B \-r +Allow replacement of existing keys. Normally -.Nm -complains if you repeat a key, +.B makemap +complains if you repeat a key, and does not do the insert. -.It Fl s -Ignore safety checks on maps being created. -This includes checking for hard or symbolic +.TP +.B \-s +Ignore safety checks on maps being created. +This includes checking for hard or symbolic links in world writable directories. -.It Fl v +.TP +.B \-u +dump (unmap) the content of the database to standard output. +.TP +.B \-v Verbosely print what it is doing. -.El -.Sh SEE ALSO -.Xr sendmail 8 -.Sh HISTORY +.SH SEE ALSO +sendmail(8) +.SH HISTORY The -.Nm -command appeared in -.Bx 4.4 . +.B makemap +command appeared in +4.4BSD. |