3 # Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
5 # Copyright (c) 1983 Eric P. Allman. All rights reserved.
6 # Copyright (c) 1988, 1993
7 # The Regents of the University of California. All rights reserved.
9 # By using this file, you agree to the terms and conditions set
10 # forth in the LICENSE file which can be found at the top level of
11 # the sendmail distribution.
13 #ident "%Z%%M% %I% %E% SMI"
16 ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')
17 ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')')
18 _DEFIFNOT(`UUCP_MAILER_FLAGS', `')
19 ifdef(`UUCP_MAILER_MAX',,
20 `define(`UUCP_MAILER_MAX',
21 `ifdef(`UUCP_MAX_SIZE', `UUCP_MAX_SIZE', 100000)')')
22 define(`_UUCP_QGRP', `ifelse(defn(`UUCP_MAILER_QGRP'),`',`', ` Q=UUCP_MAILER_QGRP,')')dnl
24 #####################################
25 ### UUCP Mailer specification ###
26 #####################################
28 VERSIONID(`$Id: uucp.m4,v 8.44 2001/08/24 19:49:08 ca Exp $')
31 # envelope and header sender rewriting
35 # handle error address as a special case
36 R<@> $n errors to mailer-daemon
38 # list:; syntax should disappear
41 R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots
42 R$* < @ $=w > $1 strip local name
43 R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format
44 R<@ $+ > : $+ $1 ! $2 convert to UUCP format
45 R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format
46 R$* < @ $+ > $2 ! $1 convert to UUCP format
47 R$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user
48 R$&h ! $+ $@ $&h ! $1 $h!user => $h!user
49 R$+ $: $U ! $1 prepend our name
50 R! $+ $: $k ! $1 in case $U undefined
53 # envelope recipient rewriting
57 # list:; should disappear
60 R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots
61 R$* < @ $=w > $1 strip local name
62 R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format
63 R<@ $+ > : $+ $1 ! $2 convert to UUCP format
64 R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format
65 R$* < @ $+ > $2 ! $1 convert to UUCP format
68 # header recipient rewriting
72 # list:; syntax should disappear
75 R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots
76 R$* < @ $=w > $1 strip local name
77 R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format
78 R<@ $+ > : $+ $1 ! $2 convert to UUCP format
79 R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format
80 R$* < @ $+ > $2 ! $1 convert to UUCP format
81 R$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user
82 R$&h ! $+ $@ $&h ! $1 $h!user => $h!user
83 R$+ $: $U ! $1 prepend our name
84 R! $+ $: $k ! $1 in case $U undefined
87 ifdef(`_MAILER_smtp_',
89 # envelope sender rewriting for uucp-dom mailer
93 # handle error address as a special case
94 R<@> $n errors to mailer-daemon
96 # pass everything to standard SMTP mailer rewriting
97 R$* $@ $>EnvFromSMTP $1
100 # envelope sender rewriting for uucp-uudom mailer
104 # handle error address as a special case
105 R<@> $n errors to mailer-daemon
107 # do standard SMTP mailer rewriting
108 R$* $: $>EnvFromSMTP $1
110 R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots
111 R<@ $- . UUCP > : $+ $@ $1 ! $2 convert to UUCP format
112 R<@ $+ > : $+ $@ $1 ! $2 convert to UUCP format
113 R$* < @ $- . UUCP > $@ $2 ! $1 convert to UUCP format
114 R$* < @ $+ > $@ $2 ! $1 convert to UUCP format',
115 `errprint(`*** MAILER(`smtp') must appear before MAILER(`uucp')
116 if uucp-dom should be included.')
120 # resolve locally connected UUCP links
121 R$* < @ $=Z . UUCP. > $* $#uucp-uudom $@ $2 $: $1 < @ $2 .UUCP. > $3
122 R$* < @ $=Y . UUCP. > $* $#uucp-new $@ $2 $: $1 < @ $2 .UUCP. > $3
123 R$* < @ $=U . UUCP. > $* $#uucp-old $@ $2 $: $1 < @ $2 .UUCP. > $3
127 # There are innumerable variations on the UUCP mailer. It really
131 # old UUCP mailer (two names)
132 Muucp, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`DFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU,
133 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
135 Muucp-old, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`DFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU,
136 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
139 # smart UUCP mailer (handles multiple addresses) (two names)
140 Msuucp, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU,
141 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
143 Muucp-new, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU,
144 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
147 ifdef(`_MAILER_smtp_',
148 `# domain-ized UUCP mailer
149 Muucp-dom, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhud', UUCP_MAILER_FLAGS), `UUCP'), S=EnvFromUD/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'),
150 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
153 # domain-ized UUCP mailer with UUCP-style sender envelope
154 Muucp-uudom, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhud', UUCP_MAILER_FLAGS), `UUCP'), S=EnvFromUUD/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'),
155 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP