138032SpeterPUSHDIVERT(-1) 238032Speter# 390792Sgshapiro# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. 464562Sgshapiro# All rights reserved. 538032Speter# Copyright (c) 1983 Eric P. Allman. All rights reserved. 638032Speter# Copyright (c) 1988, 1993 738032Speter# The Regents of the University of California. All rights reserved. 838032Speter# 938032Speter# By using this file, you agree to the terms and conditions set 1038032Speter# forth in the LICENSE file which can be found at the top level of 1138032Speter# the sendmail distribution. 1238032Speter# 1338032Speter# 1438032Speter 1538032Speterifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)') 1638032Speterifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')') 1764562Sgshapiro_DEFIFNOT(`UUCP_MAILER_FLAGS', `') 1838032Speterifdef(`UUCP_MAILER_MAX',, 1938032Speter `define(`UUCP_MAILER_MAX', 2038032Speter `ifdef(`UUCP_MAX_SIZE', `UUCP_MAX_SIZE', 100000)')') 2190792Sgshapirodefine(`_UUCP_QGRP', `ifelse(defn(`UUCP_MAILER_QGRP'),`',`', ` Q=UUCP_MAILER_QGRP,')')dnl 2238032SpeterPOPDIVERT 2338032Speter##################################### 2438032Speter### UUCP Mailer specification ### 2538032Speter##################################### 2638032Speter 2798121SgshapiroVERSIONID(`$Id: uucp.m4,v 8.44 2001/08/24 19:49:08 ca Exp $') 2838032Speter 2938032Speter# 3038032Speter# envelope and header sender rewriting 3138032Speter# 3290792SgshapiroSFromU 3338032Speter 3438032Speter# handle error address as a special case 3538032SpeterR<@> $n errors to mailer-daemon 3638032Speter 3738032Speter# list:; syntax should disappear 3838032SpeterR:; <@> $@ 3938032Speter 4038032SpeterR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 4138032SpeterR$* < @ $=w > $1 strip local name 4238032SpeterR<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format 4338032SpeterR<@ $+ > : $+ $1 ! $2 convert to UUCP format 4438032SpeterR$* < @ $- . UUCP > $2 ! $1 convert to UUCP format 4538032SpeterR$* < @ $+ > $2 ! $1 convert to UUCP format 4638032SpeterR$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user 4738032SpeterR$&h ! $+ $@ $&h ! $1 $h!user => $h!user 4838032SpeterR$+ $: $U ! $1 prepend our name 4938032SpeterR! $+ $: $k ! $1 in case $U undefined 5038032Speter 5138032Speter# 5238032Speter# envelope recipient rewriting 5338032Speter# 5490792SgshapiroSEnvToU 5538032Speter 5638032Speter# list:; should disappear 5738032SpeterR:; <@> $@ 5838032Speter 5938032SpeterR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 6038032SpeterR$* < @ $=w > $1 strip local name 6138032SpeterR<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format 6238032SpeterR<@ $+ > : $+ $1 ! $2 convert to UUCP format 6338032SpeterR$* < @ $- . UUCP > $2 ! $1 convert to UUCP format 6438032SpeterR$* < @ $+ > $2 ! $1 convert to UUCP format 6538032Speter 6638032Speter# 6738032Speter# header recipient rewriting 6838032Speter# 6990792SgshapiroSHdrToU 7038032Speter 7138032Speter# list:; syntax should disappear 7238032SpeterR:; <@> $@ 7338032Speter 7438032SpeterR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 7538032SpeterR$* < @ $=w > $1 strip local name 7638032SpeterR<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format 7738032SpeterR<@ $+ > : $+ $1 ! $2 convert to UUCP format 7838032SpeterR$* < @ $- . UUCP > $2 ! $1 convert to UUCP format 7938032SpeterR$* < @ $+ > $2 ! $1 convert to UUCP format 8038032SpeterR$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user 8138032SpeterR$&h ! $+ $@ $&h ! $1 $h!user => $h!user 8238032SpeterR$+ $: $U ! $1 prepend our name 8338032SpeterR! $+ $: $k ! $1 in case $U undefined 8438032Speter 8538032Speter 8638032Speterifdef(`_MAILER_smtp_', 8738032Speter`# 8838032Speter# envelope sender rewriting for uucp-dom mailer 8938032Speter# 9090792SgshapiroSEnvFromUD 9138032Speter 9238032Speter# handle error address as a special case 9338032SpeterR<@> $n errors to mailer-daemon 9438032Speter 9538032Speter# pass everything to standard SMTP mailer rewriting 9664562SgshapiroR$* $@ $>EnvFromSMTP $1 9738032Speter 9838032Speter# 9938032Speter# envelope sender rewriting for uucp-uudom mailer 10038032Speter# 10190792SgshapiroSEnvFromUUD 10238032Speter 10338032Speter# handle error address as a special case 10438032SpeterR<@> $n errors to mailer-daemon 10538032Speter 10638032Speter# do standard SMTP mailer rewriting 10764562SgshapiroR$* $: $>EnvFromSMTP $1 10838032Speter 10938032SpeterR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 11038032SpeterR<@ $- . UUCP > : $+ $@ $1 ! $2 convert to UUCP format 11138032SpeterR<@ $+ > : $+ $@ $1 ! $2 convert to UUCP format 11238032SpeterR$* < @ $- . UUCP > $@ $2 ! $1 convert to UUCP format 11390792SgshapiroR$* < @ $+ > $@ $2 ! $1 convert to UUCP format', 11490792Sgshapiro`errprint(`*** MAILER(`smtp') must appear before MAILER(`uucp') 11590792Sgshapiro if uucp-dom should be included.') 11690792Sgshapiro') 11738032Speter 11838032SpeterPUSHDIVERT(4) 11938032Speter# resolve locally connected UUCP links 12038032SpeterR$* < @ $=Z . UUCP. > $* $#uucp-uudom $@ $2 $: $1 < @ $2 .UUCP. > $3 12138032SpeterR$* < @ $=Y . UUCP. > $* $#uucp-new $@ $2 $: $1 < @ $2 .UUCP. > $3 12238032SpeterR$* < @ $=U . UUCP. > $* $#uucp-old $@ $2 $: $1 < @ $2 .UUCP. > $3 12338032SpeterPOPDIVERT 12464562Sgshapiro 12564562Sgshapiro# 12664562Sgshapiro# There are innumerable variations on the UUCP mailer. It really 12764562Sgshapiro# is rather absurd. 12864562Sgshapiro# 12964562Sgshapiro 13064562Sgshapiro# old UUCP mailer (two names) 13164562SgshapiroMuucp, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`DFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 13290792Sgshapiro M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 13364562Sgshapiro A=UUCP_MAILER_ARGS 13464562SgshapiroMuucp-old, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`DFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 13590792Sgshapiro M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 13664562Sgshapiro A=UUCP_MAILER_ARGS 13764562Sgshapiro 13864562Sgshapiro# smart UUCP mailer (handles multiple addresses) (two names) 13964562SgshapiroMsuucp, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 14090792Sgshapiro M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 14164562Sgshapiro A=UUCP_MAILER_ARGS 14264562SgshapiroMuucp-new, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 14390792Sgshapiro M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 14464562Sgshapiro A=UUCP_MAILER_ARGS 14564562Sgshapiro 14664562Sgshapiroifdef(`_MAILER_smtp_', 14764562Sgshapiro`# domain-ized UUCP mailer 14864562SgshapiroMuucp-dom, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhud', UUCP_MAILER_FLAGS), `UUCP'), S=EnvFromUD/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), 14990792Sgshapiro M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 15064562Sgshapiro A=UUCP_MAILER_ARGS 15164562Sgshapiro 15264562Sgshapiro# domain-ized UUCP mailer with UUCP-style sender envelope 15364562SgshapiroMuucp-uudom, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhud', UUCP_MAILER_FLAGS), `UUCP'), S=EnvFromUUD/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), 15490792Sgshapiro M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 15564562Sgshapiro A=UUCP_MAILER_ARGS') 15664562Sgshapiro 15764562Sgshapiro 158