xref: /freebsd/contrib/sendmail/cf/feature/msp.m4 (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
1divert(-1)
2#
3# Copyright (c) 2000-2002, 2004 Proofpoint, Inc. and its suppliers.
4#	All rights reserved.
5#
6# By using this file, you agree to the terms and conditions set
7# forth in the LICENSE file which can be found at the top level of
8# the sendmail distribution.
9#
10#
11
12divert(0)dnl
13VERSIONID(`$Id: msp.m4,v 1.34 2013-11-22 20:51:11 ca Exp $')
14divert(-1)
15undefine(`ALIAS_FILE')
16define(`confDELIVERY_MODE', `i')
17define(`confUSE_MSP', `True')
18define(`confFORWARD_PATH', `')
19define(`confPRIVACY_FLAGS', `goaway,noetrn,restrictqrun')
20define(`confDONT_PROBE_INTERFACES', `True')
21dnl ---------------------------------------------
22dnl run as this user (even if called by root)
23ifdef(`confRUN_AS_USER',,`define(`confRUN_AS_USER', `smmsp')')
24ifdef(`confTRUSTED_USER',,`define(`confTRUSTED_USER',
25`ifelse(index(confRUN_AS_USER,`:'), -1, `confRUN_AS_USER',
26`substr(confRUN_AS_USER,0,index(confRUN_AS_USER,`:'))')')')
27dnl ---------------------------------------------
28dnl This queue directory must have the same group
29dnl as sendmail and it must be group-writable.
30dnl notice: do not test for QUEUE_DIR, it is set in some ostype/*.m4 files
31ifdef(`MSP_QUEUE_DIR',
32`define(`QUEUE_DIR', `MSP_QUEUE_DIR')',
33`define(`QUEUE_DIR', `/var/spool/clientmqueue')')
34define(`_MTA_HOST_', ifelse(defn(`_ARG_'), `', `[localhost]', `_ARG_'))
35define(`_MSP_FQHN_',`dnl used to qualify addresses
36ifdef(`MASQUERADE_NAME', ifdef(`_MASQUERADE_ENVELOPE_', `$M', `$j'), `$j')')
37ifelse(_ARG2_, `MSA', `define(`RELAY_MAILER_ARGS', `TCP $h 587')')
38dnl ---------------------------------------------
39ifdef(`confPID_FILE', `dnl',
40`define(`confPID_FILE', QUEUE_DIR`/sm-client.pid')')
41define(`confQUEUE_FILE_MODE', `0660')dnl
42ifdef(`STATUS_FILE',
43`define(`_F_',
44`define(`_b_', index(STATUS_FILE, `sendmail.st'))ifelse(_b_, `-1', `STATUS_FILE', `substr(STATUS_FILE, 0, _b_)sm-client.st')')
45define(`STATUS_FILE', _F_)
46undefine(`_b_') undefine(`_F_')',
47`define(`STATUS_FILE', QUEUE_DIR`/sm-client.st')')
48FEATURE(`no_default_msa')dnl
49ifelse(defn(`_DPO_'), `',
50`DAEMON_OPTIONS(`Name=NoMTA, Addr=127.0.0.1, M=E')dnl')
51define(`_DEF_LOCAL_MAILER_FLAGS', `')dnl
52define(`_DEF_LOCAL_SHELL_FLAGS', `')dnl
53define(`LOCAL_MAILER_PATH', `[IPC]')dnl
54define(`LOCAL_MAILER_FLAGS', `lmDFMuXkw5')dnl
55define(`LOCAL_MAILER_ARGS', `TCP $h')dnl
56define(`LOCAL_MAILER_DSN_DIAGNOSTIC_CODE', `SMTP')dnl
57define(`LOCAL_SHELL_PATH', `[IPC]')dnl
58define(`LOCAL_SHELL_FLAGS', `lmDFMuXk5')dnl
59define(`LOCAL_SHELL_ARGS', `TCP $h')dnl
60MODIFY_MAILER_FLAGS(`SMTP', `+k5')dnl
61MODIFY_MAILER_FLAGS(`ESMTP', `+k5')dnl
62MODIFY_MAILER_FLAGS(`DSMTP', `+k5')dnl
63MODIFY_MAILER_FLAGS(`SMTP8', `+k5')dnl
64MODIFY_MAILER_FLAGS(`RELAY', `+k')dnl
65MAILER(`local')dnl
66MAILER(`smtp')dnl
67
68LOCAL_CONFIG
69D{MTAHost}_MTA_HOST_
70
71LOCAL_RULESETS
72SLocal_localaddr
73R$+			$: $>ParseRecipient $1
74R$* < @ $+ > $*		$#relay $@ ${MTAHost} $: $1 < @ $2 > $3
75ifdef(`_USE_DECNET_SYNTAX_',
76`# DECnet
77R$+ :: $+		$#relay $@ ${MTAHost} $: $1 :: $2', `dnl')
78R$*			$#relay $@ ${MTAHost} $: $1 < @ _MSP_FQHN_ >
79