Q1501

Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions
Clone this wiki locally

Q1501

Question

The MX records for some UUCP domains point to my local host. How do I get it to pass the messages on to UUCP?

Answer

The simplest way is to create a file containing a list of domains, and the hosts to which their messages should be sent, like this:

uucp1.domain.example:   uucp1.host.example
uucp2.domain.example:   uucp2.host.example
....

Then you can use a router like this:

uucp_router:
  driver = accept
  domains = lsearch;/etc/uucp/domains
  transport = uucp_transport

and a transport like this:

uucp_transport:
  driver = pipe
  user = nobody
  command = /usr/local/bin/uux - -r $domain_data!rmail $local_part
  return_fail_output

The $domain_data variable retains the value that is looked up when the domains option in the router is matched.