head	1.37;
access;
symbols
	RELENG_8_4:1.37.0.2
	RELENG_9_1_0_RELEASE:1.36.36.1.4.2
	RELENG_9_1:1.36.36.1.0.4
	RELENG_9_1_BP:1.36.36.1
	RELENG_8_3_0_RELEASE:1.36.30.1.8.1
	RELENG_8_3:1.36.30.1.0.8
	RELENG_8_3_BP:1.36.30.1
	RELENG_9_0_0_RELEASE:1.36.36.1.2.1
	RELENG_9_0:1.36.36.1.0.2
	RELENG_9_0_BP:1.36.36.1
	RELENG_9:1.36.0.36
	RELENG_9_BP:1.36
	RELENG_7_4_0_RELEASE:1.36.34.1
	RELENG_8_2_0_RELEASE:1.36.30.1.6.1
	RELENG_7_4:1.36.0.34
	RELENG_7_4_BP:1.36
	RELENG_8_2:1.36.30.1.0.6
	RELENG_8_2_BP:1.36.30.1
	RELENG_8_1_0_RELEASE:1.36.30.1.4.1
	RELENG_8_1:1.36.30.1.0.4
	RELENG_8_1_BP:1.36.30.1
	RELENG_7_3_0_RELEASE:1.36.32.1
	RELENG_7_3:1.36.0.32
	RELENG_7_3_BP:1.36
	RELENG_8_0_0_RELEASE:1.36.30.1.2.1
	RELENG_8_0:1.36.30.1.0.2
	RELENG_8_0_BP:1.36.30.1
	RELENG_8:1.36.0.30
	RELENG_8_BP:1.36
	RELENG_7_2_0_RELEASE:1.36.28.1
	RELENG_7_2:1.36.0.28
	RELENG_7_2_BP:1.36
	RELENG_7_1_0_RELEASE:1.36.26.1
	RELENG_6_4_0_RELEASE:1.36.24.1
	RELENG_7_1:1.36.0.26
	RELENG_7_1_BP:1.36
	RELENG_6_4:1.36.0.24
	RELENG_6_4_BP:1.36
	RELENG_7_0_0_RELEASE:1.36
	RELENG_6_3_0_RELEASE:1.36
	RELENG_7_0:1.36.0.22
	RELENG_7_0_BP:1.36
	RELENG_6_3:1.36.0.20
	RELENG_6_3_BP:1.36
	RELENG_7:1.36.0.18
	RELENG_7_BP:1.36
	RELENG_6_2_0_RELEASE:1.36
	RELENG_6_2:1.36.0.16
	RELENG_6_2_BP:1.36
	RELENG_5_5_0_RELEASE:1.36
	RELENG_5_5:1.36.0.14
	RELENG_5_5_BP:1.36
	RELENG_6_1_0_RELEASE:1.36
	RELENG_6_1:1.36.0.12
	RELENG_6_1_BP:1.36
	RELENG_6_0_0_RELEASE:1.36
	RELENG_6_0:1.36.0.10
	RELENG_6_0_BP:1.36
	RELENG_6:1.36.0.8
	RELENG_6_BP:1.36
	RELENG_5_4_0_RELEASE:1.36
	RELENG_5_4:1.36.0.6
	RELENG_5_4_BP:1.36
	RELENG_4_11_0_RELEASE:1.9.2.26
	RELENG_4_11:1.9.2.26.0.2
	RELENG_4_11_BP:1.9.2.26
	RELENG_5_3_0_RELEASE:1.36
	RELENG_5_3:1.36.0.4
	RELENG_5_3_BP:1.36
	RELENG_5:1.36.0.2
	RELENG_5_BP:1.36
	RELENG_4_10_0_RELEASE:1.9.2.25
	RELENG_4_10:1.9.2.25.0.4
	RELENG_4_10_BP:1.9.2.25
	RELENG_5_2_1_RELEASE:1.35
	RELENG_5_2_0_RELEASE:1.35
	RELENG_5_2:1.35.0.2
	RELENG_5_2_BP:1.35
	RELENG_4_9_0_RELEASE:1.9.2.25
	RELENG_4_9:1.9.2.25.0.2
	RELENG_4_9_BP:1.9.2.25
	RELENG_5_1_0_RELEASE:1.33
	RELENG_5_1:1.33.0.2
	RELENG_5_1_BP:1.33
	RELENG_4_8_0_RELEASE:1.9.2.23
	RELENG_4_8:1.9.2.23.0.2
	RELENG_4_8_BP:1.9.2.23
	RELENG_5_0_0_RELEASE:1.32
	RELENG_5_0:1.32.0.2
	RELENG_5_0_BP:1.32
	RELENG_4_7_0_RELEASE:1.9.2.22
	RELENG_4_7:1.9.2.22.0.2
	RELENG_4_7_BP:1.9.2.22
	RELENG_4_6_2_RELEASE:1.9.2.19
	RELENG_4_6_1_RELEASE:1.9.2.19
	RELENG_4_6_0_RELEASE:1.9.2.19
	RELENG_4_6:1.9.2.19.0.2
	RELENG_4_6_BP:1.9.2.19
	RELENG_4_5_0_RELEASE:1.9.2.14
	RELENG_4_5:1.9.2.14.0.2
	RELENG_4_5_BP:1.9.2.14
	RELENG_4_4_0_RELEASE:1.9.2.12
	RELENG_4_4:1.9.2.12.0.2
	RELENG_4_4_BP:1.9.2.12
	RELENG_4_3_0_RELEASE:1.9.2.5
	RELENG_4_3:1.9.2.5.0.2
	RELENG_4_3_BP:1.9.2.5
	RELENG_4_2_0_RELEASE:1.9.2.1
	RELENG_4_1_1_RELEASE:1.9.2.1
	PRE_SMPNG:1.10
	RELENG_4_1_0_RELEASE:1.9
	RELENG_3_5_0_RELEASE:1.5.2.3
	RELENG_4_0_0_RELEASE:1.9
	RELENG_4:1.9.0.2
	RELENG_4_BP:1.9
	RELENG_3_4_0_RELEASE:1.5.2.3
	RELENG_3_3_0_RELEASE:1.5.2.3
	RELENG_3_2_PAO:1.5.2.2.0.2
	RELENG_3_2_PAO_BP:1.5.2.2
	RELENG_3_2_0_RELEASE:1.5.2.2
	RELENG_3_1_0_RELEASE:1.5
	RELENG_3:1.5.0.2
	RELENG_3_BP:1.5
	RELENG_2_2_8_RELEASE:1.1.2.6
	RELENG_3_0_0_RELEASE:1.5
	RELENG_2_2_7_RELEASE:1.1.2.5
	RELENG_2_2_6_RELEASE:1.1.2.4
	RELENG_2_2_5_RELEASE:1.1.2.2
	RELENG_2_1_0:1.1.0.4
	RELENG_2_2:1.1.0.2;
locks; strict;
comment	@# @;


1.37
date	2012.11.17.01.49.02;	author svnexp;	state Exp;
branches
	1.37.2.1;
next	1.36;

1.36
date	2004.06.06.17.28.31;	author gshapiro;	state Exp;
branches
	1.36.8.1
	1.36.18.1
	1.36.24.1
	1.36.26.1
	1.36.28.1
	1.36.30.1
	1.36.32.1
	1.36.34.1
	1.36.36.1;
next	1.35;

1.35
date	2003.07.06.19.17.04;	author gshapiro;	state Exp;
branches;
next	1.34;

1.34
date	2003.07.06.18.07.06;	author gshapiro;	state Exp;
branches;
next	1.33;

1.33
date	2003.02.08.21.55.31;	author gshapiro;	state Exp;
branches;
next	1.32;

1.32
date	2002.07.29.09.40.05;	author ru;	state Exp;
branches;
next	1.31;

1.31
date	2002.07.18.12.07.44;	author ru;	state Exp;
branches;
next	1.30;

1.30
date	2002.05.24.01.46.36;	author gshapiro;	state Exp;
branches;
next	1.29;

1.29
date	2002.04.23.17.08.08;	author gshapiro;	state Exp;
branches;
next	1.28;

1.28
date	2002.04.14.19.20.19;	author gshapiro;	state Exp;
branches;
next	1.27;

1.27
date	2002.04.05.02.30.45;	author gshapiro;	state Exp;
branches;
next	1.26;

1.26
date	2002.04.04.07.42.12;	author ru;	state Exp;
branches;
next	1.25;

1.25
date	2002.04.04.07.18.29;	author ru;	state Exp;
branches;
next	1.24;

1.24
date	2002.03.28.03.30.27;	author gshapiro;	state Exp;
branches;
next	1.23;

1.23
date	2002.02.17.22.12.57;	author gshapiro;	state Exp;
branches;
next	1.22;

1.22
date	2001.11.20.03.31.54;	author gshapiro;	state Exp;
branches;
next	1.21;

1.21
date	2001.10.08.22.35.24;	author gshapiro;	state Exp;
branches;
next	1.20;

1.20
date	2001.08.01.02.12.31;	author gshapiro;	state Exp;
branches;
next	1.19;

1.19
date	2001.07.23.02.18.34;	author gshapiro;	state Exp;
branches;
next	1.18;

1.18
date	2001.07.23.01.33.52;	author gshapiro;	state Exp;
branches;
next	1.17;

1.17
date	2001.05.15.16.03.54;	author gshapiro;	state Exp;
branches;
next	1.16;

1.16
date	2001.05.15.16.01.40;	author gshapiro;	state Exp;
branches;
next	1.15;

1.15
date	2001.04.01.22.54.15;	author gshapiro;	state Exp;
branches;
next	1.14;

1.14
date	2001.04.01.22.48.07;	author gshapiro;	state Exp;
branches;
next	1.13;

1.13
date	2001.03.13.20.58.39;	author gshapiro;	state Exp;
branches;
next	1.12;

1.12
date	2001.02.28.04.03.51;	author gshapiro;	state Exp;
branches;
next	1.11;

1.11
date	2001.02.22.04.17.33;	author gshapiro;	state Exp;
branches;
next	1.10;

1.10
date	2000.08.12.22.39.17;	author gshapiro;	state Exp;
branches;
next	1.9;

1.9
date	2000.03.12.22.08.34;	author rwatson;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	99.08.27.23.23.59;	author peter;	state Exp;
branches;
next	1.7;

1.7
date	99.05.11.03.29.02;	author jmb;	state Exp;
branches;
next	1.6;

1.6
date	99.01.31.15.21.15;	author jmb;	state Exp;
branches;
next	1.5;

1.5
date	98.09.13.23.14.20;	author brian;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	98.07.20.12.30.39;	author andreas;	state Exp;
branches;
next	1.3;

1.3
date	98.02.25.22.06.32;	author jmb;	state Exp;
branches;
next	1.2;

1.2
date	97.12.01.00.15.37;	author jmb;	state Exp;
branches;
next	1.1;

1.1
date	97.10.19.16.40.08;	author jmb;	state Exp;
branches
	1.1.2.1;
next	;

1.37.2.1
date	2012.11.17.01.49.02;	author svnexp;	state dead;
branches;
next	1.37.2.2;

1.37.2.2
date	2013.03.28.13.02.42;	author svnexp;	state Exp;
branches;
next	;

1.36.8.1
date	2012.11.17.07.39.03;	author svnexp;	state Exp;
branches;
next	;

