Home | History | Annotate | Line # | Download | only in html
      1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
      2         "https://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
     24 is a practical option for sites without permanent Internet connections,
     25 and for sites without a fixed IP address. For first-hand information,
     26 see the following guides: </p>
     27 
     28 <ul>
     29 
     30 <li> Jim Seymour's guide for using UUCP over TCP at
     31 <a href="https://jimsun.LinxNet.com/jdp/uucp_over_tcp/index.html">https://jimsun.LinxNet.com/jdp/uucp_over_tcp/index.html</a>,
     32 
     33 <li> Craig Sanders's guide for SSL-encrypted UUCP over TCP
     34 using stunnel at <a href="http://taz.net.au/postfix/uucp/">http://taz.net.au/postfix/uucp/</a>.
     35 
     36 </ul>
     37 
     38 Here'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>
     47 UUCP<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>
     52 to 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
     65 gateway</a>
     66 
     67 <li><a href="#lan-uucp">Setting up a Postfix LAN to UUCP
     68 gateway</a>
     69 
     70 </ul>
     71 
     72 <h2><a name="internet-uucp">Setting up a Postfix Internet to UUCP
     73 gateway</a></h2>
     74 
     75 <p> Here is how to set up a machine that sits on the Internet and
     76 that forwards mail to a LAN that is connected via UUCP. See
     77 the <a href="#lan-uucp">LAN to UUCP gateway</a> section for
     78 the other side of the story. </p>
     79 
     80 <ul>
     81 
     82 <li> <p> You need an <b>rmail</b> program that extracts the sender
     83 address from mail that arrives via UUCP, and that feeds the mail
     84 into the Postfix <b>sendmail</b> command.  Most UNIX systems come
     85 with an <b>rmail</b> utility. If you're in a pinch, try the one
     86 bundled with the Postfix source code in the <b>auxiliary/rmail</b>
     87 directory. </p>
     88 
     89 <li> <p> Define a <a href="pipe.8.html">pipe(8)</a> based mail delivery transport for delivery
     90 via UUCP: </p>
     91 
     92 <pre>
     93 /etc/postfix/<a href="master.5.html">master.cf</a>:
     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
     99 the UUCP queue after replacing $nexthop by the next-hop hostname
    100 (the receiving UUCP host) and after replacing $recipient by the
    101 recipients.  The <a href="pipe.8.html">pipe(8)</a> delivery agent executes the <b>uux</b>
    102 command without assistance from the shell, so there are no problems
    103 with shell meta characters in command-line parameters.  </p>
    104 
    105 <li> <p> Enable <b>transport</b> table lookups: </p>
    106 
    107 <pre>
    108 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
    109     <a href="postconf.5.html#transport_maps">transport_maps</a> = <a href="lmdb_table.5.html">lmdb</a>:/etc/postfix/transport
    110 </pre>
    111 
    112 <li> <p> Specify that mail for <i>example.com</i>, should be
    113 delivered via UUCP, to a host named <i>uucp-host</i>: </p>
    114 
    115 <pre>
    116 /etc/postfix/transport:
    117     example.com     uucp:uucp-host
    118     .example.com    uucp:uucp-host
    119 </pre>
    120 
    121 <p> Instead of <a href="lmdb_table.5.html">lmdb</a>:, some systems use <a href="CDB_README.html">cdb</a>:, <a href="DATABASE_README.html#types">hash</a>:, or <a href="DATABASE_README.html#types">dbm</a>:. </p>
    122 
    123 <p> See the <a href="transport.5.html">transport(5)</a> manual page for more details. </p>
    124 
    125 <li> <p> Execute the command "<b>postmap /etc/postfix/transport</b>"
    126 whenever you change the <b>transport</b> file, to (re)build a
    127 default-type indexed file. Execute "<b>postmap
    128 <i>type</i>:/etc/postfix/transport</b>" to specify an explicit type.
    129 </p>
    130 
    131 <p> The default indexed file type is configured with the
    132 <a href="postconf.5.html#default_database_type">default_database_type</a> parameter. To list available explicit types, 
    133 execute the command "<b>postconf -m</b>".</p>
    134 
    135 <li> <p> Add <i>example.com</i> to the list of domains that your site
    136 is willing to relay mail for. </p>
    137 
    138 <pre>
    139 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
    140     <a href="postconf.5.html#relay_domains">relay_domains</a> = example.com ...<i>other <a href="ADDRESS_CLASS_README.html#relay_domain_class">relay domains</a></i>...
    141 </pre>
    142 
    143 <p> See the <a href="postconf.5.html#relay_domains">relay_domains</a> configuration parameter description for
    144 details. </p>
    145 
    146 <li> <p> Execute the command "<b>postfix reload</b>" to make the
    147 changes effective. </p>
    148 
    149 </ul>
    150 
    151 <h2><a name="lan-uucp">Setting up a Postfix LAN to UUCP
    152 gateway</a></h2>
    153 
    154 <p> Here is how to relay mail from a LAN via UUCP to the
    155 Internet. See the <a href="#internet-uucp">Internet to UUCP
    156 gateway</a> section for the other side of the story. </p>
    157 
    158 <ul>
    159 
    160 <li> <p> You need an <b>rmail</b> program that extracts the sender
    161 address from mail that arrives via UUCP, and that feeds the mail
    162 into the Postfix <b>sendmail</b> command.  Most UNIX systems come
    163 with an <b>rmail</b> utility. If you're in a pinch, try the one
    164 bundled with the Postfix source code in the <b>auxiliary/rmail</b>
    165 directory. </p>
    166 
    167 <li> <p> Specify that all remote mail must be sent via the <b>uucp</b>
    168 mail transport to your UUCP gateway host, say, <i>uucp-gateway</i>: </p>
    169 
    170 <pre>
    171 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
    172     <a href="postconf.5.html#relayhost">relayhost</a> = uucp-gateway
    173     <a href="postconf.5.html#default_transport">default_transport</a> = uucp
    174 </pre>
    175 
    176 <p> Postfix 2.0 and later also allows the following more succinct form: </p>
    177 
    178 <pre>
    179 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
    180     <a href="postconf.5.html#default_transport">default_transport</a> = uucp:uucp-gateway
    181 </pre>
    182 
    183 <li> <p> Define a <a href="pipe.8.html">pipe(8)</a> based message delivery transport for mail
    184 delivery via UUCP: </p>
    185 
    186 <pre>
    187 /etc/postfix/<a href="master.5.html">master.cf</a>:
    188     uucp      unix  -       n       n       -       -       pipe
    189       flags=F user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    190 </pre>
    191 
    192 <p> This runs the <b>uux</b> command to place outgoing mail into
    193 the UUCP queue. It substitutes the next-hop hostname (<i>uucp-gateway</i>,
    194 or whatever you specified) and the recipients before executing the
    195 command.  The <b>uux</b> command is executed without assistance
    196 from the shell, so there are no problems with shell meta characters.
    197 </p>
    198 
    199 <li> <p> Execute the command "<b>postfix reload</b>" to make the
    200 changes effective. </p>
    201 
    202 </ul>
    203 
    204 </body>
    205 
    206 </html>
    207