1*0Sstevel@tonic-gatePUSHDIVERT(-1) 2*0Sstevel@tonic-gate# 3*0Sstevel@tonic-gate# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. 4*0Sstevel@tonic-gate# All rights reserved. 5*0Sstevel@tonic-gate# Copyright (c) 1983 Eric P. Allman. All rights reserved. 6*0Sstevel@tonic-gate# Copyright (c) 1988, 1993 7*0Sstevel@tonic-gate# The Regents of the University of California. All rights reserved. 8*0Sstevel@tonic-gate# 9*0Sstevel@tonic-gate# By using this file, you agree to the terms and conditions set 10*0Sstevel@tonic-gate# forth in the LICENSE file which can be found at the top level of 11*0Sstevel@tonic-gate# the sendmail distribution. 12*0Sstevel@tonic-gate# 13*0Sstevel@tonic-gate#ident "%Z%%M% %I% %E% SMI" 14*0Sstevel@tonic-gate# 15*0Sstevel@tonic-gate 16*0Sstevel@tonic-gateifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)') 17*0Sstevel@tonic-gateifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')') 18*0Sstevel@tonic-gate_DEFIFNOT(`UUCP_MAILER_FLAGS', `') 19*0Sstevel@tonic-gateifdef(`UUCP_MAILER_MAX',, 20*0Sstevel@tonic-gate `define(`UUCP_MAILER_MAX', 21*0Sstevel@tonic-gate `ifdef(`UUCP_MAX_SIZE', `UUCP_MAX_SIZE', 100000)')') 22*0Sstevel@tonic-gatedefine(`_UUCP_QGRP', `ifelse(defn(`UUCP_MAILER_QGRP'),`',`', ` Q=UUCP_MAILER_QGRP,')')dnl 23*0Sstevel@tonic-gatePOPDIVERT 24*0Sstevel@tonic-gate##################################### 25*0Sstevel@tonic-gate### UUCP Mailer specification ### 26*0Sstevel@tonic-gate##################################### 27*0Sstevel@tonic-gate 28*0Sstevel@tonic-gateVERSIONID(`$Id: uucp.m4,v 8.44 2001/08/24 19:49:08 ca Exp $') 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate# 31*0Sstevel@tonic-gate# envelope and header sender rewriting 32*0Sstevel@tonic-gate# 33*0Sstevel@tonic-gateSFromU 34*0Sstevel@tonic-gate 35*0Sstevel@tonic-gate# handle error address as a special case 36*0Sstevel@tonic-gateR<@> $n errors to mailer-daemon 37*0Sstevel@tonic-gate 38*0Sstevel@tonic-gate# list:; syntax should disappear 39*0Sstevel@tonic-gateR:; <@> $@ 40*0Sstevel@tonic-gate 41*0Sstevel@tonic-gateR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 42*0Sstevel@tonic-gateR$* < @ $=w > $1 strip local name 43*0Sstevel@tonic-gateR<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format 44*0Sstevel@tonic-gateR<@ $+ > : $+ $1 ! $2 convert to UUCP format 45*0Sstevel@tonic-gateR$* < @ $- . UUCP > $2 ! $1 convert to UUCP format 46*0Sstevel@tonic-gateR$* < @ $+ > $2 ! $1 convert to UUCP format 47*0Sstevel@tonic-gateR$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user 48*0Sstevel@tonic-gateR$&h ! $+ $@ $&h ! $1 $h!user => $h!user 49*0Sstevel@tonic-gateR$+ $: $U ! $1 prepend our name 50*0Sstevel@tonic-gateR! $+ $: $k ! $1 in case $U undefined 51*0Sstevel@tonic-gate 52*0Sstevel@tonic-gate# 53*0Sstevel@tonic-gate# envelope recipient rewriting 54*0Sstevel@tonic-gate# 55*0Sstevel@tonic-gateSEnvToU 56*0Sstevel@tonic-gate 57*0Sstevel@tonic-gate# list:; should disappear 58*0Sstevel@tonic-gateR:; <@> $@ 59*0Sstevel@tonic-gate 60*0Sstevel@tonic-gateR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 61*0Sstevel@tonic-gateR$* < @ $=w > $1 strip local name 62*0Sstevel@tonic-gateR<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format 63*0Sstevel@tonic-gateR<@ $+ > : $+ $1 ! $2 convert to UUCP format 64*0Sstevel@tonic-gateR$* < @ $- . UUCP > $2 ! $1 convert to UUCP format 65*0Sstevel@tonic-gateR$* < @ $+ > $2 ! $1 convert to UUCP format 66*0Sstevel@tonic-gate 67*0Sstevel@tonic-gate# 68*0Sstevel@tonic-gate# header recipient rewriting 69*0Sstevel@tonic-gate# 70*0Sstevel@tonic-gateSHdrToU 71*0Sstevel@tonic-gate 72*0Sstevel@tonic-gate# list:; syntax should disappear 73*0Sstevel@tonic-gateR:; <@> $@ 74*0Sstevel@tonic-gate 75*0Sstevel@tonic-gateR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 76*0Sstevel@tonic-gateR$* < @ $=w > $1 strip local name 77*0Sstevel@tonic-gateR<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format 78*0Sstevel@tonic-gateR<@ $+ > : $+ $1 ! $2 convert to UUCP format 79*0Sstevel@tonic-gateR$* < @ $- . UUCP > $2 ! $1 convert to UUCP format 80*0Sstevel@tonic-gateR$* < @ $+ > $2 ! $1 convert to UUCP format 81*0Sstevel@tonic-gateR$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user 82*0Sstevel@tonic-gateR$&h ! $+ $@ $&h ! $1 $h!user => $h!user 83*0Sstevel@tonic-gateR$+ $: $U ! $1 prepend our name 84*0Sstevel@tonic-gateR! $+ $: $k ! $1 in case $U undefined 85*0Sstevel@tonic-gate 86*0Sstevel@tonic-gate 87*0Sstevel@tonic-gateifdef(`_MAILER_smtp_', 88*0Sstevel@tonic-gate`# 89*0Sstevel@tonic-gate# envelope sender rewriting for uucp-dom mailer 90*0Sstevel@tonic-gate# 91*0Sstevel@tonic-gateSEnvFromUD 92*0Sstevel@tonic-gate 93*0Sstevel@tonic-gate# handle error address as a special case 94*0Sstevel@tonic-gateR<@> $n errors to mailer-daemon 95*0Sstevel@tonic-gate 96*0Sstevel@tonic-gate# pass everything to standard SMTP mailer rewriting 97*0Sstevel@tonic-gateR$* $@ $>EnvFromSMTP $1 98*0Sstevel@tonic-gate 99*0Sstevel@tonic-gate# 100*0Sstevel@tonic-gate# envelope sender rewriting for uucp-uudom mailer 101*0Sstevel@tonic-gate# 102*0Sstevel@tonic-gateSEnvFromUUD 103*0Sstevel@tonic-gate 104*0Sstevel@tonic-gate# handle error address as a special case 105*0Sstevel@tonic-gateR<@> $n errors to mailer-daemon 106*0Sstevel@tonic-gate 107*0Sstevel@tonic-gate# do standard SMTP mailer rewriting 108*0Sstevel@tonic-gateR$* $: $>EnvFromSMTP $1 109*0Sstevel@tonic-gate 110*0Sstevel@tonic-gateR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 111*0Sstevel@tonic-gateR<@ $- . UUCP > : $+ $@ $1 ! $2 convert to UUCP format 112*0Sstevel@tonic-gateR<@ $+ > : $+ $@ $1 ! $2 convert to UUCP format 113*0Sstevel@tonic-gateR$* < @ $- . UUCP > $@ $2 ! $1 convert to UUCP format 114*0Sstevel@tonic-gateR$* < @ $+ > $@ $2 ! $1 convert to UUCP format', 115*0Sstevel@tonic-gate`errprint(`*** MAILER(`smtp') must appear before MAILER(`uucp') 116*0Sstevel@tonic-gate if uucp-dom should be included.') 117*0Sstevel@tonic-gate') 118*0Sstevel@tonic-gate 119*0Sstevel@tonic-gatePUSHDIVERT(4) 120*0Sstevel@tonic-gate# resolve locally connected UUCP links 121*0Sstevel@tonic-gateR$* < @ $=Z . UUCP. > $* $#uucp-uudom $@ $2 $: $1 < @ $2 .UUCP. > $3 122*0Sstevel@tonic-gateR$* < @ $=Y . UUCP. > $* $#uucp-new $@ $2 $: $1 < @ $2 .UUCP. > $3 123*0Sstevel@tonic-gateR$* < @ $=U . UUCP. > $* $#uucp-old $@ $2 $: $1 < @ $2 .UUCP. > $3 124*0Sstevel@tonic-gatePOPDIVERT 125*0Sstevel@tonic-gate 126*0Sstevel@tonic-gate# 127*0Sstevel@tonic-gate# There are innumerable variations on the UUCP mailer. It really 128*0Sstevel@tonic-gate# is rather absurd. 129*0Sstevel@tonic-gate# 130*0Sstevel@tonic-gate 131*0Sstevel@tonic-gate# old UUCP mailer (two names) 132*0Sstevel@tonic-gateMuucp, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`DFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 133*0Sstevel@tonic-gate M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 134*0Sstevel@tonic-gate A=UUCP_MAILER_ARGS 135*0Sstevel@tonic-gateMuucp-old, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`DFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 136*0Sstevel@tonic-gate M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 137*0Sstevel@tonic-gate A=UUCP_MAILER_ARGS 138*0Sstevel@tonic-gate 139*0Sstevel@tonic-gate# smart UUCP mailer (handles multiple addresses) (two names) 140*0Sstevel@tonic-gateMsuucp, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 141*0Sstevel@tonic-gate M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 142*0Sstevel@tonic-gate A=UUCP_MAILER_ARGS 143*0Sstevel@tonic-gateMuucp-new, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 144*0Sstevel@tonic-gate M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 145*0Sstevel@tonic-gate A=UUCP_MAILER_ARGS 146*0Sstevel@tonic-gate 147*0Sstevel@tonic-gateifdef(`_MAILER_smtp_', 148*0Sstevel@tonic-gate`# domain-ized UUCP mailer 149*0Sstevel@tonic-gateMuucp-dom, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhud', UUCP_MAILER_FLAGS), `UUCP'), S=EnvFromUD/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), 150*0Sstevel@tonic-gate M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 151*0Sstevel@tonic-gate A=UUCP_MAILER_ARGS 152*0Sstevel@tonic-gate 153*0Sstevel@tonic-gate# domain-ized UUCP mailer with UUCP-style sender envelope 154*0Sstevel@tonic-gateMuucp-uudom, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhud', UUCP_MAILER_FLAGS), `UUCP'), S=EnvFromUUD/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), 155*0Sstevel@tonic-gate M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 156*0Sstevel@tonic-gate A=UUCP_MAILER_ARGS') 157*0Sstevel@tonic-gate 158*0Sstevel@tonic-gate 159