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)') | |
3a363396 | 37 | ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -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 | ||
69fc843f | 45 | VERSIONID(`@(#)uucp.m4 8.6 (Berkeley) 10/31/93') |
6f14531a | 46 | |
3a363396 NW |
47 | # old UUCP mailer |
48 | Muucp, P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE, | |
49 | A=UUCP_MAILER_ARGS | |
50 | ||
51 | # smart UUCP mailer (handles multiple addresses) | |
52 | Msuucp, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE, | |
53 | A=UUCP_MAILER_ARGS | |
54 | ||
55 | ifdef(`_MAILER_smtp_', | |
56 | `# domain-ized UUCP mailer | |
69fc843f | 57 | 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, |
3a363396 | 58 | A=UUCP_MAILER_ARGS') |
6f14531a | 59 | |
6f14531a | 60 | |
69fc843f AM |
61 | # |
62 | # envelope and header sender rewriting | |
63 | # | |
6f14531a RG |
64 | S12 |
65 | ||
66 | # handle error address as a special case | |
67 | R<@> $n errors to mailer-daemon | |
68 | ||
3a363396 | 69 | # do not qualify list:; syntax |
6f14531a RG |
70 | R$* :; <@> $@ $1 :; |
71 | ||
72 | R$* < @ $* . > $1 < @ $2 > strip trailing dots | |
73 | R$* < @ $j > $1 strip local name | |
74 | R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format | |
75 | R$* < @ $+ > $2 ! $1 convert to UUCP format | |
3a363396 | 76 | R$+ $: $U ! $1 prepend our name |
6f14531a | 77 | |
69fc843f AM |
78 | # |
79 | # envelope and header recipient rewriting | |
80 | # | |
6f14531a RG |
81 | S22 |
82 | ||
83 | # don't touch list:; syntax | |
84 | R$* :; <@> $@ $1 ;: | |
85 | ||
86 | R$* < @ $* . > $1 < @ $2 > strip trailing dots | |
87 | R$* < @ $j > $1 strip local name | |
88 | R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format | |
89 | R$* < @ $+ > $2 ! $1 convert to UUCP format | |
90 | ||
69fc843f AM |
91 | |
92 | # | |
93 | # envelope sender rewriting for uucp-dom mailer | |
94 | # | |
95 | S52 | |
96 | ||
97 | # handle error address as a special case | |
98 | R<@> $n errors to mailer-daemon | |
99 | ||
100 | # pass everything to standard SMTP mailer rewriting | |
101 | R$* $@ $>11 $1 | |
102 | ||
103 | ||
6f14531a RG |
104 | PUSHDIVERT(4) |
105 | # resolve locally connected UUCP links | |
d747e748 JH |
106 | R< @ $=Z . UUCP > : $+ $#uucp-dom $@ $1 $: $2 @host.UUCP: ... |
107 | R$+ < @ $=Z . UUCP > $#uucp-dom $@ $2 $: $1 user@host.UUCP | |
6f14531a | 108 | R< @ $=Y . UUCP > : $+ $#suucp $@ $1 $: $2 @host.UUCP: ... |
6f14531a | 109 | R$+ < @ $=Y . UUCP > $#suucp $@ $2 $: $1 user@host.UUCP |
d747e748 | 110 | R< @ $=U . UUCP > : $+ $#uucp $@ $1 $: $2 @host.UUCP: ... |
6f14531a RG |
111 | R$+ < @ $=U . UUCP > $#uucp $@ $2 $: $1 user@host.UUCP |
112 | POPDIVERT |