====== 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.

  * [[#section-1|Request a login]]
  * [[#section-2|UUCP node configuration]]
    * [[#taylor-config|Taylor UUCP configuration]]
    * [[#hdb-config|HDB UUCP configuration]]
  * [[#poll-sdf|Poll SDF]]
  * [[#testing|Test settings]]
  * [[#mta|MTA configuration]]
    * [[#postfix|Postfix UUCP configuration]]
    * [[#sendmail|Sendmail UUCP configuration]]
  * [[#notes|Notes]]

===== 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:

  "
  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
  "

You will also need a "config" file.

  "
  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
  "

And a "port" file.

  "
  port TCP
  type tcp
  "

==== HDB UUCP ====

TODO ...

===== How to POLL SDF =====

You can poll SDF manually by running "uucico sdf", or more likely for long term useage a cron job running every so often.

An example crontab line for polling every 15 minutes would be:

  " */15 * * * * /usr/sbin/uucico -s sdf"

===== Testing your config =====

  "uucico -s sdf
  uulog -10"

Check the log; output like this is a good sign:

  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)

===== MTA Configuration =====

==== Postfix UUCP settings ====

"/etc/mailname"

  "uucp_name.natverk.org"

"/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
  "

==== Sendmail UUCP settings ====

"/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)
  "

"/etc/mail/local-host-names"

  "
  uucp_name.natverk.org
  uucp_name
  uucp_name.UUCP.user
  host
  localhost.localdomain
  localhost
  "

"/etc/mail/mailertable"

  "
  sdf.org			uucp-dom:sdf
  .sdf.org		uucp-dom:sdf
  .UUCP			local:
  .UUCP.user		local:
  .        		uucp-dom:
  "

$Id: uucp.html,v 1.8 2015/04/30 00:28:01 ecelis Exp $