1.36.18.1
date	2012.11.17.08.01.17;	author svnexp;	state Exp;
branches;
next	;

1.36.24.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.36.26.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.36.28.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.36.30.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.36.30.1.2.1
	1.36.30.1.4.1
	1.36.30.1.6.1
	1.36.30.1.8.1;
next	1.36.30.2;

1.36.30.2
date	2012.11.17.10.35.56;	author svnexp;	state Exp;
branches;
next	;

1.36.30.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.36.30.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.36.30.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.36.30.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.36.30.1.8.2;

1.36.30.1.8.2
date	2012.11.17.08.24.38;	author svnexp;	state Exp;
branches;
next	;

1.36.32.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.36.34.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.36.34.2;

1.36.34.2
date	2012.11.17.08.16.37;	author svnexp;	state Exp;
branches;
next	;

1.36.36.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.36.36.1.2.1
	1.36.36.1.4.1;
next	1.36.36.2;

1.36.36.2
date	2012.11.17.11.36.11;	author svnexp;	state Exp;
branches;
next	;

1.36.36.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.36.36.1.2.2;

1.36.36.1.2.2
date	2012.11.17.08.36.11;	author svnexp;	state Exp;
branches;
next	;

1.36.36.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.36.36.1.4.2;

1.36.36.1.4.2
date	2012.11.17.08.47.00;	author svnexp;	state Exp;
branches;
next	;

1.9.2.1
date	2000.08.27.17.31.38;	author gshapiro;	state Exp;
branches;
next	1.9.2.2;

1.9.2.2
date	2001.02.27.21.34.07;	author gshapiro;	state Exp;
branches;
next	1.9.2.3;

1.9.2.3
date	2001.03.06.01.49.56;	author gshapiro;	state Exp;
branches;
next	1.9.2.4;

1.9.2.4
date	2001.03.14.03.22.59;	author gshapiro;	state Exp;
branches;
next	1.9.2.5;

1.9.2.5
date	2001.04.02.17.14.42;	author gshapiro;	state Exp;
branches;
next	1.9.2.6;

1.9.2.6
date	2001.04.21.05.26.37;	author gshapiro;	state Exp;
branches;
next	1.9.2.7;

1.9.2.7
date	2001.04.21.05.27.55;	author gshapiro;	state Exp;
branches;
next	1.9.2.8;

1.9.2.8
date	2001.05.24.20.50.03;	author gshapiro;	state Exp;
branches;
next	1.9.2.9;

1.9.2.9
date	2001.05.24.20.51.06;	author gshapiro;	state Exp;
branches;
next	1.9.2.10;

1.9.2.10
date	2001.07.31.00.16.47;	author gshapiro;	state Exp;
branches;
next	1.9.2.11;

1.9.2.11
date	2001.07.31.00.18.10;	author gshapiro;	state Exp;
branches;
next	1.9.2.12;

1.9.2.12
date	2001.08.01.03.38.40;	author gshapiro;	state Exp;
branches;
next	1.9.2.13;

1.9.2.13
date	2001.10.10.15.49.36;	author gshapiro;	state Exp;
branches;
next	1.9.2.14;

1.9.2.14
date	2001.11.23.17.14.57;	author gshapiro;	state Exp;
branches;
next	1.9.2.15;

1.9.2.15
date	2002.03.25.21.38.48;	author gshapiro;	state Exp;
branches;
next	1.9.2.16;

1.9.2.16
date	2002.04.05.01.59.02;	author gshapiro;	state Exp;
branches;
next	1.9.2.17;

1.9.2.17
date	2002.04.11.23.25.53;	author gshapiro;	state Exp;
branches;
next	1.9.2.18;

1.9.2.18
date	2002.04.20.18.50.58;	author gshapiro;	state Exp;
branches;
next	1.9.2.19;

1.9.2.19
date	2002.05.24.15.41.04;	author gshapiro;	state Exp;
branches;
next	1.9.2.20;

1.9.2.20
date	2002.07.18.13.31.20;	author ru;	state Exp;
branches;
next	1.9.2.21;

1.9.2.21
date	2002.07.20.10.33.52;	author ru;	state Exp;
branches;
next	1.9.2.22;

1.9.2.22
date	2002.08.07.16.31.40;	author ru;	state Exp;
branches;
next	1.9.2.23;

1.9.2.23
date	2003.02.12.03.57.52;	author gshapiro;	state Exp;
branches;
next	1.9.2.24;

1.9.2.24
date	2003.07.12.23.19.16;	author gshapiro;	state Exp;
branches;
next	1.9.2.25;

1.9.2.25
date	2003.07.12.23.23.46;	author gshapiro;	state Exp;
branches;
next	1.9.2.26;

1.9.2.26
date	2004.06.06.17.29.48;	author gshapiro;	state Exp;
branches;
next	1.9.2.27;

1.9.2.27
date	2012.11.17.07.22.38;	author svnexp;	state Exp;
branches;
next	;

1.5.2.1
date	99.02.21.14.32.47;	author jmb;	state Exp;
branches;
next	1.5.2.2;

1.5.2.2
date	99.05.11.03.20.44;	author jmb;	state Exp;
branches;
next	1.5.2.3;

1.5.2.3
date	99.08.29.14.19.23;	author peter;	state Exp;
branches;
next	;

1.1.2.1
date	97.10.20.22.26.05;	author nate;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	97.10.20.22.27.59;	author nate;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	98.02.15.14.24.57;	author jkh;	state Exp;
branches;
next	1.1.2.4;

1.1.2.4
date	98.02.25.22.21.33;	author jmb;	state Exp;
branches;
next	1.1.2.5;

1.1.2.5
date	98.07.20.17.43.14;	author andreas;	state Exp;
branches;
next	1.1.2.6;

1.1.2.6
date	98.09.13.23.10.08;	author brian;	state Exp;
branches;
next	1.1.2.7;

1.1.2.7
date	99.09.05.11.02.09;	author peter;	state Exp;
branches;
next	;


desc
@@


1.37
log
@Switching exporter and resync
@
text
@#
# $FreeBSD: head/etc/mail/Makefile 130157 2004-06-06 17:28:31Z gshapiro $
#
# This Makefile provides an easy way to generate the configuration
# file and database maps for the sendmail(8) daemon.
#
# The user-driven targets are:
#
# all     - Build cf, maps and aliases
# cf      - Build the .cf file from .mc file
# maps    - Build the feature maps
# aliases - Build the sendmail aliases
# install - Install the .cf file as /etc/mail/sendmail.cf
#
# For acting on both the MTA daemon and MSP queue running daemon:
# start        - Start both the sendmail MTA daemon and MSP queue running
#                daemon with the flags defined in /etc/defaults/rc.conf or
#                /etc/rc.conf
# stop         - Stop both the sendmail MTA daemon and MSP queue running
#                daemon
# restart      - Restart both the sendmail MTA daemon and MSP queue running
#                daemon
#
# For acting on just the MTA daemon:
# start-mta    - Start the sendmail MTA daemon with the flags defined in
#                /etc/defaults/rc.conf or /etc/rc.conf
# stop-mta     - Stop the sendmail MTA daemon
# restart-mta  - Restart the sendmail MTA daemon
#
# For acting on just the MSP queue running daemon:
# start-mspq   - Start the sendmail MSP queue running daemon with the
#                flags defined in /etc/defaults/rc.conf or /etc/rc.conf
# stop-mspq    - Stop the sendmail MSP queue running daemon
# restart-mspq - Restart the sendmail MSP queue running daemon
#
# Calling `make' will generate the updated versions when either the
# aliases or one of the map files were changed.
#
# A `make install` is only necessary after modifying the .mc file. In
# this case one would normally also call `make restart' to allow the
# running sendmail to pick up the changes as well.
#
# ------------------------------------------------------------------------
# This Makefile uses `<HOSTNAME>.mc' as the default MTA .mc file.  This
# can be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.:
#
#	SENDMAIL_MC=/etc/mail/myconfig.mc
#
# If '<HOSTNAME>.mc' does not exist, it is created using 'freebsd.mc'
# as a template.
#
# It also uses '<HOSTNAME>.submit.mc' as the default mail submission .mc
# file.  This can be changed by defining SENDMAIL_SUBMIT_MC in
# /etc/make.conf, e.g.:
#
#	SENDMAIL_SUBMIT_MC=/etc/mail/mysubmit.mc
#
# If '<HOSTNAME>.submit.mc' does not exist, it is created using
# 'freebsd.submit.mc' as a template.
# ------------------------------------------------------------------------
#
# The Makefile knows about the following maps:
# access, bitdomain, domaintable, genericstable, mailertable, userdb,
# uucpdomain, virtusertable
#

.ifndef SENDMAIL_MC
SENDMAIL_MC!=           hostname
SENDMAIL_MC:=           ${SENDMAIL_MC}.mc

${SENDMAIL_MC}:
	cp freebsd.mc ${SENDMAIL_MC}
.endif

.ifndef SENDMAIL_SUBMIT_MC
SENDMAIL_SUBMIT_MC!=	hostname
SENDMAIL_SUBMIT_MC:=	${SENDMAIL_SUBMIT_MC}.submit.mc

${SENDMAIL_SUBMIT_MC}:
	cp freebsd.submit.mc ${SENDMAIL_SUBMIT_MC}
.endif

INSTALL_CF=		${SENDMAIL_MC:R}.cf

.ifndef SENDMAIL_SET_USER_ID
INSTALL_SUBMIT_CF=	${SENDMAIL_SUBMIT_MC:R}.cf
.endif

SENDMAIL_ALIASES?=	/etc/mail/aliases

#
# This is the directory where the sendmail configuration files are
# located.
#
.if exists(/usr/share/sendmail/cf)
SENDMAIL_CF_DIR?=	/usr/share/sendmail/cf
.elif exists(/usr/src/contrib/sendmail/cf)
SENDMAIL_CF_DIR?=	/usr/src/contrib/sendmail/cf
.endif

#
# The sendmail startup script
#
SENDMAIL_START_SCRIPT?=	/etc/rc.sendmail

#
# Some useful programs we need.
#
SENDMAIL?=		/usr/sbin/sendmail
MAKEMAP?=		/usr/sbin/makemap
M4?=			/usr/bin/m4

# Permissions for generated maps
SENDMAIL_MAP_PERMS?=	0640

# Set a reasonable default
.MAIN: all

#
# ------------------------------------------------------------------------
#
# The Makefile picks up the list of files from SENDMAIL_MAP_SRC and
# stores the matching .db filenames in SENDMAIL_MAP_OBJ if the file
# exists in the current directory.  SENDMAIL_MAP_TYPE is the database
# type to use when calling makemap.
#
SENDMAIL_MAP_SRC+=	mailertable domaintable bitdomain uucpdomain \
			genericstable virtusertable access
SENDMAIL_MAP_OBJ=
SENDMAIL_MAP_TYPE?=	hash

.for _f in ${SENDMAIL_MAP_SRC} userdb
.if exists(${_f})
SENDMAIL_MAP_OBJ+=	${_f}.db
.endif
.endfor

#
# The makemap command is used to generate a hashed map from the textfile.
#
.for _f in ${SENDMAIL_MAP_SRC}
.if (exists(${_f}.sample) && !exists(${_f}))
${_f}: ${_f}.sample
	sed -e 's/^/#/' < ${.OODATE} > ${.TARGET}
