tutes-dump/site-tutorials/uucp.html

202 lines
5.5 KiB
HTML

<style type="text/css">
@import url('http://sdf.org/tutorials/tutorials.css');
</style>
<h1>Doing UUCP with SDF</h1>
<strong>UUCP</strong> (Unix-to-Unix Copy) is a great way to get your mail and news, even without a stable or static Internet connection.
<ul>
<li>
<a href="#section-1">Request a login</a>
</li>
<li><a href="#section-2">UUCP node configuration</a>
<ul>
<li>
<a href="#taylor-config">Taylor UUCP configuration</a>
</li>
<li>
<a href="#hdb-config">HDB UUCP configuration</a>
</li>
</ul>
</li>
<li>
<a href="#poll-sdf">Poll SDF</a>
</li>
<li>
<a href="#testing">Test settings</a>
</li>
<li><a href="#mta">MTA configuration</a>
<ul>
<li>
<a href="#postfix">Postfix UUCP configuration</a>
</li>
<li>
<a href="#sendmail">Sendmail UUCP configuration</a>
</li>
</ul>
</li>
<li><a href="#notes">Notes</a></li>
</ul>
<h2 id="section-1">Request a login</h2>
<ul>
<li>Know your uuname (run <code>uname -n</code>)</li>
<li>Post a message on <code>&lt;REQUEST&gt;</code></li>
</ul>
<h2 id="section-2">UUCP Node Configuration</h2>
<h3 id="taylor-config">Taylor UUCP</h3>
<p>Configuration files are typically located in <code>/etc/uucp</code>, but
the location varies from OS to OS. In FreeBSD if you installed
<code>freebsd-uucp</code> from ports the configuration files will be at
<code>/usr/local/etc/uucp</code>.</p> <p>The main file you need to edit is the
sys file. A sample of the <code>sys</code> config file you could use is as follows:</p>
<pre><code>
system sdf
alias mx
address uucp.sdf.org
call-login Uusername
call-password Password
time Any
port TCP
chat "" \d\d\r\c login: \d\L word: \P
protocol t
myname your_uname
</code></pre>
<p>You will also need a <code>config</code> file.</p>
<pre><code>
nodename uyour_name
spool /var/spool/uucp
pubdir /var/spool/uucppublic
logfile /var/log/uucp/Log
statfile /var/log/uucp/Stats # The UUCP statistics file
debugfile /var/log/uucp/Debug # The UUCP debugging file
</code></pre>
<p>And a <code>port</code> file.</p>
<pre><code>
port TCP
type tcp
</code></pre>
<h3 id="hdb-config">HDB UUCP</h3>
<p>TODO ...</p>
<h2 id="poll-sdf">How to POLL SDF</h2>
<p>You can poll SDF manually by running <code>uucico sdf</code>, or more
likely for long term useage a cron job running every so often.</p> <p>An
example crontab line for polling every 15 minutes would be:</p>
<pre><code> */15 * * * * /usr/sbin/uucico -s sdf</code></pre>
<h2 id="testing">Testing your config</h2>
<pre><code>uucico -s sdf
uulog -10</code></pre>
<p>Check the log; output like this is a good sign:</p>
<pre><samp>
uucico sdf - (2013-08-09 01:00:05.613221) Login successful
uucico sdf - (2013-08-09 01:00:07.80 3221) Handshake successful (protocol 't')
uucico sdf - (2013-08-09 01:00:07.98 3221) Call complete (2 seconds 0 bytes 0 bps)
</samp></pre>
<h2 id="mta">MTA Configuration</h2>
<h3 id="postfix">Postfix UUCP settings</h3>
<p><code>/etc/mailname</code></p>
<pre><code>uucp_name.natverk.org</code></pre>
<p><code>/etc/postfix/main.cf</code></p>
<pre><code>
myhostname = uucp_name.natverk.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = uucp_name.natverk.org, uucp_name, uucp_name.UUCP.user, host, localhost.localdomain, localhost
default_transport = uucp
relayhost = sdf
relay_transport = uucp
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = ipv4
</code></pre>
<h3 id="sendmail">Sendmail UUCP settings</h3>
<p><code>/etc/mail/sendmail.mc</code></p>
<pre><code>
divert(-1)
divert(0)
VERSIONID(`$patito.ninja uucp sdf 20150425 ecelis$')
OSTYPE(freebsd6)
DOMAIN(generic)
FEATURE(access_db, `hash -o -T<TMPF> /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
dnl UUCP
FEATURE(promiscuous_relay)dnl
FEATURE(accept_unresolvable_domains)dnl
FEATURE(nocanonify)
FEATURE(uucpdomain)
define(`SMART_HOST', `uucp-dom:sdf')
dnl Uncomment the first line to change the location of the default
dnl /etc/mail/local-host-names and comment out the second line.
dnl define(`confCW_FILE', `-o /etc/mail/sendmail.cw')
define(`confCW_FILE', `-o /etc/mail/local-host-names')
dnl Enable for both IPv4 and IPv6 (optional)
DAEMON_OPTIONS(`Name=IPv4, Family=inet')
DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
dnl UUCP
define(`UUCP_RELAY', uucp.sdf.org)
define(`UUCP_MAX_SIZE', 200000)
define(`UUCP_MAILER_PATH', `/usr/local/bin/uux')dnl
define(`confDONT_PROBE_INTERFACES')
MAILER(local)
MAILER(smtp)
dnl UUCP
MAILER(uucp)dnl
Cw uucp_name.UUCP.user
Cw uucp_name.UUCP
divert(-1)
</code></pre>
<p><code>/etc/mail/local-host-names</code></p>
<pre><code>
uucp_name.natverk.org
uucp_name
uucp_name.UUCP.user
host
localhost.localdomain
localhost
</code></pre>
<p><code>/etc/mail/mailertable</code></code>
<pre><code>
sdf.org uucp-dom:sdf
.sdf.org uucp-dom:sdf
.UUCP local:
.UUCP.user local:
. uucp-dom:
</code></pre>
<!--
<h2>Version 7, Waffle BBS and other UUCP configurations</h2> TODO. If you know
how, best you should fill this in.
<h2>Adding USENET news via UUCP</h2> TODO. If you know how, best you should
fill this in.
-->
$Id: uucp.html,v 1.8 2015/04/30 00:28:01 ecelis Exp $