Recipe 3.5 Passing UUCP Mail to a Relay

Problem

You have been asked to configure sendmail to send UUCP mail to a mail relay host that has a direct UUCP connection.

Solution

Create a sendmail configuration containing a UUCP_RELAY define that identifies the mail relay capable of handling UUCP mail. Here is an example:

 dnl Define a relay server for UUCP mail define(`UUCP_RELAY', `uucp.wrotethebook.com') 

Build and reinstall sendmail.cf , and restart sendmail, as described in Recipe 1.8.

Discussion

The UUCP_RELAY define sets the value of the sendmail.cf $Y macro, adds UUCP to class $= P , and adds a rule to the Parse1 ruleset. The new Parse1 rewrite rule sends UUCP mail that cannot be delivered by the local host to the mail relay identified by the $Y macro. If $Y is not defined, sendmail assumes that the local host can deliver all UUCP mail. Class $= P contains a list of pseudodomains (domain names used internally by sendmail), that sendmail does not attempt to look up in DNS. The .UUCP pseudodomain is used by sendmail to mark mail that should be handled as UUCP mail. When mail addressed to the .UUCP pseudodomain hits the new rule in the Parse1 ruleset, the address is rewritten as a mail delivery triple that sends the mail to the UUCP mail relay host defined in macro $Y . A sendmail -bt test shows all of this:

 #  sendmail -bt  ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> >  /parse crab!craig  Cracked address = $g Parsing envelope recipient address canonify           input: crab ! craig Canonify2          input: craig < @ crab . UUCP > Canonify2        returns: craig < @ crab . UUCP . > canonify         returns: craig < @ crab . UUCP . > parse              input: craig < @ crab . UUCP . > Parse0             input: craig < @ crab . UUCP . > Parse0           returns: craig < @ crab . UUCP . > Parse1             input: craig < @ crab . UUCP . > MailerToTriple     input: < uucp . wrotethebook . com > craig < @ crab . UUCP . > MailerToTriple   returns: $# relay $@ uucp . wrotethebook . com $: craig < @ crab .  UUCP . > Parse1           returns: $# relay $@ uucp . wrotethebook . com $: craig < @ crab .  UUCP . > parse            returns: $# relay $@ uucp . wrotethebook . com $: craig < @ crab .  UUCP . > 2                  input: craig < @ crab . UUCP . > 2                returns: craig < @ crab . UUCP . > MasqSMTP           input: craig < @ crab . UUCP . > MasqSMTP         returns: craig < @ crab . UUCP . > final              input: craig < @ crab . UUCP . > final            returns: crab ! craig mailer relay, host uucp.wrotethebook.com, user crab!craig >  /quit  

This test asks sendmail to parse a delivery address written in the traditional UUCP bang format, host ! user . The canonify ruleset rewrites the address into the standard Internet address format and adds the .UUCP pseudodomain. The address continues unchanged until the Parse1 ruleset, which rewrites the address into a mail delivery triple. relay is the mailer used in the triple, and the value retrieved from the $Y macro is the host used in the triple. However, the user address remains in the .UUCP pseudodomain format until the final ruleset, which returns the user address to the UUCP bang format. The effect of all of this is to send bang formatted delivery addresses to the UUCP relay host and to count on that host to deliver the mail.

The UUCP_RELAY is not the only pseudodomain mail relay that can be configured in sendmail. The following defines are also available:


BITNET_RELAY

Identifies a mail relay connected to the BITNET network (an outdated network that you probably will not use).


DECNET_RELAY

Identifies a mail relay host connected to a DECnet network. DECnet is an outdated network technology that was once a product of the Digital Equipment Corporation. You probably will not use this network.


FAX_RELAY

Identifies an email to FAX server.

All of these relays are defined in the same way as the UUCP_RELAY in this recipe. Simply replace the keyword and the name of the relay host in the recipe with the values you require and rebuild the sendmail.cf file. However, none of these defines ” UUCP_RELAY , BITNET_RELAY , DECNET_RELAY , or FAX_RELAY ”are in widespread use. BITNET and DECnet are grossly out of date technologies and should not be used. UUCP carries only a small fraction of global email, and most of that passes transparently through Internet/UUCP gateways using the standard Internet address format. FAX_RELAY is not flexible enough to easily handle the variety of email to FAX servers. FAX server vendors cannot limit their market to those sites that have administrators knowledgeable enough to customize sendmail. For this reason, the vendors usually provide a technique that allows a user to send a FAX without any modifications to sendmail. Of the four defines, UUCP_RELAY is the only one that gets any real use, and thus it is the one covered in this book.

See Also

See the sendmail book for coverage of UUCP_RELAY in 4.5.8, the FAX_RELAY in 4.5.3, the BITNET_RELAY in 21.9.11, and the DECNET_RELAY in 4.5.2.



Sendmail Cookbook
sendmail Cookbook
ISBN: 0596004710
EAN: 2147483647
Year: 2005
Pages: 178
Authors: Craig Hunt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net