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