190792Sgshapirodivert(-1)
290792Sgshapiro#
3261363Sgshapiro# Copyright (c) 2000-2002, 2004 Proofpoint, Inc. and its suppliers.
490792Sgshapiro#	All rights reserved.
590792Sgshapiro#
690792Sgshapiro# By using this file, you agree to the terms and conditions set
790792Sgshapiro# forth in the LICENSE file which can be found at the top level of
890792Sgshapiro# the sendmail distribution.
990792Sgshapiro#
1090792Sgshapiro#
1190792Sgshapiro
1290792Sgshapirodivert(0)dnl
13266692SgshapiroVERSIONID(`$Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $')
1490792Sgshapirodivert(-1)
1594334Sgshapiroundefine(`ALIAS_FILE')
1690792Sgshapirodefine(`confDELIVERY_MODE', `i')
1790792Sgshapirodefine(`confUSE_MSP', `True')
1890792Sgshapirodefine(`confFORWARD_PATH', `')
1990792Sgshapirodefine(`confPRIVACY_FLAGS', `goaway,noetrn,restrictqrun')
2090792Sgshapirodefine(`confDONT_PROBE_INTERFACES', `True')
2190792Sgshapirodnl ---------------------------------------------
2290792Sgshapirodnl run as this user (even if called by root)
2390792Sgshapiroifdef(`confRUN_AS_USER',,`define(`confRUN_AS_USER', `smmsp')')
24132943Sgshapiroifdef(`confTRUSTED_USER',,`define(`confTRUSTED_USER',
25132943Sgshapiro`ifelse(index(confRUN_AS_USER,`:'), -1, `confRUN_AS_USER',
26132943Sgshapiro`substr(confRUN_AS_USER,0,index(confRUN_AS_USER,`:'))')')')
2790792Sgshapirodnl ---------------------------------------------
2890792Sgshapirodnl This queue directory must have the same group
2990792Sgshapirodnl as sendmail and it must be group-writable.
3090792Sgshapirodnl notice: do not test for QUEUE_DIR, it is set in some ostype/*.m4 files
3190792Sgshapiroifdef(`MSP_QUEUE_DIR',
3290792Sgshapiro`define(`QUEUE_DIR', `MSP_QUEUE_DIR')',
3390792Sgshapiro`define(`QUEUE_DIR', `/var/spool/clientmqueue')')
3494334Sgshapirodefine(`_MTA_HOST_', ifelse(defn(`_ARG_'), `', `[localhost]', `_ARG_'))
3590792Sgshapirodefine(`_MSP_FQHN_',`dnl used to qualify addresses
3690792Sgshapiroifdef(`MASQUERADE_NAME', ifdef(`_MASQUERADE_ENVELOPE_', `$M', `$j'), `$j')')
3794334Sgshapiroifelse(_ARG2_, `MSA', `define(`RELAY_MAILER_ARGS', `TCP $h 587')')
3890792Sgshapirodnl ---------------------------------------------
3990792Sgshapiroifdef(`confPID_FILE', `dnl',
4090792Sgshapiro`define(`confPID_FILE', QUEUE_DIR`/sm-client.pid')')
4190792Sgshapirodefine(`confQUEUE_FILE_MODE', `0660')dnl
4290792Sgshapiroifdef(`STATUS_FILE',
4390792Sgshapiro`define(`_F_',
4490792Sgshapiro`define(`_b_', index(STATUS_FILE, `sendmail.st'))ifelse(_b_, `-1', `STATUS_FILE', `substr(STATUS_FILE, 0, _b_)sm-client.st')')
4590792Sgshapirodefine(`STATUS_FILE', _F_)
4690792Sgshapiroundefine(`_b_') undefine(`_F_')',
4790792Sgshapiro`define(`STATUS_FILE', QUEUE_DIR`/sm-client.st')')
4890792SgshapiroFEATURE(`no_default_msa')dnl
4990792Sgshapiroifelse(defn(`_DPO_'), `',
5090792Sgshapiro`DAEMON_OPTIONS(`Name=NoMTA, Addr=127.0.0.1, M=E')dnl')
5190792Sgshapirodefine(`_DEF_LOCAL_MAILER_FLAGS', `')dnl
5290792Sgshapirodefine(`_DEF_LOCAL_SHELL_FLAGS', `')dnl
5390792Sgshapirodefine(`LOCAL_MAILER_PATH', `[IPC]')dnl
5490792Sgshapirodefine(`LOCAL_MAILER_FLAGS', `lmDFMuXkw5')dnl
5590792Sgshapirodefine(`LOCAL_MAILER_ARGS', `TCP $h')dnl
5690792Sgshapirodefine(`LOCAL_MAILER_DSN_DIAGNOSTIC_CODE', `SMTP')dnl
5790792Sgshapirodefine(`LOCAL_SHELL_PATH', `[IPC]')dnl
5890792Sgshapirodefine(`LOCAL_SHELL_FLAGS', `lmDFMuXk5')dnl
5990792Sgshapirodefine(`LOCAL_SHELL_ARGS', `TCP $h')dnl
6094334SgshapiroMODIFY_MAILER_FLAGS(`SMTP', `+k5')dnl
6194334SgshapiroMODIFY_MAILER_FLAGS(`ESMTP', `+k5')dnl
6294334SgshapiroMODIFY_MAILER_FLAGS(`DSMTP', `+k5')dnl
6394334SgshapiroMODIFY_MAILER_FLAGS(`SMTP8', `+k5')dnl
6494334SgshapiroMODIFY_MAILER_FLAGS(`RELAY', `+k')dnl
6590792SgshapiroMAILER(`local')dnl
6690792SgshapiroMAILER(`smtp')dnl
6790792Sgshapiro
6890792SgshapiroLOCAL_CONFIG
6990792SgshapiroD{MTAHost}_MTA_HOST_
7090792Sgshapiro
7190792SgshapiroLOCAL_RULESETS
7290792SgshapiroSLocal_localaddr
7390792SgshapiroR$+			$: $>ParseRecipient $1
7490792SgshapiroR$* < @ $+ > $*		$#relay $@ ${MTAHost} $: $1 < @ $2 > $3
7590792Sgshapiroifdef(`_USE_DECNET_SYNTAX_',
7690792Sgshapiro`# DECnet
7790792SgshapiroR$+ :: $+		$#relay $@ ${MTAHost} $: $1 :: $2', `dnl')
7890792SgshapiroR$*			$#relay $@ ${MTAHost} $: $1 < @ _MSP_FQHN_ >
79