.endif

${_f}.db: ${_f}
	${MAKEMAP} ${SENDMAIL_MAP_TYPE} ${.TARGET} < ${.OODATE}
	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}
.endfor

userdb.db: userdb
	${MAKEMAP} btree ${.TARGET} < ${.OODATE}
	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}


#
# The .cf file needs to be recreated if the templates were modified.
#
M4FILES!=	find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print

#
# M4(1) is used to generate the .cf file from the .mc file.
#
.SUFFIXES: .cf .mc

.mc.cf: ${M4FILES}
	${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \
	    ${SENDMAIL_CF_DIR}/m4/cf.m4 ${@@:R}.mc > ${.TARGET}

#
# Aliases are handled separately since they normally reside in /etc
# and can be rebuild without the help of makemap.
#
.for _f in ${SENDMAIL_ALIASES}
${_f}.db: ${_f}
	${SENDMAIL} -bi -OAliasFile=${.ALLSRC}
	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}
.endfor

#
# ------------------------------------------------------------------------
#

all: cf maps aliases

clean:

depend:

cf: ${INSTALL_CF} ${INSTALL_SUBMIT_CF}

.ifdef SENDMAIL_SET_USER_ID
install: install-cf
.else
install: install-cf install-submit-cf
.endif

install-cf: ${INSTALL_CF}
.if ${INSTALL_CF} != /etc/mail/sendmail.cf
	${INSTALL} -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
.endif


install-submit-cf: ${INSTALL_SUBMIT_CF}
.ifdef SENDMAIL_SET_USER_ID
	@@echo ">>> ERROR: You should not create a submit.cf file if you are using a"
	@@echo "           set-user-ID sendmail binary (SENDMAIL_SET_USER_ID is set"
	@@echo "           in make.conf)."
	@@false
.else
.if ${INSTALL_SUBMIT_CF} != /etc/mail/submit.cf
	${INSTALL} -m ${SHAREMODE} ${INSTALL_SUBMIT_CF} /etc/mail/submit.cf
.endif
.endif

aliases: ${SENDMAIL_ALIASES:%=%.db}

maps: ${SENDMAIL_MAP_OBJ}

start start-mta start-mspq:
	@@if [ -r ${SENDMAIL_START_SCRIPT} ]; then \
		echo -n 'Starting:'; \
		sh ${SENDMAIL_START_SCRIPT} $@@; \
		echo '.'; \
	fi

stop stop-mta stop-mspq:
	@@if [ -r ${SENDMAIL_START_SCRIPT} ]; then \
		echo -n 'Stopping:'; \
		sh ${SENDMAIL_START_SCRIPT} $@@; \
		echo '.'; \
	fi

restart restart-mta restart-mspq:
	@@if [ -r ${SENDMAIL_START_SCRIPT} ]; then \
		echo -n 'Restarting:'; \
		sh ${SENDMAIL_START_SCRIPT} $@@; \
		echo '.'; \
	fi

# User defined targets
.if exists(Makefile.local)
.include "Makefile.local"
.endif

# For the definition of $SHAREMODE
.include <bsd.own.mk>
@


1.37.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:02:42 +0000
@
text
@d1 248
@


1.37.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 248
#
# $FreeBSD: releng/8.4/etc/mail/Makefile 130157 2004-06-06 17:28:31Z gshapiro $
#
# This Makefile provides an easy way to generate the configuration
# file and database maps for the sendmail(8) daemon.
#
# The user-driven targets are:
#
# all     - Build cf, maps and aliases
# cf      - Build the .cf file from .mc file
# maps    - Build the feature maps
# aliases - Build the sendmail aliases
# install - Install the .cf file as /etc/mail/sendmail.cf
#
# For acting on both the MTA daemon and MSP queue running daemon:
# start        - Start both the sendmail MTA daemon and MSP queue running
#                daemon with the flags defined in /etc/defaults/rc.conf or
#                /etc/rc.conf
# stop         - Stop both the sendmail MTA daemon and MSP queue running
#                daemon
# restart      - Restart both the sendmail MTA daemon and MSP queue running
#                daemon
#
# For acting on just the MTA daemon:
# start-mta    - Start the sendmail MTA daemon with the flags defined in
#                /etc/defaults/rc.conf or /etc/rc.conf
# stop-mta     - Stop the sendmail MTA daemon
# restart-mta  - Restart the sendmail MTA daemon
#
# For acting on just the MSP queue running daemon:
# start-mspq   - Start the sendmail MSP queue running daemon with the
#                flags defined in /etc/defaults/rc.conf or /etc/rc.conf
# stop-mspq    - Stop the sendmail MSP queue running daemon
# restart-mspq - Restart the sendmail MSP queue running daemon
#
# Calling `make' will generate the updated versions when either the
# aliases or one of the map files were changed.
#
# A `make install` is only necessary after modifying the .mc file. In
# this case one would normally also call `make restart' to allow the
# running sendmail to pick up the changes as well.
#
# ------------------------------------------------------------------------
# This Makefile uses `<HOSTNAME>.mc' as the default MTA .mc file.  This
# can be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.:
#
#	SENDMAIL_MC=/etc/mail/myconfig.mc
#
# If '<HOSTNAME>.mc' does not exist, it is created using 'freebsd.mc'
# as a template.
#
# It also uses '<HOSTNAME>.submit.mc' as the default mail submission .mc
# file.  This can be changed by defining SENDMAIL_SUBMIT_MC in
# /etc/make.conf, e.g.:
#
#	SENDMAIL_SUBMIT_MC=/etc/mail/mysubmit.mc
#
# If '<HOSTNAME>.submit.mc' does not exist, it is created using
# 'freebsd.submit.mc' as a template.
# ------------------------------------------------------------------------
#
# The Makefile knows about the following maps:
# access, bitdomain, domaintable, genericstable, mailertable, userdb,
# uucpdomain, virtusertable
#

.ifndef SENDMAIL_MC
SENDMAIL_MC!=           hostname
SENDMAIL_MC:=           ${SENDMAIL_MC}.mc

${SENDMAIL_MC}:
	cp freebsd.mc ${SENDMAIL_MC}
.endif

.ifndef SENDMAIL_SUBMIT_MC
SENDMAIL_SUBMIT_MC!=	hostname
SENDMAIL_SUBMIT_MC:=	${SENDMAIL_SUBMIT_MC}.submit.mc

${SENDMAIL_SUBMIT_MC}:
	cp freebsd.submit.mc ${SENDMAIL_SUBMIT_MC}
.endif

INSTALL_CF=		${SENDMAIL_MC:R}.cf

.ifndef SENDMAIL_SET_USER_ID
INSTALL_SUBMIT_CF=	${SENDMAIL_SUBMIT_MC:R}.cf
.endif

SENDMAIL_ALIASES?=	/etc/mail/aliases

#
# This is the directory where the sendmail configuration files are
# located.
#
.if exists(/usr/share/sendmail/cf)
SENDMAIL_CF_DIR?=	/usr/share/sendmail/cf
.elif exists(/usr/src/contrib/sendmail/cf)
SENDMAIL_CF_DIR?=	/usr/src/contrib/sendmail/cf
.endif

#
# The sendmail startup script
#
SENDMAIL_START_SCRIPT?=	/etc/rc.sendmail

#
# Some useful programs we need.
#
SENDMAIL?=		/usr/sbin/sendmail
MAKEMAP?=		/usr/sbin/makemap
M4?=			/usr/bin/m4

# Permissions for generated maps
SENDMAIL_MAP_PERMS?=	0640

# Set a reasonable default
.MAIN: all

#
# ------------------------------------------------------------------------
#
# The Makefile picks up the list of files from SENDMAIL_MAP_SRC and
# stores the matching .db filenames in SENDMAIL_MAP_OBJ if the file
# exists in the current directory.  SENDMAIL_MAP_TYPE is the database
# type to use when calling makemap.
#
SENDMAIL_MAP_SRC+=	mailertable domaintable bitdomain uucpdomain \
			genericstable virtusertable access
SENDMAIL_MAP_OBJ=
SENDMAIL_MAP_TYPE?=	hash

.for _f in ${SENDMAIL_MAP_SRC} userdb
.if exists(${_f})
SENDMAIL_MAP_OBJ+=	${_f}.db
.endif
.endfor

#
# The makemap command is used to generate a hashed map from the textfile.
#
.for _f in ${SENDMAIL_MAP_SRC}
.if (exists(${_f}.sample) && !exists(${_f}))
${_f}: ${_f}.sample
	sed -e 's/^/#/' < ${.OODATE} > ${.TARGET}
.endif

${_f}.db: ${_f}
	${MAKEMAP} ${SENDMAIL_MAP_TYPE} ${.TARGET} < ${.OODATE}
	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}
.endfor

userdb.db: userdb
	${MAKEMAP} btree ${.TARGET} < ${.OODATE}
	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}


#
# The .cf file needs to be recreated if the templates were modified.
#
M4FILES!=	find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print

#
# M4(1) is used to generate the .cf file from the .mc file.
#
.SUFFIXES: .cf .mc

.mc.cf: ${M4FILES}
	${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \
	    ${SENDMAIL_CF_DIR}/m4/cf.m4 ${@@:R}.mc > ${.TARGET}

#
# Aliases are handled separately since they normally reside in /etc
# and can be rebuild without the help of makemap.
#
.for _f in ${SENDMAIL_ALIASES}
${_f}.db: ${_f}
	${SENDMAIL} -bi -OAliasFile=${.ALLSRC}
	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}
.endfor

#
# ------------------------------------------------------------------------
#

all: cf maps aliases

clean:

depend:

cf: ${INSTALL_CF} ${INSTALL_SUBMIT_CF}

.ifdef SENDMAIL_SET_USER_ID
install: install-cf
.else
install: install-cf install-submit-cf
.endif

install-cf: ${INSTALL_CF}
.if ${INSTALL_CF} != /etc/mail/sendmail.cf
	${INSTALL} -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
.endif


install-submit-cf: ${INSTALL_SUBMIT_CF}
.ifdef SENDMAIL_SET_USER_ID
	@@echo ">>> ERROR: You should not create a submit.cf file if you are using a"
	@@echo "           set-user-ID sendmail binary (SENDMAIL_SET_USER_ID is set"
	@@echo "           in make.conf)."
	@@false
.else
.if ${INSTALL_SUBMIT_CF} != /etc/mail/submit.cf
	${INSTALL} -m ${SHAREMODE} ${INSTALL_SUBMIT_CF} /etc/mail/submit.cf
.endif
.endif

aliases: ${SENDMAIL_ALIASES:%=%.db}

maps: ${SENDMAIL_MAP_OBJ}

start start-mta start-mspq:
	@@if [ -r ${SENDMAIL_START_SCRIPT} ]; then \
		echo -n 'Starting:'; \
		sh ${SENDMAIL_START_SCRIPT} $@@; \
		echo '.'; \
	fi

stop stop-mta stop-mspq:
	@@if [ -r ${SENDMAIL_START_SCRIPT} ]; then \
		echo -n 'Stopping:'; \
		sh ${SENDMAIL_START_SCRIPT} $@@; \
		echo '.'; \
	fi

