150476SpeterPUSHDIVERT(-1) 223119Swosch# 323119Swosch# Copyright (c) 1998-2001 Proofpoint, Inc. and its suppliers. 423119Swosch# All rights reserved. 523119Swosch# Copyright (c) 1983 Eric P. Allman. All rights reserved. 623119Swosch# Copyright (c) 1988, 1993 723119Swosch# The Regents of the University of California. All rights reserved. 823119Swosch# 923119Swosch# By using this file, you agree to the terms and conditions set 1023119Swosch# forth in the LICENSE file which can be found at the top level of 1123119Swosch# the sendmail distribution. 1223119Swosch# 1323119Swosch# 1423119Swosch 1523119Swoschifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)') 1623119Swoschifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')') 1723119Swosch_DEFIFNOT(`UUCP_MAILER_FLAGS', `') 1823119Swoschifdef(`UUCP_MAILER_MAX',, 1923119Swosch `define(`UUCP_MAILER_MAX', 2023119Swosch `ifdef(`UUCP_MAX_SIZE', `UUCP_MAX_SIZE', 100000)')') 2123119Swoschdefine(`_UUCP_QGRP', `ifelse(defn(`UUCP_MAILER_QGRP'),`',`', ` Q=UUCP_MAILER_QGRP,')')dnl 2223119SwoschPOPDIVERT 2323119Swosch##################################### 2423119Swosch### UUCP Mailer specification ### 2523119Swosch##################################### 2623119Swosch 2723119SwoschVERSIONID(`$Id: uucp.m4,v 8.45 2013-11-22 20:51:14 ca Exp $') 2823119Swosch 2923119Swosch# 3023119Swosch# envelope and header sender rewriting 3123119Swosch# 3223119SwoschSFromU 3323119Swosch 3423119Swosch# handle error address as a special case 3523119SwoschR<@> $n errors to mailer-daemon 3623119Swosch 3723119Swosch# list:; syntax should disappear 3823119SwoschR:; <@> $@ 3923119Swosch 4023119SwoschR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 4123119SwoschR$* < @ $=w > $1 strip local name 4223119SwoschR<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format 4323119SwoschR<@ $+ > : $+ $1 ! $2 convert to UUCP format 4423119SwoschR$* < @ $- . UUCP > $2 ! $1 convert to UUCP format 4523119SwoschR$* < @ $+ > $2 ! $1 convert to UUCP format 4623119SwoschR$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user 4723119SwoschR$&h ! $+ $@ $&h ! $1 $h!user => $h!user 4823119SwoschR$+ $: $U ! $1 prepend our name 4923119SwoschR! $+ $: $k ! $1 in case $U undefined 5023119Swosch 5123119Swosch# 5223119Swosch# envelope recipient rewriting 5323119Swosch# 5423119SwoschSEnvToU 5523119Swosch 5623119Swosch# list:; should disappear 5723119SwoschR:; <@> $@ 5823119Swosch 5923119SwoschR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 6023119SwoschR$* < @ $=w > $1 strip local name 6123119SwoschR<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format 6223119SwoschR<@ $+ > : $+ $1 ! $2 convert to UUCP format 6323119SwoschR$* < @ $- . UUCP > $2 ! $1 convert to UUCP format 6423119SwoschR$* < @ $+ > $2 ! $1 convert to UUCP format 6523119Swosch 6654090Sache# 6723119Swosch# header recipient rewriting 6823119Swosch# 6923119SwoschSHdrToU 7023119Swosch 7123119Swosch# list:; syntax should disappear 7223119SwoschR:; <@> $@ 7323119Swosch 7423119SwoschR$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 7523119SwoschR$* < @ $=w > $1 strip local name 7623119SwoschR<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format 7723119SwoschR<@ $+ > : $+ $1 ! $2 convert to UUCP format 7854090SacheR$* < @ $- . UUCP > $2 ! $1 convert to UUCP format 7953943SacheR$* < @ $+ > $2 ! $1 convert to UUCP format 8053943SacheR$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user 8153943SacheR$&h ! $+ $@ $&h ! $1 $h!user => $h!user 8253943SacheR$+ $: $U ! $1 prepend our name 8353943SacheR! $+ $: $k ! $1 in case $U undefined 8453943Sache 8553943Sache 8653943Sacheifdef(`_MAILER_smtp_', 8753943Sache`# 8853943Sache# envelope sender rewriting for uucp-dom mailer 8953943Sache# 9053943SacheSEnvFromUD 9153943Sache 9253943Sache# handle error address as a special case 9353943SacheR<@> $n errors to mailer-daemon 9453943Sache 9574413Sache# pass everything to standard SMTP mailer rewriting 9653943SacheR$* $@ $>EnvFromSMTP $1 9774413Sache 9853961Sache# 9974413Sache# envelope sender rewriting for uucp-uudom mailer 10053961Sache# 10174413SacheSEnvFromUUD 10274413Sache 103# handle error address as a special case 104R<@> $n errors to mailer-daemon 105 106# do standard SMTP mailer rewriting 107R$* $: $>EnvFromSMTP $1 108 109R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots 110R<@ $- . UUCP > : $+ $@ $1 ! $2 convert to UUCP format 111R<@ $+ > : $+ $@ $1 ! $2 convert to UUCP format 112R$* < @ $- . UUCP > $@ $2 ! $1 convert to UUCP format 113R$* < @ $+ > $@ $2 ! $1 convert to UUCP format', 114`errprint(`*** MAILER(`smtp') must appear before MAILER(`uucp') 115 if uucp-dom should be included.') 116') 117 118PUSHDIVERT(4) 119# resolve locally connected UUCP links 120R$* < @ $=Z . UUCP. > $* $#uucp-uudom $@ $2 $: $1 < @ $2 .UUCP. > $3 121R$* < @ $=Y . UUCP. > $* $#uucp-new $@ $2 $: $1 < @ $2 .UUCP. > $3 122R$* < @ $=U . UUCP. > $* $#uucp-old $@ $2 $: $1 < @ $2 .UUCP. > $3 123POPDIVERT 124 125# 126# There are innumerable variations on the UUCP mailer. It really 127# is rather absurd. 128# 129 130# old UUCP mailer (two names) 131Muucp, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`DFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 132 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 133 A=UUCP_MAILER_ARGS 134Muucp-old, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`DFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 135 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 136 A=UUCP_MAILER_ARGS 137 138# smart UUCP mailer (handles multiple addresses) (two names) 139Msuucp, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 140 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 141 A=UUCP_MAILER_ARGS 142Muucp-new, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU, 143 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 144 A=UUCP_MAILER_ARGS 145 146ifdef(`_MAILER_smtp_', 147`# domain-ized UUCP mailer 148Muucp-dom, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhud', UUCP_MAILER_FLAGS), `UUCP'), S=EnvFromUD/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), 149 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 150 A=UUCP_MAILER_ARGS 151 152# domain-ized UUCP mailer with UUCP-style sender envelope 153Muucp-uudom, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhud', UUCP_MAILER_FLAGS), `UUCP'), S=EnvFromUUD/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), 154 M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP 155 A=UUCP_MAILER_ARGS') 156 157 158