1 <!doctype html public
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
8 <title>Postfix and UUCP
</title>
10 <meta http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
16 <h1><img src=
"postfix-logo.jpg" width=
"203" height=
"98" ALT=
"">Postfix and UUCP
</h1>
20 <h2><a name=
"uucp-tcp">Using UUCP over TCP
</a></h2>
22 <p> Despite a serious lack of sex-appeal, email via UUCP over TCP
23 is a practical option for sites without permanent Internet connections,
24 and for sites without a fixed IP address. For first-hand information,
25 see the following guides:
</p>
29 <li> Jim Seymour's guide for using UUCP over TCP at
30 http://jimsun.LinxNet.com/jdp/uucp_over_tcp/index.html,
32 <li> Craig Sanders's guide for SSL-encrypted UUCP over TCP
33 using stunnel at http://taz.net.au/postfix/uucp/.
37 Here's a graphical description of what this document is about:
43 <tr> <td> Local network
<tt> <---
> </tt> </td>
45 <td bgcolor=
"#f0f0ff" align=
"center"><a href=
"#lan-uucp">LAN to
<br>
46 UUCP
<br> Gateway
</a></td>
48 <td> <tt> <---
</tt> UUCP
<tt> ---
> </tt> </td>
50 <td bgcolor=
"#f0f0ff" align=
"center"><a href=
"#internet-uucp">Internet
<br>
51 to UUCP
<br> Gateway
</a></td>
53 <td> <tt> <---
> </tt> Internet
</td> </tr>
59 <p> And here's the table of contents of this document:
</p>
63 <li><a href=
"#internet-uucp">Setting up a Postfix Internet to UUCP
66 <li><a href=
"#lan-uucp">Setting up a Postfix LAN to UUCP
71 <h2><a name=
"internet-uucp">Setting up a Postfix Internet to UUCP
74 <p> Here is how to set up a machine that sits on the Internet and
75 that forwards mail to a LAN that is connected via UUCP. See
76 the
<a href=
"#lan-uucp">LAN to UUCP gateway
</a> section for
77 the other side of the story.
</p>
81 <li> <p> You need an
<b>rmail
</b> program that extracts the sender
82 address from mail that arrives via UUCP, and that feeds the mail
83 into the Postfix
<b>sendmail
</b> command. Most UNIX systems come
84 with an
<b>rmail
</b> utility. If you're in a pinch, try the one
85 bundled with the Postfix source code in the
<b>auxiliary/rmail
</b>
88 <li> <p> Define a pipe(
8) based mail delivery transport for delivery
92 /etc/postfix/master.cf:
93 uucp unix - n n - - pipe
94 flags=F user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
97 <p> This runs the
<b>uux
</b> command to place outgoing mail into
98 the UUCP queue after replacing $nexthop by the next-hop hostname
99 (the receiving UUCP host) and after replacing $recipient by the
100 recipients. The pipe(
8) delivery agent executes the
<b>uux
</b>
101 command without assistance from the shell, so there are no problems
102 with shell meta characters in command-line parameters.
</p>
104 <li> <p> Specify that mail for
<i>example.com
</i>, should be
105 delivered via UUCP, to a host named
<i>uucp-host
</i>:
</p>
108 /etc/postfix/transport:
109 example.com uucp:uucp-host
110 .example.com uucp:uucp-host
113 <p> See the transport(
5) manual page for more details.
</p>
115 <li> <p> Execute the command
"<b>postmap /etc/postfix/transport</b>"
116 whenever you change the
<b>transport
</b> file.
</p>
118 <li> <p> Enable
<b>transport
</b> table lookups:
</p>
121 /etc/postfix/main.cf:
122 transport_maps = hash:/etc/postfix/transport
125 <p> Specify
<b>dbm
</b> instead of
<b>hash
</b> if your system uses
126 <b>dbm
</b> files instead of
<b>db
</b> files. To find out what map
127 types Postfix supports, use the command
"<b>postconf -m</b>".
</p>
129 <li> <p> Add
<i>example.com
</i> to the list of domains that your site
130 is willing to relay mail for.
</p>
133 /etc/postfix/main.cf:
134 relay_domains = example.com ...
<i>other relay domains
</i>...
137 <p> See the relay_domains configuration parameter description for
140 <li> <p> Execute the command
"<b>postfix reload</b>" to make the
141 changes effective.
</p>
145 <h2><a name=
"lan-uucp">Setting up a Postfix LAN to UUCP
148 <p> Here is how to relay mail from a LAN via UUCP to the
149 Internet. See the
<a href=
"#internet-uucp">Internet to UUCP
150 gateway
</a> section for the other side of the story.
</p>
154 <li> <p> You need an
<b>rmail
</b> program that extracts the sender
155 address from mail that arrives via UUCP, and that feeds the mail
156 into the Postfix
<b>sendmail
</b> command. Most UNIX systems come
157 with an
<b>rmail
</b> utility. If you're in a pinch, try the one
158 bundled with the Postfix source code in the
<b>auxiliary/rmail
</b>
161 <li> <p> Specify that all remote mail must be sent via the
<b>uucp
</b>
162 mail transport to your UUCP gateway host, say,
<i>uucp-gateway
</i>:
</p>
165 /etc/postfix/main.cf:
166 relayhost = uucp-gateway
167 default_transport = uucp
170 <p> Postfix
2.0 and later also allows the following more succinct form:
</p>
173 /etc/postfix/main.cf:
174 default_transport = uucp:uucp-gateway
177 <li> <p> Define a pipe(
8) based message delivery transport for mail
178 delivery via UUCP:
</p>
181 /etc/postfix/master.cf:
182 uucp unix - n n - - pipe
183 flags=F user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
186 <p> This runs the
<b>uux
</b> command to place outgoing mail into
187 the UUCP queue. It substitutes the next-hop hostname (
<i>uucp-gateway
</i>,
188 or whatever you specified) and the recipients before executing the
189 command. The
<b>uux
</b> command is executed without assistance
190 from the shell, so there are no problems with shell meta characters.
193 <li> <p> Execute the command
"<b>postfix reload</b>" to make the
194 changes effective.
</p>