restart restart-mta restart-mspq:
	@@if [ -r ${SENDMAIL_START_SCRIPT} ]; then \
		echo -n 'Restarting:'; \
		sh ${SENDMAIL_START_SCRIPT} $@@; \
		echo '.'; \
	fi

# User defined targets
.if exists(Makefile.local)
.include "Makefile.local"
.endif

# For the definition of $SHAREMODE
.include <bsd.own.mk>
@


1.36
log
@Remove trailing space.

Submitted by:	jens
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.36.18.1
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: stable/7/etc/mail/Makefile 130157 2004-06-06 17:28:31Z gshapiro $
@


1.36.8.1
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: stable/6/etc/mail/Makefile 130157 2004-06-06 17:28:31Z gshapiro $
@


1.36.36.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.36.36.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: stable/9/etc/mail/Makefile 130157 2004-06-06 17:28:31Z gshapiro $
@


1.36.36.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.36.36.1.4.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/9.1/etc/mail/Makefile 130157 2004-06-06 17:28:31Z gshapiro $
@


1.36.36.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.36.36.1.2.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/9.0/etc/mail/Makefile 130157 2004-06-06 17:28:31Z gshapiro $
@


1.36.34.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.36.34.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/7.4/etc/mail/Makefile 130157 2004-06-06 17:28:31Z gshapiro $
@


1.36.32.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.36.30.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.36.30.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: stable/8/etc/mail/Makefile 130157 2004-06-06 17:28:31Z gshapiro $
@


1.36.30.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.36.30.1.8.2
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: releng/8.3/etc/mail/Makefile 130157 2004-06-06 17:28:31Z gshapiro $
@


1.36.30.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.36.30.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.36.30.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.36.28.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.36.26.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.36.24.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.35
log
@Bow to popular demand and default SENDMAIL_SUBMIT_MC to
`hostname`.submit.mc which is templated from freebsd.submit.mc if the
default file does not exist.  This makes the building of the submit.cf
behavior identical to that of the the sendmail.cf.

PR:		44256
Submitted by:	Matt Emmerton <matt@@gsicomp.on.ca>
MFC after:	5 days
@
text
@d77 1
a77 1
SENDMAIL_SUBMIT_MC:=	${SENDMAIL_SUBMIT_MC}.submit.mc 
@


1.34
log
@Style fixes: tab after a dependency operator should be a single space
             second level indent of tab should be four spaces

Submitted by:	ru
MFC after:	3 days
@
text
@d52 3
a54 3
# It also uses 'freebsd.submit.mc' as the default mail submission .mc file.
# This can be changed by defining SENDMAIL_SUBMIT_MC in /etc/make.conf,
# e.g.:
d57 3
d75 7
a81 1
SENDMAIL_SUBMIT_MC?=	freebsd.submit.mc
@


1.33
log
@Allow multiple aliases files to be rebuilt

PR:		bin/40540
Submitted by:	Cyrille Lefevre <cyrille.lefevre@@laposte.net>
MFC after:	3 days
@
text
@d47 1
a47 1
#		   SENDMAIL_MC=/etc/mail/myconfig.mc
d56 1
a56 1
#		   SENDMAIL_SUBMIT_MC=/etc/mail/mysubmit.mc
d108 1
a108 1
.MAIN:	all
d134 1
a134 1
${_f}:		${_f}.sample
d138 1
a138 1
${_f}.db:	${_f}
d143 1
a143 1
userdb.db:	userdb
d156 1
a156 1
.SUFFIXES:	.cf .mc
d158 1
a158 1
.mc.cf:		${M4FILES}
d160 1
a160 1
		${SENDMAIL_CF_DIR}/m4/cf.m4 ${@@:R}.mc > ${.TARGET}
d167 1
a167 1
${_f}.db:	${_f}
d176 1
a176 1
all:		cf maps aliases
d182 1
a182 1
cf:		${INSTALL_CF} ${INSTALL_SUBMIT_CF}
d190 1
a190 1
install-cf:	${INSTALL_CF}
d196 1
a196 1
install-submit-cf:	${INSTALL_SUBMIT_CF}
d208 1
a208 1
aliases:	${SENDMAIL_ALIASES:%=%.db}
d210 1
a210 1
maps:		${SENDMAIL_MAP_OBJ}
@


1.32
log
@Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
@
text
@d166 3
a168 2
${SENDMAIL_ALIASES}.db:	${SENDMAIL_ALIASES}
	${SENDMAIL} -bi
d170 1
d208 1
a208 1
aliases:	${SENDMAIL_ALIASES}.db
@


1.31
log
@s/${INSTALL} -c/${INSTALL} ${COPY}/
@
text
@d190 1
a190 1
	${INSTALL} ${COPY} -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
d202 1
a202 1
	${INSTALL} ${COPY} -m ${SHAREMODE} ${INSTALL_SUBMIT_CF} /etc/mail/submit.cf
@


1.30
log
@Add a new make.conf knob, SENDMAIL_MAP_PERMS, which specifies the
permissions to use for alias and map database files built by
/etc/mail/Makefile.  The default is 0640 to assist users in avoiding
a file locking local denial of service.

MFC after:	1 day
		pending RE approval
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.29 2002/04/23 17:08:08 gshapiro Exp $
d190 1
a190 1
	${INSTALL} -c -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
d202 1
a202 1
	${INSTALL} -c -m ${SHAREMODE} ${INSTALL_SUBMIT_CF} /etc/mail/submit.cf
@


1.29
log
@sys.mk no longer includes bsd.own.mk so I need to include it here for
the definition of SHAREMODE.

Submitted by:	Udo Schweigert <Udo.Schweigert@@siemens.com>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.28 2002/04/14 19:20:19 gshapiro Exp $
d104 3
d140 1
d145 1
d168 1
@


1.28
log
@Provide a new make.conf knob, SENDMAIL_SUBMIT_MC to allow users to pick
the .mc file used for /etc/mail/submit.cf.  By default,
/etc/mail/freebsd.submit.mc is installed and used.

Requested by:	fenner
Submitted by:	ume
MFC after:	1 week
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.27 2002/04/05 02:30:45 gshapiro Exp $
d229 3
@


1.27
log
@Quoting Peter Wemm, "At great personal risk, touch the sendmail startup
again."

As an alternative to sendmail_enable=NONE, solve the boot time problem
for non-sendmail users completely by moving all of the sendmail startup
code from /etc/rc to /etc/rc.sendmail.  The source for that script will
be kept in src/etc/sendmail/rc.sendmail so make.conf's NO_SENDMAIL will
prevent it from being installed.  A new rc.conf variable,
mta_start_script specifies the script to run to start the user's
preferred MTA.  For backward compatibility, it will default to
/etc/rc.sendmail.  The specified script is called out of /etc/rc after
checking to make sure it exists.  A new rc.sendmail.8 man page has also
been added which now houses the sendmail_* variable descriptions
formerly in rc.conf.5.

Use /etc/rc.sendmail in /etc/mail/Makefile to reduce code duplication.

Reviewed by:	-current, -stable, obrien, peter, ru
MFC after:	1 week
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.26 2002/04/04 07:42:12 ru Exp $
d44 2
a45 3
#
# This makefile uses `<HOSTNAME>.mc' as the default .mc file.  This can
# be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.:
d51 6
d72 2
d76 4
d174 1
a174 1
cf:		${INSTALL_CF}
d176 13
a188 1
submit.cf:	submit.mc
d194 4
a199 2
maps:		${SENDMAIL_MAP_OBJ}

d202 1
a202 4
install:	${INSTALL_CF}
.if ${INSTALL_CF} != /etc/mail/sendmail.cf
	${INSTALL} -c -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
.endif
@


1.26
log
@Back out last commit.  (This file is installed under /etc/mail.)

Requested by:	gshapiro
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.24 2002/03/28 03:30:27 gshapiro Exp $
d15 14
a28 5
# For the MTA daemon:
# start   - Start the sendmail daemon with the flags defined in
#           /etc/defaults/rc.conf or /etc/rc.conf
# stop    - Stop the sendmail daemon
# restart - Restart the sendmail daemon
d30 1
a30 1
# For the MSP queue running daemon:
d82 1
a82 1
# The pid is used to stop and restart the running daemon.
d84 1
a84 2
SENDMAIL_PIDFILE?=	/var/run/sendmail.pid
SENDMAIL_MSPQ_PIDFILE?=	/var/spool/clientmqueue/sm-client.pid
a91 1
KILL?=			/bin/kill
d182 20
a201 59
start:
	@@(. /etc/defaults/rc.conf; source_rc_confs; \
	case "$${sendmail_enable}" in \
	[Nn][Oo][Nn][Ee]) \
		echo "ERROR: sendmail_enable is set to $${sendmail_enable}" \
		;; \
	[Yy][Ee][Ss]) \
		${SENDMAIL} $${sendmail_flags}; \
		echo "${SENDMAIL} $${sendmail_flags}" \
		;; \
	*) \
		case "$${sendmail_submit_enable}" in \
		[Yy][Ee][Ss]) \
			${SENDMAIL} $${sendmail_submit_flags}; \
			echo "${SENDMAIL} $${sendmail_submit_flags}" \
			;; \
		*) \
			case "$${sendmail_outbound_enable}" in \
			[Yy][Ee][Ss]) \
				${SENDMAIL} $${sendmail_outbound_flags}; \
				echo "${SENDMAIL} $${sendmail_outbound_flags}" \
				;; \
			esac \
			;; \
		esac \
		;; \
	esac \
	)

stop:
	${KILL} -TERM `head -1 ${SENDMAIL_PIDFILE}`

restart:
	${KILL} -HUP `head -1 ${SENDMAIL_PIDFILE}`

start-mspq:
	@@(. /etc/defaults/rc.conf; source_rc_confs; \
	case "$${sendmail_enable}" in \
	[Nn][Oo][Nn][Ee]) \
		echo "ERROR: sendmail_enable is set to $${sendmail_enable}" \
		;; \
	*) \
		if [ -r /etc/mail/submit.cf ]; then \
			case "$${sendmail_msp_queue_enable}" in \
			[Yy][Ee][Ss]) \
				${SENDMAIL} $${sendmail_msp_queue_flags}; \
				echo "${SENDMAIL} $${sendmail_msp_queue_flags}" \
				;; \
			esac \
		fi \
		;; \
	esac \
	)

stop-mspq:
	${KILL} -TERM `head -1 ${SENDMAIL_MSPQ_PIDFILE}`

restart-mspq:
	${KILL} -HUP `head -1 ${SENDMAIL_MSPQ_PIDFILE}`
@


1.25
log
@Use a relative path to contrib/sendmail/cf.
@
text
@d68 2
a69 2
.elif exists(${.CURDIR}/../../contrib/sendmail/cf)
SENDMAIL_CF_DIR?=	${.CURDIR}/../../contrib/sendmail/cf
@


1.24
log
@Update the /etc/mail/Makefile "start" target code to match the new startup
logic and added a new set of targets for controlling the MSP queue runner
(start-mspq, stop-mspq, and restart-mspq).

Reminded by: Mark Santcroos <marks@@ripe.net>
MFC after:	1 week
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.23 2002/02/17 22:12:57 gshapiro Exp $
d68 2
a69 2
.elif exists(/usr/src/contrib/sendmail/cf)
SENDMAIL_CF_DIR?=	/usr/src/contrib/sendmail/cf
@


