Commit | Line | Data |
---|---|---|
6f14531a RG |
1 | PUSHDIVERT(-1) |
2 | # | |
3 | # Copyright (c) 1983 Eric P. Allman | |
4 | # Copyright (c) 1988, 1993 | |
5 | # The Regents of the University of California. All rights reserved. | |
6 | # | |
7 | # Redistribution and use in source and binary forms, with or without | |
8 | # modification, are permitted provided that the following conditions | |
9 | # are met: | |
10 | # 1. Redistributions of source code must retain the above copyright | |
11 | # notice, this list of conditions and the following disclaimer. | |
12 | # 2. Redistributions in binary form must reproduce the above copyright | |
13 | # notice, this list of conditions and the following disclaimer in the | |
14 | # documentation and/or other materials provided with the distribution. | |
15 | # 3. All advertising materials mentioning features or use of this software | |
16 | # must display the following acknowledgement: | |
17 | # This product includes software developed by the University of | |
18 | # California, Berkeley and its contributors. | |
19 | # 4. Neither the name of the University nor the names of its contributors | |
20 | # may be used to endorse or promote products derived from this software | |
21 | # without specific prior written permission. | |
22 | # | |
23 | # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
24 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
25 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
26 | # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
27 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
28 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
29 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | # SUCH DAMAGE. | |
34 | # | |
35 | ||
36 | ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)') | |
c2714ef5 | 37 | ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$f -gC $h!rmail ($u)')') |
6f14531a | 38 | ifdef(`UUCP_MAILER_FLAGS',, `define(`UUCP_MAILER_FLAGS', `')') |
3a363396 | 39 | ifdef(`UUCP_MAX_SIZE',, `define(`UUCP_MAX_SIZE', 100000)') |
6f14531a RG |
40 | POPDIVERT |
41 | ##################################### | |
42 | ### UUCP Mailer specification ### | |
43 | ##################################### | |
44 | ||
c2714ef5 | 45 | VERSIONID(`@(#)uucp.m4 8.15 (Berkeley) 2/16/94') |
6f14531a | 46 | |
042b8fbf AM |
47 | # |
48 | # There are innumerable variations on the UUCP mailer. It really | |
49 | # is rather absurd. | |
50 | # | |
51 | ||
52 | # old UUCP mailer (two names) | |
3a363396 NW |
53 | Muucp, P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE, |
54 | A=UUCP_MAILER_ARGS | |
042b8fbf AM |
55 | Muucp-old, P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE, |
56 | A=UUCP_MAILER_ARGS | |
3a363396 | 57 | |
042b8fbf | 58 | # smart UUCP mailer (handles multiple addresses) (two names) |
3a363396 NW |
59 | Msuucp, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE, |
60 | A=UUCP_MAILER_ARGS | |
042b8fbf AM |
61 | Muucp-new, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE, |
62 | A=UUCP_MAILER_ARGS | |
3a363396 NW |
63 | |
64 | ifdef(`_MAILER_smtp_', | |
65 | `# domain-ized UUCP mailer | |
69fc843f | 66 | Muucp-dom, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhu, UUCP_MAILER_FLAGS), S=52/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), M=UUCP_MAX_SIZE, |
042b8fbf AM |
67 | A=UUCP_MAILER_ARGS |
68 | ||
69 | # domain-ized UUCP mailer with UUCP-style sender envelope | |
70 | Muucp-uudom, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhu, UUCP_MAILER_FLAGS), S=72/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), M=UUCP_MAX_SIZE, | |
3a363396 | 71 | A=UUCP_MAILER_ARGS') |
6f14531a | 72 | |
6f14531a | 73 | |
69fc843f AM |
74 | # |
75 | # envelope and header sender rewriting | |
76 | # | |
6f14531a RG |
77 | S12 |
78 | ||
79 | # handle error address as a special case | |
80 | R<@> $n errors to mailer-daemon | |
81 | ||
3a363396 | 82 | # do not qualify list:; syntax |
6f14531a RG |
83 | R$* :; <@> $@ $1 :; |
84 | ||
85 | R$* < @ $* . > $1 < @ $2 > strip trailing dots | |
042b8fbf AM |
86 | R$* < @ $=w > $1 strip local name |
87 | R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format | |
88 | R<@ $+ > : $+ $1 ! $2 convert to UUCP format | |
6f14531a RG |
89 | R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format |
90 | R$* < @ $+ > $2 ! $1 convert to UUCP format | |
042b8fbf AM |
91 | R$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user |
92 | R$&h ! $+ $@ $&h ! $1 $h!user => $h!user | |
3a363396 | 93 | R$+ $: $U ! $1 prepend our name |
042b8fbf | 94 | R! $+ $: $k ! $1 in case $U undefined |
6f14531a | 95 | |
69fc843f AM |
96 | # |
97 | # envelope and header recipient rewriting | |
98 | # | |
6f14531a RG |
99 | S22 |
100 | ||
101 | # don't touch list:; syntax | |
042b8fbf | 102 | R$* :; <@> $@ $1 :; |
6f14531a RG |
103 | |
104 | R$* < @ $* . > $1 < @ $2 > strip trailing dots | |
105 | R$* < @ $j > $1 strip local name | |
042b8fbf AM |
106 | R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format |
107 | R<@ $+ > : $+ $1 ! $2 convert to UUCP format | |
6f14531a RG |
108 | R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format |
109 | R$* < @ $+ > $2 ! $1 convert to UUCP format | |
042b8fbf AM |
110 | R$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user |
111 | R$&h ! $+ $@ $&h ! $1 $h!user => $h!user | |
112 | R$+ $: $U ! $1 prepend our name | |
113 | R! $+ $: $k ! $1 in case $U undefined | |
6f14531a | 114 | |
69fc843f | 115 | |
042b8fbf AM |
116 | ifdef(`_MAILER_smtp_', |
117 | `# | |
69fc843f AM |
118 | # envelope sender rewriting for uucp-dom mailer |
119 | # | |
120 | S52 | |
121 | ||
122 | # handle error address as a special case | |
123 | R<@> $n errors to mailer-daemon | |
124 | ||
125 | # pass everything to standard SMTP mailer rewriting | |
126 | R$* $@ $>11 $1 | |
127 | ||
042b8fbf AM |
128 | # |
129 | # envelope sender rewriting for uucp-uudom mailer | |
130 | # | |
131 | S72 | |
132 | ||
133 | # handle error address as a special case | |
134 | R<@> $n errors to mailer-daemon | |
135 | ||
136 | # do not qualify list:; syntax | |
137 | R$* :; <@> $@ $1 :; | |
138 | ||
139 | R$* < @ $* . > $1 < @ $2 > strip trailing dots | |
140 | R$* < @ $=w > $1 strip local name | |
141 | R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format | |
142 | R<@ $+ > : $+ $1 ! $2 convert to UUCP format | |
143 | R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format | |
144 | R$* < @ $+ > $@ $2 ! $1 convert to UUCP format | |
145 | ||
146 | R$&h ! $+ ! $+ $@ $1 ! $2 $h!...!user => ...!user | |
147 | R$&h ! $+ $@ $&h ! $1 $h!user => $h!user | |
148 | R$+ $: $M ! $1 prepend masquerade name | |
149 | R! $+ $: $j ! $1 in case $M undefined') | |
150 | ||
69fc843f | 151 | |
6f14531a RG |
152 | PUSHDIVERT(4) |
153 | # resolve locally connected UUCP links | |
c2714ef5 | 154 | R$* < @ $=Z . UUCP. > $* $#uucp-uudom $@ $2 $: $1 < @ $2 .UUCP. > $3 |
042b8fbf AM |
155 | R$* < @ $=Y . UUCP. > $* $#uucp-new $@ $2 $: $1 < @ $2 .UUCP. > $3 |
156 | R$* < @ $=U . UUCP. > $* $#uucp-old $@ $2 $: $1 < @ $2 .UUCP. > $3 | |
6f14531a | 157 | POPDIVERT |