Chia sẻ: Thanh Cong | Ngày: | Loại File: PDF | Số trang:50

0
87
lượt xem
22

Mô tả tài liệu

Tham khảo tài liệu 'tcp/ip network administration- p9', công nghệ thông tin, quản trị mạng phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả

Chủ đề:

Bình luận(0)

Lưu

## Nội dung Text: TCP/IP Network Administration- P9

2. file:///C|/mynapster/Downloads/warez/tcpip/ch09_08.htm Previous: 9.7 Mail Servers TCP/IP Network Next: 10. sendmail Administration 9.7 Mail Servers Book Index 10. sendmail [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/ch09_08.htm (2 of 2) [2001-10-15 09:18:35]
3. [Chapter 10] sendmail Previous: 9.8 Summary Chapter 10 Next: 10.2 Running sendmail as a Daemon 10. sendmail Contents: sendmail's Function Running sendmail as a Daemon sendmail Aliases The sendmail.cf File sendmail Configuration Rewriting the Mail Address Modifying a sendmail.cf File Testing sendmail.cf Summary Users have a love-hate relationship with email; they love to use it, and hate when it doesn't work. It's the system administrator's job to make sure it does work. That is the job we tackle in this chapter. sendmail is not the only mail transport program. MMDF (Multichannel Memorandum Distribution Facility) predates sendmail and is still used today. There are also variations of basic sendmail, such as IDA sendmail, that are widely used. But plain sendmail is the most widely used mail transport program, and it's the one we cover. This entire chapter is devoted to sendmail, and an entire book is easily devoted to the subject. [1] In part this is because of email's importance, but it is also because sendmail has a complex configuration. [1] See sendmail, by Costales and Allman (O'Reilly & Associates), for a book-length treatment of sendmail. The variety of programs and protocols used for email complicates configuration and support. SMTP sends email over TCP/IP networks. Another program sends mail between users on the same system. Still another sends mail between systems on UUCP networks. Each of these mail systems - SMTP, UUCP, and local mail - has its own delivery program and its own mail addressing scheme. All of this can cause confusion for mail users and for system administrators. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/ch10_01.htm (1 of 3) [2001-10-15 09:18:35]
5. [Chapter 10] sendmail Previous: 9.8 Summary TCP/IP Network Next: 10.2 Running Administration sendmail as a Daemon 9.8 Summary Book Index 10.2 Running sendmail as a Daemon [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/ch10_01.htm (3 of 3) [2001-10-15 09:18:35]
7. [Chapter 10] 10.2 Running sendmail as a Daemon Previous: 10.1 sendmail's TCP/IP Network Next: 10.3 sendmail Aliases Function Administration 10.1 sendmail's Function Book Index 10.3 sendmail Aliases [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/ch10_02.htm (2 of 2) [2001-10-15 09:18:36]
10. [Chapter 10] 10.3 sendmail Aliases 10.3.1 Personal mail forwarding In addition to the mail forwarding provided by aliases, sendmail allows individual users to define their own forwarding. The user defines her personal forwarding in the .forward file in her home directory. sendmail checks for this file after using the aliases file and before making final delivery to the user. If the .forward file exists, sendmail delivers the mail as directed by that file. For example, say that user kathy has a .forward file in her home directory that contains kathy@podunk.edu. The mail that sendmail would normally deliver to the local user kathy is forwarded to kathy's account at podunk.edu. Use the .forward file for temporary forwarding. Modifying aliases and rebuilding the database takes more effort than modifying a .forward file, particularly if the forwarding change will be short-lived. Additionally, the .forward file puts the user in charge of his own mail forwarding. Mail aliases and mail forwarding are handled by the aliases file and the .forward file. Everything else about the sendmail configuration is handled in the sendmail.cf file. Previous: 10.2 Running TCP/IP Network Next: 10.4 The sendmail.cf sendmail as a Daemon Administration File 10.2 Running sendmail as a Book Index 10.4 The sendmail.cf File Daemon [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/ch10_03.htm (3 of 3) [2001-10-15 09:18:36]
12. [Chapter 10] 10.4 The sendmail.cf File version of sendmail. The tar file can be downloaded via anonymous ftp from ftp.sendmail.org. [6] Login and change to the pub/sendmail directory. This displays a list of the available versions of sendmail. See Appendix E, for an example of downloading and installing the sendmail distribution. [6] Even if your UNIX system comes with its own version of sendmail, obtain the tar file for the useful documentation it contains, e.g., the Sendmail Installation and Operation Guide, by Eric Allman. The sendmail cf/cf directory contains several sample configuration files. Several of these are generic files preconfigured for different operating systems. The cf/cf directory on my system contains generic configurations for BSD, Solaris, SunOS, HP Unix, Ultrix, OSF1, and Next Step. The directory also contains a few prototype files designed to be easily modified and used for other operating systems. We will modify the tcpproto.mc file, which is for systems that have direct TCP/IP network connections and no direct UUCP connections, to run on our Linux system. 10.4.1.1 Building a sendmail.cf with m4 macros The prototype files that come with the sendmail tar are not "ready to run." They must be edited and then processed by the m4 macro processor to produce the actual configuration files. For example, the tcpproto.mc file contains the following macros: divert(0)dnl VERSIONID(@(#)tcpproto.mc 8.5 (Berkeley) 3/23/96') OSTYPE(unknown) FEATURE(nouucp) MAILER(local) MAILER(smtp) These macros are not sendmail commands; they are input for the m4 macro processor. The few lines shown above are the important lines in the tcpproto.mc file. They are preceded by a section of comments, not shown here, that is discarded by m4 because it follows a divert(-1) command, which diverts the output to the "bit bucket." This section of the file begins with a divert(0) command that means these commands should be processed and that the results should be directed to standard output. [7] [7] The dnl option is used to prevent excessive blank lines from appearing in the output file. It affects the appearance, but not the function, of the output file. dnl can appear at the end of any macro command. The VERSIONID macro is used for version control. Usually the value passed in the macro call is a version number in RCS (Release Control System) or SCCS (Source Code Control System) format. This macro is optional and we just ignore it. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/ch10_04.htm (2 of 7) [2001-10-15 09:18:37]
18. file:///C|/mynapster/Downloads/warez/tcpip/ch10_05.htm Previous: 10.4 The Chapter 10 Next: 10.6 Rewriting the sendmail sendmail.cf File Mail Address 10.5 sendmail Configuration Every time sendmail starts up, it reads sendmail.cf. For this reason, the syntax of the sendmail.cf commands is designed to be easy for sendmail to parse - not necessarily easy for humans to read. As a consequence, sendmail commands are very terse, even by UNIX standards. The configuration command is not separated from its variable or value by any spaces. This "run together" format makes the commands hard to read. Figure 10.2 illustrates the format of a command. In the figure, a define macro command assigns the value nuts.com to the macro D. Figure 10.2: A sendmail.cf configuration command Starting with version 8 of sendmail, variable names are no longer restricted to a single character. Long variable names, enclosed in braces, are now acceptable. For example, the define macro shown in Figure 10.2 could be written: D{Domain}nuts.com However, a quick check of the sendmail.cf delivered with my Linux system shows that not a single long variable name was used. The traditional, short variable names are still the most common. This terse syntax can be very hard to decipher, but it helps to remember that the first character on the line is always the command. From this single character you can determine what the command is and therefore its structure. Table 10.1 lists the sendmail.cf commands and their syntax. Table 10.1: sendmail Configuration Commands Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/ch10_05.htm (1 of 13) [2001-10-15 09:18:39]