1.23
log
@Don't build a submit.cf file if SENDMAIL_SET_USER_ID is set
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.22 2001/11/20 03:31:54 gshapiro Exp $
d14 2
d21 6
d76 1
d176 1
a176 1
	(. /etc/defaults/rc.conf; source_rc_confs; \
d178 3
d182 2
a183 1
		/usr/sbin/sendmail $${sendmail_flags} \
d186 1
a186 1
		case "$${sendmail_outbound_enable}" in \
d188 10
a197 1
			/usr/sbin/sendmail $${sendmail_outbound_flags} \
d209 25
@


1.22
log
@Handle the sendmail_outbound_enable knob in the start target.

PR:		32033
MFC after:	3 days
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.21 2001/10/08 22:35:24 gshapiro Exp $
d148 8
@


1.21
log
@Do not clobber users hostname.mc file if freebsd.mc changes (likely after an
installworld).

Submitted by:	Steve Watt <steve@@Watt.COM>
MFC after:	2 days
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.20 2001/08/01 02:12:31 gshapiro Exp $
d160 12
a171 4
	   if [ "$${sendmail_enable}" = "YES" -a -r /etc/mail/sendmail.cf ];\
	   then \
	     ${SENDMAIL} $${sendmail_flags}; \
	   fi \
@


1.20
log
@Revert change to always include _FFR_TLS_O_T as it requires FEATURE(access_db)

Problem found by:	nsayer
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.19 2001/07/23 02:18:34 gshapiro Exp $
d46 1
a46 1
${SENDMAIL_MC}: freebsd.mc
@


1.19
log
@If the user sets SENDMAIL_MC to /etc/mail/sendmail.mc, install is told to
install /etc/mail/sendmail.cf to /etc/mail/sendmail.cf and exits with an
error:

===> etc/sendmail
install -c -o root -g wheel -m 644 /etc/mail/sendmail.cf /etc/mail/sendmail.cf
install: /etc/mail/sendmail.cf and /etc/mail/sendmail.cf are the same file
*** Error code 64

Catch this in the Makefile and don't call install if the source and target
are the same file.

Reported by:	Alexandr Listopad <laa@@reis.zp.ua>
MFC after:	1 week
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.18 2001/07/23 01:33:52 gshapiro Exp $
a40 2

SENDMAIL_M4_FLAGS+=	-D_FFR_TLS_O_T
@


1.18
log
@New make knob, SENDMAIL_M4_FLAGS, modifies the flags passed to m4 when
building a .cf file from a .mc file.

Include -D_FFR_TLS_O_T to enable tls policy control since the sendmail binary
build enables that FFR as well.

PR:		conf/28361
MFC after:	1 week
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.17 2001/05/15 16:03:54 gshapiro Exp $
d156 1
d158 1
@


1.17
log
@Allow users to add local Makefile targets.

Submitted by:	dinoex
MFC after:	7 days
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.16 2001/05/15 16:01:40 gshapiro Exp $
d42 2
d129 2
a130 2
	${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_CF_DIR}/m4/cf.m4 \
		${@@:R}.mc > ${.TARGET}
@


1.16
log
@Make the default .mc file be `hostname`.mc if SENDMAIL_MC make.conf knob
is not set.  This allows admins to create a per-machine configuration file
while leaving the freebsd.mc template pristine.  Provide a rule to create
`hostname`.mc from freebsd.mc if it doesn't exist.

PR:		misc/26299
MFC after:	8 days
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.15 2001/04/01 22:54:15 gshapiro Exp $
d169 5
@


1.15
log
@Allow users to override the default map type used for building maps.
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.14 2001/04/01 22:48:07 gshapiro Exp $
d28 1
a28 1
# This makefile uses `freebsd.mc' as the default .mc file.  This can
d33 2
d42 8
a49 1
SENDMAIL_MC?=		freebsd.mc
@


1.14
log
@The userdb database is different from the rest of the databases.  It *must*
be a btree.

PR:		bin/26149
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.13 2001/03/13 20:58:39 gshapiro Exp $
d76 2
a77 1
# exists in the current directory.
d82 1
d100 1
a100 1
	${MAKEMAP} hash ${.TARGET} < ${.OODATE}
@


1.13
log
@Read information from local rc.conf file(s) to get proper settings for
'make start'.

PR:		conf/25639
Submitted by:	Esa Karkkainen <ejk@@pp.htv.fi>
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.12 2001/02/28 04:03:51 gshapiro Exp $
d79 1
a79 1
			genericstable virtusertable access userdb
d82 1
a82 1
.for _f in ${SENDMAIL_MAP_SRC}
d100 4
@


1.12
log
@Fix dependencies and use a better variable name
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.11 2001/02/22 04:17:33 gshapiro Exp $
d142 1
a142 1
	(. /etc/defaults/rc.conf; \
@


1.11
log
@Revamp /etc/mail/Makefile:

+ Add support for the new SENDMAIL_MC make.conf knob
+ Add the ability to build .cf files from .mc files
+ Generalize map rebuilding
+ Add the ability to rebuild the aliases file
+ Add the ability to stop, start, and restart sendmail

PR:		bin/13759, bin/19897, bin/24397
@
text
@d2 1
a2 1
# $FreeBSD$
d41 1
a41 1
SENDMAIL_MC_CF=		${SENDMAIL_MC:R}.cf
a114 2
${SENDMAIL_MC_CF}:	${M4FILES}

d132 1
a132 1
cf:		${SENDMAIL_MC_CF}
d138 2
a139 2
install:	${SENDMAIL_MC_CF}
	${INSTALL} -c -m ${SHAREMODE} ${SENDMAIL_MC_CF} /etc/mail/sendmail.cf
@


1.10
log
@The rest of the changes needed to support the new version of sendmail (8.11.0).
Beyond changes to the build system, this includes fixing up the sample
freebsd.mc configuration for changes in defaults and syntax, removing
outdated documentation, and updating the release notes.
@
text
@d1 126
a126 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9 2000/03/12 22:08:34 rwatson Exp $
d128 1
a128 2
all: access.db mailertable.db virtusertable.db	\
# /etc/mail/aliases.db
d130 3
a132 2
access.db: access
	/usr/sbin/makemap hash access < access
d134 1
a134 2
virtusertable.db: virtusertable
	/usr/sbin/makemap hash virtusertable < virtusertable
d136 1
a136 2
mailertable.db: mailertable
	/usr/sbin/makemap hash mailertable < mailertable
d138 1
a138 2
#/etc/mail/aliases.db: /etc/mail/aliases
#	newaliases
d140 2
a141 3
mailertable:
	@@echo Generating empty mailertable
	sed -e 's/^/#/' < mailertable.sample > mailertable
d143 7
a149 3
access:
	@@echo Generating empty access
	sed -e 's/^/#/' < access.sample > access
d151 2
a152 3
virtusertable:
	@@echo Generating empty virtusertable
	sed -e 's/^/#/' < virtusertable.sample > virtusertable
d154 2
a155 2
clean:
	rm -f access.db virtusertable.db mailertable.db
@


1.9
log
@Add sample databases for sendmail (access, mailertable, virtusertable),
as well as rename access.txt back to the standard access.  Also modify
the Makefile to know how to build hashes for each of these databases.
If one of the databases is missing when Make is run, use a commented
out version of the sample.

Reviewed by:	peter
Approved by:	jkh
@
text
@d1 1
a1 1
# $FreeBSD: src/etc/mail/Makefile,v 1.8 1999/08/27 23:23:59 peter Exp $
d4 1
a4 1
# /etc/aliases.db
d15 1
a15 1
#/etc/aliases.db: /etc/aliases
d17 1
a17 1
	
@


1.9.2.1
log
@MFC: Import of sendmail 8.11.0.
     Includes: moving /etc/aliases to /etc/mail/aliases, removing outdated
               documentation, and updating freebsd.mc for new syntax.
@
text
@d1 1
a1 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9 2000/03/12 22:08:34 rwatson Exp $
d4 1
a4 1
# /etc/mail/aliases.db
d15 1
a15 1
#/etc/mail/aliases.db: /etc/mail/aliases
d17 1
a17 1

@


1.9.2.2
log
@MFC: Revamp /etc/mail/Makefile:

     + Add support for the new SENDMAIL_MC make.conf knob
     + Add the ability to build .cf files from .mc files
     + Generalize map rebuilding
     + Add the ability to rebuild the aliases file
     + Add the ability to stop, start, and restart sendmail

     Revision  Changes    Path
     1.11      +146 -22   src/etc/mail/Makefile
@
text
@d1 1
a1 126
#
 # $FreeBSD: src/etc/mail/Makefile,v 1.9.2.1 2000/08/27 17:31:38 gshapiro Exp $
#
# This Makefile provides an easy way to generate the configuration
# file and database maps for the sendmail(8) daemon.
#
# The user-driven targets are:
#
# all     - Build cf, maps and aliases
# cf      - Build the .cf file from .mc file
# maps    - Build the feature maps
# aliases - Build the sendmail aliases
# install - Install the .cf file as /etc/mail/sendmail.cf
# start   - Start the sendmail daemon with the flags defined in
#           /etc/defaults/rc.conf or /etc/rc.conf
# stop    - Stop the sendmail daemon
# restart - Restart the sendmail daemon
#
# Calling `make' will generate the updated versions when either the
# aliases or one of the map files were changed.
#
# A `make install` is only necessary after modifying the .mc file. In
# this case one would normally also call `make restart' to allow the
# running sendmail to pick up the changes as well.
#
# ------------------------------------------------------------------------
#
# This makefile uses `freebsd.mc' as the default .mc file.  This can
# be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.:
#
#		   SENDMAIL_MC=/etc/mail/myconfig.mc
#
# ------------------------------------------------------------------------
#
# The Makefile knows about the following maps:
# access, bitdomain, domaintable, genericstable, mailertable, userdb,
# uucpdomain, virtusertable
#

SENDMAIL_MC?=		freebsd.mc
SENDMAIL_MC_CF=		${SENDMAIL_MC:R}.cf

SENDMAIL_ALIASES?=	/etc/mail/aliases

#
# This is the directory where the sendmail configuration files are
# located.
#
.if exists(/usr/share/sendmail/cf)
SENDMAIL_CF_DIR?=	/usr/share/sendmail/cf
.elif exists(/usr/src/contrib/sendmail/cf)
SENDMAIL_CF_DIR?=	/usr/src/contrib/sendmail/cf
.endif

#
# The pid is used to stop and restart the running daemon.
#
SENDMAIL_PIDFILE?=	/var/run/sendmail.pid

#
# Some useful programs we need.
#
SENDMAIL?=		/usr/sbin/sendmail
MAKEMAP?=		/usr/sbin/makemap
M4?=			/usr/bin/m4
KILL?=			/bin/kill

# Set a reasonable default
.MAIN:	all

#
# ------------------------------------------------------------------------
#
# The Makefile picks up the list of files from SENDMAIL_MAP_SRC and
# stores the matching .db filenames in SENDMAIL_MAP_OBJ if the file
# exists in the current directory.
#
SENDMAIL_MAP_SRC+=	mailertable domaintable bitdomain uucpdomain \
			genericstable virtusertable access userdb
SENDMAIL_MAP_OBJ=

.for _f in ${SENDMAIL_MAP_SRC}
.if exists(${_f})
SENDMAIL_MAP_OBJ+=	${_f}.db
.endif
.endfor

#
# The makemap command is used to generate a hashed map from the textfile.
#
.for _f in ${SENDMAIL_MAP_SRC}
.if (exists(${_f}.sample) && !exists(${_f}))
${_f}:		${_f}.sample
	sed -e 's/^/#/' < ${.OODATE} > ${.TARGET}
.endif

${_f}.db:	${_f}
	${MAKEMAP} hash ${.TARGET} < ${.OODATE}
.endfor

#
# The .cf file needs to be recreated if the templates were modified.
#
M4FILES!=	find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print

#
# M4(1) is used to generate the .cf file from the .mc file.
#
.SUFFIXES:	.cf .mc

.mc.cf:		${M4FILES}
	${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_CF_DIR}/m4/cf.m4 \
		${@@:R}.mc > ${.TARGET}

${SENDMAIL_MC_CF}:	${M4FILES}

#
# Aliases are handled separately since they normally reside in /etc
# and can be rebuild without the help of makemap.
#
${SENDMAIL_ALIASES}.db:	${SENDMAIL_ALIASES}
	${SENDMAIL} -bi

#
# ------------------------------------------------------------------------
#
d3 2
a4 1
all:		cf maps aliases
d6 2
a7 1
clean:
d9 2
a10 1
depend:
d12 2
a13 1
cf:		${SENDMAIL_MC_CF}
d15 2
a16 1
maps:		${SENDMAIL_MAP_OBJ}
d18 3
a20 1
aliases:	${SENDMAIL_ALIASES}.db
d22 3
a24 2
install:	${SENDMAIL_MC_CF}
	${INSTALL} -c -m ${SHAREMODE} ${SENDMAIL_MC_CF} /etc/mail/sendmail.cf
d26 3
a28 7
start:
	(. /etc/defaults/rc.conf; \
	   if [ "$${sendmail_enable}" = "YES" -a -r /etc/mail/sendmail.cf ];\
	   then \
	     ${SENDMAIL} $${sendmail_flags}; \
	   fi \
	)
d30 2
a31 5
stop:
	${KILL} -TERM `head -1 ${SENDMAIL_PIDFILE}`

restart:
	${KILL} -HUP `head -1 ${SENDMAIL_PIDFILE}`
@


1.9.2.3
log
@MFC: Fix dependencies and use a better variable name

     Revision  Changes    Path
     1.12      +5 -7      src/etc/mail/Makefile
@
text
@d2 1
a2 1
 # $FreeBSD: src/etc/mail/Makefile,v 1.9.2.2 2001/02/27 21:34:07 gshapiro Exp $
d41 1
a41 1
INSTALL_CF=		${SENDMAIL_MC:R}.cf
d115 2
d134 1
a134 1
cf:		${INSTALL_CF}
d140 2
a141 2
install:	${INSTALL_CF}
	${INSTALL} -c -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
@


1.9.2.4
log
@MFC: Read information from local rc.conf file(s) to get proper settings for
     'make start'.

     Revision  Changes    Path
     1.13      +2 -2      src/etc/mail/Makefile

Quick MFC requested by: jkh
Approved by:	jkh
@
text
@d2 1
a2 1
 # $FreeBSD: src/etc/mail/Makefile,v 1.9.2.3 2001/03/06 01:49:56 gshapiro Exp $
d142 1
a142 1
	(. /etc/defaults/rc.conf; source_rc_confs; \
@


1.9.2.5
log
@MFC: The userdb database is different from the rest of the databases.  It
     *must* be a btree.

     Revision  Changes    Path
     1.14      +7 -3      src/etc/mail/Makefile
@
text
@d2 1
a2 1
 # $FreeBSD: src/etc/mail/Makefile,v 1.9.2.4 2001/03/14 03:22:59 gshapiro Exp $
d79 1
a79 1
			genericstable virtusertable access
d82 1
a82 1
.for _f in ${SENDMAIL_MAP_SRC} userdb
a99 4

userdb.db:	userdb
	${MAKEMAP} btree ${.TARGET} < ${.OODATE}

@


1.9.2.6
log
@MFC:   With the recent change to ip6fw, it is safe to return to using ${fw6cmd}
       which may include the -q flag.

       Revision  Changes    Path
       1.4       +2 -3      src/etc/rc.firewall6
@
text
@d2 1
a2 1
 # $FreeBSD: src/etc/mail/Makefile,v 1.9.2.5 2001/04/02 17:14:42 gshapiro Exp $
d76 1
a76 2
# exists in the current directory.  SENDMAIL_MAP_TYPE is the database
# type to use when calling makemap.
a80 1
SENDMAIL_MAP_TYPE?=	hash
d98 1
a98 1
	${MAKEMAP} ${SENDMAIL_MAP_TYPE} ${.TARGET} < ${.OODATE}
@


1.9.2.7
log
@Force commit: Last commit message was incorrect.  The correct commit
message is:

MFC: Allow users to override the default map type used for building maps.

     Revision  Changes    Path
     1.15      +5 -3      src/etc/mail/Makefile
@
text
@d2 1
a2 1
 # $FreeBSD: src/etc/mail/Makefile,v 1.9.2.6 2001/04/21 05:26:37 gshapiro Exp $
@


1.9.2.8
log
@MFC: Allow users to add local Makefile targets.

     Revision  Changes    Path
     1.17      +6 -1      src/etc/mail/Makefile
@
text
@d2 1
a2 1
 # $FreeBSD: src/etc/mail/Makefile,v 1.9.2.7 2001/04/21 05:27:55 gshapiro Exp $
a159 5

# User defined targets
.if exists(Makefile.local)
.include "Makefile.local"
.endif
@


1.9.2.9
log
@MFC: Make the default .mc file be `hostname`.mc if SENDMAIL_MC make.conf knob
     is not set.  This allows admins to create a per-machine configuration file
     while leaving the freebsd.mc template pristine.  Provide a rule to create
     `hostname`.mc from freebsd.mc if it doesn't exist.

     Revision  Changes    Path
     1.16      +12 -3     src/etc/mail/Makefile
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.8 2001/05/24 20:50:03 gshapiro Exp $
d28 1
a28 1
# This makefile uses `<HOSTNAME>.mc' as the default .mc file.  This can
a32 2
# If '<HOSTNAME>.mc' does not exist, it is created using 'freebsd.mc'
# as a template.
d40 1
a40 8
.ifndef SENDMAIL_MC
SENDMAIL_MC!=           hostname
SENDMAIL_MC:=           ${SENDMAIL_MC}.mc

${SENDMAIL_MC}: freebsd.mc
	cp freebsd.mc ${SENDMAIL_MC}
.endif

@


1.9.2.10
log
@MFC: New make knob, SENDMAIL_M4_FLAGS, modifies the flags passed to m4 when
     building a .cf file from a .mc file.

     Include -D_FFR_TLS_O_T to enable tls policy control since the sendmail
     binary build enables that FFR as well.

     Revision  Changes    Path
     1.166     +7 -1      src/etc/defaults/make.conf
     1.18      +5 -3      src/etc/mail/Makefile
     1.10      +5 -2      src/etc/sendmail/Makefile
     1.23      +4 -1      src/share/man/man5/make.conf.5
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.9 2001/05/24 20:51:06 gshapiro Exp $
a41 2
SENDMAIL_M4_FLAGS+=	-D_FFR_TLS_O_T

d127 2
a128 2
	${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \
		${SENDMAIL_CF_DIR}/m4/cf.m4 ${@@:R}.mc > ${.TARGET}
@


1.9.2.11
log
@MFC: If the user sets SENDMAIL_MC to /etc/mail/sendmail.mc, install is told to
     install /etc/mail/sendmail.cf to /etc/mail/sendmail.cf and exits with an
     error.

     Catch this in the Makefile and don't call install if the source and target
     are the same file.

     Revision  Changes    Path
     1.19      +3 -1      src/etc/mail/Makefile
     1.11      +10 -4     src/etc/sendmail/Makefile
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.10 2001/07/31 00:16:47 gshapiro Exp $
a155 1
.if ${INSTALL_CF} != /etc/mail/sendmail.cf
a156 1
.endif
@


1.9.2.12
log
@MFC: Revert change to always include _FFR_TLS_O_T as it requires
     FEATURE(access_db)

     Revision  Changes    Path
     1.20      +1 -3      src/etc/mail/Makefile
     1.12      +1 -3      src/etc/sendmail/Makefile
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.11 2001/07/31 00:18:10 gshapiro Exp $
d41 2
@


1.9.2.13
log
@MFC: Do not clobber users hostname.mc file if freebsd.mc changes (likely
     after an installworld).

     Revision  Changes    Path
     1.21      +2 -2      src/etc/mail/Makefile
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.12 2001/08/01 03:38:40 gshapiro Exp $
d46 1
a46 1
${SENDMAIL_MC}:
@


1.9.2.14
log
@MFC: Handle the sendmail_outbound_enable knob in the start target.

     Revision  Changes    Path
     1.22      +13 -5     src/etc/mail/Makefile
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.13 2001/10/10 15:49:36 gshapiro Exp $
d160 4
a163 12
	case "$${sendmail_enable}" in \
	[Yy][Ee][Ss]) \
		/usr/sbin/sendmail $${sendmail_flags} \
		;; \
	*) \
		case "$${sendmail_outbound_enable}" in \
		[Yy][Ee][Ss]) \
			/usr/sbin/sendmail $${sendmail_outbound_flags} \
			;; \
		esac \
		;; \
	esac \
@


1.9.2.15
log
@MFC: Don't build a submit.cf file if SENDMAIL_SET_USER_ID is set

     Revision  Changes    Path
     1.23      +9 -1      src/etc/mail/Makefile
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.14 2001/11/23 17:14:57 gshapiro Exp $
a147 8

submit.cf:	submit.mc
.ifdef SENDMAIL_SET_USER_ID
	@@echo ">>> ERROR: You should not create a submit.cf file if you are using a"
	@@echo "           set-user-ID sendmail binary (SENDMAIL_SET_USER_ID is set"
	@@echo "           in make.conf)."
	@@false
.endif
@


1.9.2.16
log
@MFC: Update the /etc/mail/Makefile "start" target code to match the new
     startup logic and added a new set of targets for controlling the MSP
     queue runner (start-mspq, stop-mspq, and restart-mspq).

     Revision  Changes    Path
     1.24      +52 -5     src/etc/mail/Makefile
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.15 2002/03/25 21:38:48 gshapiro Exp $
a13 2
#
# For the MTA daemon:
a18 6
# For the MSP queue running daemon:
# start-mspq   - Start the sendmail MSP queue running daemon with the
#                flags defined in /etc/defaults/rc.conf or /etc/rc.conf
# stop-mspq    - Stop the sendmail MSP queue running daemon
# restart-mspq - Restart the sendmail MSP queue running daemon
#
a67 1
SENDMAIL_MSPQ_PIDFILE?=	/var/spool/clientmqueue/sm-client.pid
d167 1
a167 1
	@@(. /etc/defaults/rc.conf; source_rc_confs; \
a168 3
	[Nn][Oo][Nn][Ee]) \
		echo "ERROR: sendmail_enable is set to $${sendmail_enable}" \
		;; \
d170 1
a170 2
		${SENDMAIL} $${sendmail_flags}; \
		echo "${SENDMAIL} $${sendmail_flags}" \
d173 1
a173 1
		case "$${sendmail_submit_enable}" in \
d175 1
a175 10
			${SENDMAIL} $${sendmail_submit_flags}; \
			echo "${SENDMAIL} $${sendmail_submit_flags}" \
			;; \
		*) \
			case "$${sendmail_outbound_enable}" in \
			[Yy][Ee][Ss]) \
				${SENDMAIL} $${sendmail_outbound_flags}; \
				echo "${SENDMAIL} $${sendmail_outbound_flags}" \
				;; \
			esac \
