xref: /netbsd-src/external/ibm-public/postfix/dist/proto/UUCP_README.html (revision 059c16a85b0b39d60ad6d18f53c09510815afa2b)
1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2        "http://www.w3.org/TR/html4/loose.dtd">
3
4<html>
5
6<head>
7
8<title>Postfix and UUCP </title>
9
10<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11<link rel='stylesheet' type='text/css' href='postfix-doc.css'>
12
13</head>
14
15<body>
16
17<h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix and UUCP </h1>
18
19<hr>
20
21<h2><a name="uucp-tcp">Using UUCP over TCP</a></h2>
22
23<p> Despite a serious lack of sex-appeal, email via UUCP over TCP
24is a practical option for sites without permanent Internet connections,
25and for sites without a fixed IP address. For first-hand information,
26see the following guides: </p>
27
28<ul>
29
30<li> Jim Seymour's guide for using UUCP over TCP at
31http://jimsun.LinxNet.com/jdp/uucp_over_tcp/index.html,
32
33<li> Craig Sanders's guide for SSL-encrypted UUCP over TCP
34using stunnel at http://taz.net.au/postfix/uucp/.
35
36</ul>
37
38Here's a graphical description of what this document is about:
39
40<blockquote>
41
42<table>
43
44<tr> <td> Local network <tt> &lt;---&gt; </tt> </td>
45
46<td bgcolor="#f0f0ff" align="center"><a href="#lan-uucp">LAN to<br>
47UUCP<br> Gateway</a></td>
48
49<td> <tt> &lt;--- </tt> UUCP <tt> ---&gt; </tt> </td>
50
51<td bgcolor="#f0f0ff" align="center"><a href="#internet-uucp">Internet<br>
52to UUCP<br> Gateway</a></td>
53
54<td> <tt> &lt;---&gt; </tt>  Internet </td> </tr>
55
56</table>
57
58</blockquote>
59
60<p> And here's the table of contents of this document: </p>
61
62<ul>
63
64<li><a href="#internet-uucp">Setting up a Postfix Internet to UUCP
65gateway</a>
66
67<li><a href="#lan-uucp">Setting up a Postfix LAN to UUCP
68gateway</a>
69
70</ul>
71
72<h2><a name="internet-uucp">Setting up a Postfix Internet to UUCP
73gateway</a></h2>
74
75<p> Here is how to set up a machine that sits on the Internet and
76that forwards mail to a LAN that is connected via UUCP. See
77the <a href="#lan-uucp">LAN to UUCP gateway</a> section for
78the other side of the story. </p>
79
80<ul>
81
82<li> <p> You need an <b>rmail</b> program that extracts the sender
83address from mail that arrives via UUCP, and that feeds the mail
84into the Postfix <b>sendmail</b> command.  Most UNIX systems come
85with an <b>rmail</b> utility. If you're in a pinch, try the one
86bundled with the Postfix source code in the <b>auxiliary/rmail</b>
87directory. </p>
88
89<li> <p> Define a pipe(8) based mail delivery transport for delivery
90via UUCP: </p>
91
92<pre>
93/etc/postfix/master.cf:
94    uucp      unix  -       n       n       -       -       pipe
95      flags=F user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
96</pre>
97
98<p> This runs the <b>uux</b> command to place outgoing mail into
99the UUCP queue after replacing $nexthop by the next-hop hostname
100(the receiving UUCP host) and after replacing $recipient by the
101recipients.  The pipe(8) delivery agent executes the <b>uux</b>
102command without assistance from the shell, so there are no problems
103with shell meta characters in command-line parameters.  </p>
104
105<li> <p> Specify that mail for <i>example.com</i>, should be
106delivered via UUCP, to a host named <i>uucp-host</i>: </p>
107
108<pre>
109/etc/postfix/transport:
110    example.com     uucp:uucp-host
111    .example.com    uucp:uucp-host
112</pre>
113
114<p> See the transport(5) manual page for more details. </p>
115
116<li> <p> Execute the command "<b>postmap /etc/postfix/transport</b>"
117whenever you change the <b>transport</b> file. </p>
118
119<li> <p> Enable <b>transport</b> table lookups: </p>
120
121<pre>
122/etc/postfix/main.cf:
123    transport_maps = hash:/etc/postfix/transport
124</pre>
125
126<p> Specify <b>dbm</b> instead of <b>hash</b> if your system uses
127<b>dbm</b> files instead of <b>db</b> files. To find out what map
128types Postfix supports, use the command "<b>postconf -m</b>". </p>
129
130<li> <p> Add <i>example.com</i> to the list of domains that your site
131is willing to relay mail for. </p>
132
133<pre>
134/etc/postfix/main.cf:
135    relay_domains = example.com ...<i>other relay domains</i>...
136</pre>
137
138<p> See the relay_domains configuration parameter description for
139details. </p>
140
141<li> <p> Execute the command "<b>postfix reload</b>" to make the
142changes effective. </p>
143
144</ul>
145
146<h2><a name="lan-uucp">Setting up a Postfix LAN to UUCP
147gateway</a></h2>
148
149<p> Here is how to relay mail from a LAN via UUCP to the
150Internet. See the <a href="#internet-uucp">Internet to UUCP
151gateway</a> section for the other side of the story. </p>
152
153<ul>
154
155<li> <p> You need an <b>rmail</b> program that extracts the sender
156address from mail that arrives via UUCP, and that feeds the mail
157into the Postfix <b>sendmail</b> command.  Most UNIX systems come
158with an <b>rmail</b> utility. If you're in a pinch, try the one
159bundled with the Postfix source code in the <b>auxiliary/rmail</b>
160directory. </p>
161
162<li> <p> Specify that all remote mail must be sent via the <b>uucp</b>
163mail transport to your UUCP gateway host, say, <i>uucp-gateway</i>: </p>
164
165<pre>
166/etc/postfix/main.cf:
167    relayhost = uucp-gateway
168    default_transport = uucp
169</pre>
170
171<p> Postfix 2.0 and later also allows the following more succinct form: </p>
172
173<pre>
174/etc/postfix/main.cf:
175    default_transport = uucp:uucp-gateway
176</pre>
177
178<li> <p> Define a pipe(8) based message delivery transport for mail
179delivery via UUCP: </p>
180
181<pre>
182/etc/postfix/master.cf:
183    uucp      unix  -       n       n       -       -       pipe
184      flags=F user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
185</pre>
186
187<p> This runs the <b>uux</b> command to place outgoing mail into
188the UUCP queue. It substitutes the next-hop hostname (<i>uucp-gateway</i>,
189or whatever you specified) and the recipients before executing the
190command.  The <b>uux</b> command is executed without assistance
191from the shell, so there are no problems with shell meta characters.
192</p>
193
194<li> <p> Execute the command "<b>postfix reload</b>" to make the
195changes effective. </p>
196
197</ul>
198
199</body>
200
201</html>
202