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