a186 25

start-mspq:
	@@(. /etc/defaults/rc.conf; source_rc_confs; \
	case "$${sendmail_enable}" in \
	[Nn][Oo][Nn][Ee]) \
		echo "ERROR: sendmail_enable is set to $${sendmail_enable}" \
		;; \
	*) \
		if [ -r /etc/mail/submit.cf ]; then \
			case "$${sendmail_msp_queue_enable}" in \
			[Yy][Ee][Ss]) \
				${SENDMAIL} $${sendmail_msp_queue_flags}; \
				echo "${SENDMAIL} $${sendmail_msp_queue_flags}" \
				;; \
			esac \
		fi \
		;; \
	esac \
	)

stop-mspq:
	${KILL} -TERM `head -1 ${SENDMAIL_MSPQ_PIDFILE}`

restart-mspq:
	${KILL} -HUP `head -1 ${SENDMAIL_MSPQ_PIDFILE}`
@


1.9.2.17
log
@MFC: Quoting Peter Wemm, "At great personal risk, touch the sendmail startup
     again."

     As an alternative to sendmail_enable=NONE, solve the boot time problem
     for non-sendmail users completely by moving all of the sendmail startup
     code from /etc/rc to /etc/rc.sendmail.  The source for that script will
     be kept in src/etc/sendmail/rc.sendmail so make.conf's NO_SENDMAIL will
     prevent it from being installed.  A new rc.conf variable,
     mta_start_script specifies the script to run to start the user's
     preferred MTA.  For backward compatibility, it will default to
     /etc/rc.sendmail.  The specified script is called out of /etc/rc after
     checking to make sure it exists.  A new rc.sendmail.8 man page has also
     been added which now houses the sendmail_* variable descriptions
     formerly in rc.conf.5.

     Use /etc/rc.sendmail in /etc/mail/Makefile to reduce code duplication.

     Reviewed by:    -current, -stable, obrien, peter, ru
     MFC after:      1 week

     Revision  Changes    Path
     1.142     +19 -10    src/etc/defaults/rc.conf
     1.27      +38 -70    src/etc/mail/Makefile
     1.308     +5 -39     src/etc/rc
     1.16      +3 -1      src/etc/sendmail/Makefile
     1.1       +193 -0    src/etc/sendmail/rc.sendmail (new)
     1.160     +13 -105   src/share/man/man5/rc.conf.5
     1.26      +4 -0      src/share/man/man8/Makefile
     1.1       +241 -0    src/share/man/man8/rc.sendmail.8 (new)
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.16 2002/04/05 01:59:02 gshapiro Exp $
d15 5
a19 14
# For acting on both the MTA daemon and MSP queue running daemon:
# start        - Start both the sendmail MTA daemon and MSP queue running
#                daemon with the flags defined in /etc/defaults/rc.conf or
#                /etc/rc.conf
# stop         - Stop both the sendmail MTA daemon and MSP queue running
#                daemon
# restart      - Restart both the sendmail MTA daemon and MSP queue running
#                daemon
#
# For acting on just the MTA daemon:
# start-mta    - Start the sendmail MTA daemon with the flags defined in
#                /etc/defaults/rc.conf or /etc/rc.conf
# stop-mta     - Stop the sendmail MTA daemon
# restart-mta  - Restart the sendmail MTA daemon
d21 1
a21 1
# For acting on just the MSP queue running daemon:
d73 1
a73 1
# The sendmail startup script
d75 2
a76 1
SENDMAIL_START_SCRIPT?=	/etc/rc.sendmail
d84 1
d175 59
a233 20
start start-mta start-mspq:
	@@if [ -r ${SENDMAIL_START_SCRIPT} ]; then \
		echo -n 'Starting:'; \
		sh ${SENDMAIL_START_SCRIPT} $@@; \
		echo '.'; \
	fi

