Exim does not have any specific code for transporting mail via UUCP, nor does it support UUCP bang path addresses. However, if domain addressing is being used, Exim can be interfaced to UUCP fairly simply. Here is a configuration fragment for sending certain domains to UUCP, taken from a real installation:
# Transport uucp: driver = pipe user = nobody command = "/usr/local/bin/uux -r - \ ${substr_-5:$host}!rmail ${local_part}" return_fail_output = true # Router uucphost: transport = uucp driver = domainlist route_file = /usr/exim/uucphosts search_type = lsearch |
In a complete configuration file, the transport would be inserted among the other transports, and the router probably defined as the first router. The file /usr/exim/uucphosts contains entries like this:
darksite.example.com: darksite.UUCP |
Whenever the router comes across a domain that is in the route file, it will send the address to the UUCP transport, which subsequently pipes it to the uux command (described in Chapter 16). If there is a problem, uux will generate some output and terminate with a non-zero error code. The setting of return_fail_output makes sure that the output is returned to the sender.
If incoming UUCP messages are grouped into files in batched SMTP format, they can be passed directly to Exim using a command like this:
exim -bS </var/uucp/incoming/001 |
However, there is one catch. When Exim receives a message locally, it insists that the sender is the logged-in user that calls it, but for a UUCP batch we want the senders to be taken from the incoming messages. Exim will do this if the process that calls it is running as a trusted user. If you arrange for incoming UUCP to be handled by a user called uucp, for example, you need to specify:
trusted_users = uucp |