User Tools

Site Tools


doing_uucp_with_sdf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
doing_uucp_with_sdf [2021/03/19 05:23] – created hc9doing_uucp_with_sdf [2024/09/01 20:42] (current) – … hc9
Line 1: Line 1:
 +====== Doing UUCP with SDF ======
 +
 +**UUCP** (Unix-to-Unix Copy) is a great way to get your mail and news, even without a stable or static Internet connection.
 +
 +===== Request a login =====
 +
 +  * Know your uuname (run ''uname -n'')
 +  * Post a message on ''<REQUEST>''
 +
 +===== UUCP Node Configuration =====
 +
 +==== Taylor UUCP ====
 +
 +Configuration files are typically located in ''/etc/uucp'', but the location varies from OS to OS. In FreeBSD if you installed ''freebsd-uucp'' from ports the configuration files will be at ''/usr/local/etc/uucp''.
 +
 +The main file you need to edit is the sys file. A sample of the ''sys'' config file you could use is as follows:
 +
 +<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>
 +
 +You will also need a ''config'' file.
 +
 +<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>
 +
 +And a ''port'' file.
 +
 +<code>
 +
 +  port TCP
 +  type tcp
 +
 +</code>
 +
 +==== HDB UUCP ====
 +
 +TODO …
 +
 +===== How to POLL SDF =====
 +
 +You can poll SDF manually by running ''uucico sdf'', or more likely for long term usage a cron job running every so often.
 +
 +An example crontab line for polling every 15 minutes would be:
 +
 +<code>
 +
 +  */15 * * * * /usr/sbin/uucico -s sdf
 +
 +</code>
 +
 +===== Testing your config =====
 +
 +<code>
 +
 +  uucico -s sdf
 +  uulog -10"
 +
 +</code>
 +
 +Check the log; output like this is a good sign:
 +
 +<code>
 +
 +  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)
 +
 +</code>
 +
 +===== MTA Configuration =====
 +
 +==== Postfix UUCP settings ====
 +
 +''/etc/mailname''
 +
 +<code>
 +
 +  uucp_name.natverk.org
 +
 +</code>
 +
 +''/etc/postfix/main.cf''
 +
 +<file config /etc/postfix/main.cf>
 +
 +  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
 +
 +</file>
 +
 +==== Sendmail UUCP settings ====
 +
 +''/etc/mail/sendmail.mc''
 +
 +<file config /etc/mail/sendmail.mc>
 +
 +  divert(-1)
 +  divert(0)
 +  VERSIONID(`$patito.ninja uucp sdf 20150425 ecelis$')
 +  OSTYPE(freebsd6)
 +  DOMAIN(generic)
 +
 +  FEATURE(access_db, `hash -o -T /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)
 +
 +</file>
 +
 +''/etc/mail/local-host-names''
 +
 +<file config /etc/mail/local-host-names>
 +
 +  uucp_name.natverk.org
 +  uucp_name
 +  uucp_name.UUCP.user
 +  host
 +  localhost.localdomain
 +  localhost
 +
 +</file>
 +
 +''/etc/mail/mailertable''
 +
 +<file config /etc/mail/mailertable>
 +
 +  sdf.org uucp-dom:sdf
 +  .sdf.org uucp-dom:sdf
 +  .UUCP local:
 +  .UUCP.user local:
 +  .        uucp-dom:
 +
 +</file>
 +
 +$Id: uucp.html,v 1.8 2015/04/30 00:28:01 ecelis Exp $ [[http://sdf.org/?tutorials/uucp|Doing UUCP with SDF]] - traditional link (using [[wp>Revision_Control_System|RCS]])