stop stop-mta stop-mspq:
	@@if [ -r ${SENDMAIL_START_SCRIPT} ]; then \
		echo -n 'Stopping:'; \
		sh ${SENDMAIL_START_SCRIPT} $@@; \
		echo '.'; \
	fi

restart restart-mta restart-mspq:
	@@if [ -r ${SENDMAIL_START_SCRIPT} ]; then \
		echo -n 'Restarting:'; \
		sh ${SENDMAIL_START_SCRIPT} $@@; \
		echo '.'; \
	fi
@


1.9.2.18
log
@MFC: Provide a new make.conf knob, SENDMAIL_SUBMIT_MC to allow users to pick
     the .mc file used for /etc/mail/submit.cf.  By default,
     /etc/mail/freebsd.submit.mc is installed and used.

     1.28      +34 -12    src/etc/mail/Makefile
     1.14      +7 -5      src/etc/mail/README
     1.17      +37 -7     src/etc/sendmail/Makefile
     1.185     +7 -0      src/share/examples/etc/make.conf
     1.42      +10 -0     src/share/man/man5/make.conf.5
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.17 2002/04/11 23:25:53 gshapiro Exp $
d44 3
a46 2
# This Makefile uses `<HOSTNAME>.mc' as the default MTA .mc file.  This
# can be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.:
a51 6
#
# It also uses 'freebsd.submit.mc' as the default mail submission .mc file.
# This can be changed by defining SENDMAIL_SUBMIT_MC in /etc/make.conf,
# e.g.:
#
#		   SENDMAIL_SUBMIT_MC=/etc/mail/mysubmit.mc
a66 2
SENDMAIL_SUBMIT_MC?=	freebsd.submit.mc

a68 4
.ifndef SENDMAIL_SET_USER_ID
INSTALL_SUBMIT_CF=	${SENDMAIL_SUBMIT_MC:R}.cf
.endif

d163 1
a163 1
cf:		${INSTALL_CF} ${INSTALL_SUBMIT_CF}
d165 1
a165 13
.ifdef SENDMAIL_SET_USER_ID
install: install-cf
.else
install: install-cf install-submit-cf
.endif

install-cf:	${INSTALL_CF}
.if ${INSTALL_CF} != /etc/mail/sendmail.cf
	${INSTALL} -c -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
.endif


install-submit-cf:	${INSTALL_SUBMIT_CF}
a170 4
.else
.if ${INSTALL_SUBMIT_CF} != /etc/mail/submit.cf
	${INSTALL} -c -m ${SHAREMODE} ${INSTALL_SUBMIT_CF} /etc/mail/submit.cf
.endif
d172 2
d177 4
a180 1
maps:		${SENDMAIL_MAP_OBJ}
@


1.9.2.19
log
@MFC: Add a new make.conf knob, SENDMAIL_MAP_PERMS, which specifies the
     permissions to use for alias and map database files built by
     /etc/mail/Makefile.  The default is 0640 to assist users in avoiding
     a file locking local denial of service.

     Revision  Changes    Path
     1.30      +7 -1      src/etc/mail/Makefile
     1.189     +5 -0      src/share/examples/etc/make.conf
     1.47      +5 -0      src/share/man/man5/make.conf.5

Approved by:	re (bmah)
@
text
@d2 1
a2 1
# $FreeBSD: src/etc/mail/Makefile,v 1.9.2.18 2002/04/20 18:50:58 gshapiro Exp $
a103 3
# Permissions for generated maps
SENDMAIL_MAP_PERMS?=	0640

a136 1
	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}
a140 1
	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}
a162 1
	chmod ${SENDMAIL_MAP_PERMS} ${.TARGET}
@


1.9.2.20
log
@MFC: s/${INSTALL} -c/${INSTALL} ${COPY}/
@
text
@d2 1
a2 1
# $FreeBSD$
d190 1
a190 1
	${INSTALL} ${COPY} -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
d202 1
a202 1
	${INSTALL} ${COPY} -m ${SHAREMODE} ${INSTALL_SUBMIT_CF} /etc/mail/submit.cf
@


1.9.2.21
log
@MFC: 1.29: Suck in the SHAREMODE definition (sys.mk no longer
includes bsd.own.mk).

Submitted by:	Morten Rodal <morten@@rodal.no>
@
text
@a234 3

# For the definition of $SHAREMODE
.include <bsd.own.mk>
@


1.9.2.22
log
@MFC: Drop support for COPY.
@
text
@d190 1
a190 1
	${INSTALL} -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
d202 1
a202 1
	${INSTALL} -m ${SHAREMODE} ${INSTALL_SUBMIT_CF} /etc/mail/submit.cf
@


1.9.2.23
log
@MFC: Allow multiple aliases files to be rebuilt

     Revision  Changes    Path
     1.33      +5 -3      src/etc/mail/Makefile
@
text
@d166 2
a167 3
.for _f in ${SENDMAIL_ALIASES}
${_f}.db:	${_f}
	${SENDMAIL} -bi -OAliasFile=${.ALLSRC}
a168 1
.endfor
d206 1
a206 1
aliases:	${SENDMAIL_ALIASES:%=%.db}
@


1.9.2.24
log
@MFC: Style fixes: tab after a dependency operator should be a single space
                  second level indent of tab should be four spaces

     Revision  Changes    Path
     1.34      +16 -16    src/etc/mail/Makefile
     1.22      +13 -13    src/etc/sendmail/Makefile
@
text
@d47 1
a47 1
#	SENDMAIL_MC=/etc/mail/myconfig.mc
d56 1
a56 1
#	SENDMAIL_SUBMIT_MC=/etc/mail/mysubmit.mc
d108 1
a108 1
.MAIN: all
d134 1
a134 1
${_f}: ${_f}.sample
d138 1
a138 1
${_f}.db: ${_f}
d143 1
a143 1
userdb.db: userdb
d156 1
a156 1
.SUFFIXES: .cf .mc
d158 1
a158 1
.mc.cf: ${M4FILES}
d160 1
a160 1
	    ${SENDMAIL_CF_DIR}/m4/cf.m4 ${@@:R}.mc > ${.TARGET}
d167 1
a167 1
${_f}.db: ${_f}
d176 1
a176 1
all: cf maps aliases
d182 1
a182 1
cf: ${INSTALL_CF} ${INSTALL_SUBMIT_CF}
d190 1
a190 1
install-cf: ${INSTALL_CF}
d196 1
a196 1
install-submit-cf: ${INSTALL_SUBMIT_CF}
d208 1
a208 1
aliases: ${SENDMAIL_ALIASES:%=%.db}
d210 1
a210 1
maps: ${SENDMAIL_MAP_OBJ}
@


1.9.2.25
log
@MFC: Bow to popular demand and default SENDMAIL_SUBMIT_MC to
     `hostname`.submit.mc which is templated from freebsd.submit.mc if the
     default file does not exist.  This makes the building of the submit.cf
     behavior identical to that of the the sendmail.cf.

     Revision  Changes    Path
     1.35      +13 -4     src/etc/mail/Makefile
@
text
@d52 3
a54 3
# It also uses '<HOSTNAME>.submit.mc' as the default mail submission .mc
# file.  This can be changed by defining SENDMAIL_SUBMIT_MC in
# /etc/make.conf, e.g.:
a56 3
#
# If '<HOSTNAME>.submit.mc' does not exist, it is created using
# 'freebsd.submit.mc' as a template.
d72 1
a72 7
.ifndef SENDMAIL_SUBMIT_MC
SENDMAIL_SUBMIT_MC!=	hostname
SENDMAIL_SUBMIT_MC:=	${SENDMAIL_SUBMIT_MC}.submit.mc 

${SENDMAIL_SUBMIT_MC}:
	cp freebsd.submit.mc ${SENDMAIL_SUBMIT_MC}
.endif
@


1.9.2.26
log
@MFC: Remove trailing space.

     Revision  Changes    Path
     1.36      +1 -1      src/etc/mail/Makefile
@
text
@d77 1
a77 1
SENDMAIL_SUBMIT_MC:=	${SENDMAIL_SUBMIT_MC}.submit.mc
@


1.9.2.27
log
@Switch importer
@
text
@d2 1
a2 1
# $FreeBSD: stable/4/etc/mail/Makefile 130158 2004-06-06 17:29:48Z gshapiro $
@


1.8
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
d3 2
a4 2
install:
	/usr/sbin/makemap hash /etc/mail/access < /etc/mail/access.txt
d6 26
a31 1
all: install
@


1.7
log
@        update spam countermeasures
        add examples of using an access_db
        update .mc files to match recommendations on
                http://www.sendmail.org/m4/anti-spam.html

	(grrr.....should have been one commit
	 did the last commit from a subdirectory)
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.6 1999/01/31 15:21:15 jmb Exp $
@


1.6
log
@	Do not try to fetch anti-spam files from gulf.net.
	They nolonger provide a list of spam domains and
	spam ip address ranges.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.5 1998/09/13 23:14:20 brian Exp $
d4 1
a4 8
	/usr/sbin/makemap hash /etc/mail/spamsites < /etc/mail/block_domains.txt
.if exists(/etc/mail/spamsites.local)
	/usr/sbin/makemap -o hash /etc/mail/spamsites < /etc/mail/spamsites.local
.endif
	/usr/sbin/makemap hash /etc/mail/denyip < /etc/mail/block_ips.txt
.if exists(/etc/mail/denyip.local)
	/usr/sbin/makemap -o hash /etc/mail/denyip < /etc/mail/denyip.local
.endif
@


1.5
log
@Gasp !  Bitten by the wonders of diff/patch !  Now's your chance to
say ``I told you so'' Andrey !
Move the Id keyword to the right Makefile
@
text
@d1 1
a1 33
#	$Id: Makefile,v 1.171 1998/09/13 23:05:46 brian Exp $

default:
.if exists(/etc/mail/ips.txt)
	mv -f /etc/mail/ips.txt /etc/mail/ips.txt.0
.endif
	fetch ftp://ftp.gulf.net/pub/docs/ips.txt
	sort ips.txt > block_ips.txt
	touch allowsorted_ips.txt
.if exists(/etc/mail/allow_ips.txt)
	sort allow_ips.txt > allowsorted_ips.txt
.endif
	comm -23 block_ips.txt allowsorted_ips.txt | \
	        cut -d ' ' -f 1 | \
		sed -e 's/$$/ 	#blocked. contact postmaster/' > \
		/etc/mail/block_ips.new
	rm allowsorted_ips.txt
	mv /etc/mail/block_ips.new /etc/mail/block_ips.txt
.if exists(/etc/mail/domains.txt)
	mv -f /etc/mail/domains.txt /etc/mail/domains.txt.0
.endif
	fetch ftp://ftp.gulf.net/pub/docs/domains.txt
	sort domains.txt > block_domains.txt
	touch allowsorted_domains.txt
.if exists(/etc/mail/allow_domains.txt)
	sort allow_domains.txt > allowsorted_domains.txt
.endif
	comm -23 block_domains.txt allowsorted_domains.txt | \
		cut -d ' ' -f 1 | \
		sed -e 's/$$/ 	#blocked. contact postmaster/' > \
		/etc/mail/block_domains.new
	rm allowsorted_domains.txt
	mv /etc/mail/block_domains.new /etc/mail/block_domains.txt
d13 1
a13 1
all: default install
@


1.5.2.1
log
@	gulf.net no longer provides lists of spam domains and spam
	ip address ranges via anon ftp. therefore we no longer try
	to get these from gulf.net.  this change was committed to
	HEAD 1/31/1999 and should have been brought to -stable at
	that time.
@
text
@d1 33
a33 1
#	$Id: Makefile,v 1.6 1999/01/31 15:21:15 jmb Exp $
d45 1
a45 1
all: install
@


1.5.2.2
log
@	update spam countermeasures
	add examples of using an access_db
	update .mc files to match recommendations on
		http://www.sendmail.org/m4/anti-spam.html
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.5.2.1 1999/02/21 14:32:47 jmb Exp $
d4 8
a11 1
	/usr/sbin/makemap hash /etc/mail/access < /etc/mail/access
@


1.5.2.3
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.4
log
@Enter absolute path for the makemap command (which lives under /usr/sbin)
This makes it possible to run make from cron, i.e.:
	root's crontab:
	( cd /etc/mail; make all install )
without the error:
	makemap hash /etc/mail/spamsites < /etc/mail/block_domains.txt
	makemap: not found
	*** Error code 127
If this solution is widely accepted, I'd like to merge it into -STABLE
@
text
@d1 2
@


1.3
log
@	added two new files: allowed_domains.txt and allowed_ips.txt.
	domains/ips listed in these files are *NOT* filtered,
	even if listed in domains.txt or ips.txt.

	someone added netcom.com to the domains.txt file,
	resulting in all mail from netcom.com being blocked.
@
text
@d34 1
a34 1
	makemap hash /etc/mail/spamsites < /etc/mail/block_domains.txt
d36 1
a36 1
	makemap -o hash /etc/mail/spamsites < /etc/mail/spamsites.local
d38 1
a38 1
	makemap hash /etc/mail/denyip < /etc/mail/block_ips.txt
d40 1
a40 1
	makemap -o hash /etc/mail/denyip < /etc/mail/denyip.local
@


1.2
log
@        improve anti-spam rulesets: check_relay, check_mail, check_rcpt.
        break each ruleset into identified sections. (called groups).
        note which groups can be reordered.
        each group accepts and returns the same strings,
                as much as possible.
        reactivate Paul Vixie's RBL (in check_mail)
        add rules to limit mail relaying to a list of hosts and domains
                in the R class (check_rcpt, not active on hub.freebsd.org)
Submitted by:	 jmb
@
text
@d6 7
a12 1
	cat /etc/mail/ips.txt | cut -d ' ' -f 1 | \
d14 3
a16 2
		/etc/mail/ips.new
	mv /etc/mail/ips.new /etc/mail/ips.txt
d21 7
a27 1
	cat /etc/mail/domains.txt | cut -d ' ' -f 1 | \
d29 3
a31 2
		/etc/mail/domains.new
	mv /etc/mail/domains.new /etc/mail/domains.txt
d34 1
a34 1
	makemap hash /etc/mail/spamsites < /etc/mail/domains.txt
d38 1
a38 1
	makemap hash /etc/mail/denyip < /etc/mail/ips.txt
a40 3
.endif
.if exists(/etc/mail/fakenames)
	makemap hash /etc/mail/fakenames < /etc/mail/fakenames
@


1.1
log
@anti-spam filter used by the FreeBSD mailing lists.
@
text
@d28 3
@


1.1.2.1
log
@- The Makefile assumed it lived in /etc/mail.  Fix it so that it works in
  the source tree.
@
text
@d6 1
a6 1
	cat ips.txt | cut -d ' ' -f 1 | \
d8 2
a9 1
		/etc/mail/ips.txt
d14 1
a14 1
	cat domains.txt | cut -d ' ' -f 1 | \
d16 2
a17 1
		/etc/mail/domains.txt
@


1.1.2.2
log
@- Argh, sorry about that.  I assumed the Makefile was supposed to be run out
  of the source tree.
@
text
@d6 1
a6 1
	cat /etc/mail/ips.txt | cut -d ' ' -f 1 | \
d8 1
a8 2
		/etc/mail/ips.new
	mv /etc/mail/ips.new /etc/mail/ips.txt
d13 1
a13 1
	cat /etc/mail/domains.txt | cut -d ' ' -f 1 | \
d15 1
a15 2
		/etc/mail/domains.new
	mv /etc/mail/domains.new /etc/mail/domains.txt
@


1.1.2.3
log
@MFC: selected improvements for etc files *not* including periodic changes,
     security tweaks or other kerberbos related stuff.  I expect that
     stuff to occur as a side-effect of what others will be doing in etc,
     if at all.
@
text
@a27 3
.if exists(/etc/mail/fakenames)
	makemap hash /etc/mail/fakenames < /etc/mail/fakenames
.endif
@


1.1.2.4
log
@        added two new files: allowed_domains.txt and allowed_ips.txt.
        domains/ips listed in these files are *NOT* filtered,
        even if listed in domains.txt or ips.txt.

        someone added netcom.com to the domains.txt file,
        resulting in all mail from netcom.com being blocked.
@
text
@d6 1
a6 7
	sort ips.txt > block_ips.txt
	touch allowsorted_ips.txt
.if exists(/etc/mail/allow_ips.txt)
	sort allow_ips.txt > allowsorted_ips.txt
.endif
	comm -23 block_ips.txt allowsorted_ips.txt | \
	        cut -d ' ' -f 1 | \
d8 2
a9 3
		/etc/mail/block_ips.new
	rm allowsorted_ips.txt
	mv /etc/mail/block_ips.new /etc/mail/block_ips.txt
d14 1
a14 7
	sort domains.txt > block_domains.txt
	touch allowsorted_domains.txt
.if exists(/etc/mail/allow_domains.txt)
	sort allow_domains.txt > allowsorted_domains.txt
.endif
	comm -23 block_domains.txt allowsorted_domains.txt | \
		cut -d ' ' -f 1 | \
d16 2
a17 3
		/etc/mail/block_domains.new
	rm allowsorted_domains.txt
	mv /etc/mail/block_domains.new /etc/mail/block_domains.txt
d20 1
a20 1
	makemap hash /etc/mail/spamsites < /etc/mail/block_domains.txt
d24 1
a24 1
	makemap hash /etc/mail/denyip < /etc/mail/block_ips.txt
d27 3
@


1.1.2.5
log
@MFC: use full pathname of makemap command, so it's possible to use
     "make all install" from cron ...
@
text
@d34 1
a34 1
	/usr/sbin/makemap hash /etc/mail/spamsites < /etc/mail/block_domains.txt
d36 1
a36 1
	/usr/sbin/makemap -o hash /etc/mail/spamsites < /etc/mail/spamsites.local
d38 1
a38 1
	/usr/sbin/makemap hash /etc/mail/denyip < /etc/mail/block_ips.txt
d40 1
a40 1
	/usr/sbin/makemap -o hash /etc/mail/denyip < /etc/mail/denyip.local
@


1.1.2.6
log
@Add Id keyword
@
text
@a0 2
#	$Id:$

@


1.1.2.7
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
@

