Tài liệu TCP/IP Network Administration- P15 ppt

50 260 0
Tài liệu TCP/IP Network Administration- P15 ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[Appendix E] E.2 The sendmail Command The remaining arguments are rarely used on the command line: -B Indicates the MIME message body type. Acceptable values are either 7BIT or 8BITMIME. -N Requests that the sender be notified of the delivery status of the mail. The default value is FAILURE, DELAY, which notifies the sender when mail delivery fails or is delayed in the queue. Other acceptable values are NEVER, to request that no status notifications be returned to the sender, and SUCCESS, to request notification of successful mail delivery. -M Sets a macro value for this instantiation of sendmail. For example, -MMnuts.com sets macro M to nuts.com. -p Sets the sending protocol and the sending host. This is equivalent to setting the internal s and r macros. If a system has more than one external mail protocol, for example, UUCP and SMTP, this forces the system to use a specific protocol for this piece of mail. -R Sets the amount of information returned to the sender when a message cannot be delivered. This can be either HDRS for headers-only or FULL for the headers and the full message body. -U Indicates that this mail comes directly from a user interface and was not forwarded from a remote mail handler. At this writing this argument is not yet used, but in the future user agent programs may include it when they pass mail to sendmail. -V Inserts an "envelop id" into the outbound message that is returned if message delivery fails. -X Logs all mail messages to the specified log file. This rapidly produces an enormous log file. -n Disables the processing of aliases and mail forwarding. -bm Tells sendmail to deliver mail, which it will do anyway. -ba Reads the header From: line to find the sender. Uses three digit reply codes, and ends error lines with <CRLF>. This is an obsolete argument. file:///C|/mynapster/Downloads/warez/tcpip/appe_02.htm (4 of 5) [2001-10-15 09:19:29] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix E] E.2 The sendmail Command -bs Tells sendmail to use SMTP for incoming mail. When appropriate, sendmail will do this even without the -bs argument. -i Normally, an SMTP message terminates when a line containing only a dot is encountered. This argument tells sendmail to ignore the dots in incoming messages. -m Sends a copy of the mail to the person sending the mail. Normally this is done with a CC: or BCC: header in the message, not with the -m argument. This is a complete list of sendmail command-line arguments at this writing. Some of these arguments were introduced in sendmail 8. Others are considered obsolete in sendmail V8. Check the manpage for your system to find out exactly what arguments are available on your system. When the sendmail command is executed, it reads its configuration from the sendmail.cf file. A basic sendmail.cf file can be built from m4 macros that come with the sendmail source code. Chapter 10 provides examples of how this is done. The next section provides a complete list of the m4 macros that come with the sendmail distribution. Previous: E.1 Compiling sendmail TCP/IP Network Administration Next: E.3 m4 sendmail Macros E.1 Compiling sendmail Book Index E.3 m4 sendmail Macros [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] file:///C|/mynapster/Downloads/warez/tcpip/appe_02.htm (5 of 5) [2001-10-15 09:19:29] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix E] E.3 m4 sendmail Macros Previous: E.2 The sendmail Command Appendix E A sendmail Reference Next: E.4 More sendmail.cf E.3 m4 sendmail Macros The sendmail distribution comes with several sample configuration files. Chapter 10 provides an example of how the tcpproto.mc file is modified to produce a configuration file suitable for a Linux system. The prototype files are m4 macro configuration files that produce useable sendmail.cf files as output. The prototype files are located in the sendmail/cf/cf directory of the sendmail distribution. All of the m4 macro configuration files end with the .mc file name extension. The .mc files can be composed of the following m4 macros: [1] [1] The macro commands are listed in the order they would occur in the configuration file. VERSIONID Defines the version number of the .mc source file. RCS or SCCS version numbers are commonly used. This command is optional. OSTYPE Points to the m4 source file that contains the operating system-specific information for this configuration. This is required. DOMAIN Points to the m4 source file that contains configuration information specific to this domain. This is optional. FEATURE Points to an m4 source file that defines an optional sendmail feature. This is not required for m4 to process the .mc source file, but many configurations have multiple FEATURE entries. HACKS Points to an m4 source file that contains site-specific configuration information. This is a temporary configuration used to fix a temporary problem. The use of HACKS is discouraged. SITECONFIG file:///C|/mynapster/Downloads/warez/tcpip/appe_03.htm (1 of 21) [2001-10-15 09:19:31] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix E] E.3 m4 sendmail Macros Points to a source file that contains m4 SITE commands that define the UUCP sites connected to this host. The format of the command is: SITECONFIG(file, local-hostname, class), which reads the UUCP hostnames from file into class. define Defines a local value. Most "defines" are done in the m4 source files that are called by the .mc file, not in the .mc file itself. It can define a value for a sendmail.cf macro, option, or other command. MAILER Points to an m4 source file that contains the configuration commands that define a sendmail mailer. A least one MAILER command must appear in the configuration file. Generally more than one MAILER command is used. LOCAL_RULE_n Heads a section of code to be added to ruleset n, where n is 0, 1, 2, or 3. The code that follows the LOCAL_RULE_n command is composed of standard sendmail.cf rewrite rules. [2] The LOCAL_RULE_n command is rarely used. [2] The one exception to this is the UUCPSMTP macro that can be used in the local rule. See the New sendmail Configuration Files document that come with the sendmail V8 distribution if you have questions about UUCP configuration. LOCAL_CONFIG Heads a section of code to be added to the sendmail.cf file after the local information section and before the rewrite rules. The section of code contains standard sendmail.cf configuration commands. This macro is rarely used. Most of the macros in the .mc file point to other m4 source files. The macro names OSTYPE, DOMAIN, FEATURE, MAILER, HACKS, and SITECONFIG are all names of subdirectories within the sendmail/cf directory. The value passed to each of these macros is the name of a file within the specified directory. For example, the command FEATURE(nouucp) tells m4 to load the file nouucp.m4 from the feature directory and process the m4 source code found there. The real meat of the sendmail configuration is contained in the source files pointed to by the OSTYPE, DOMAIN, FEATURE, and MAILER commands. The macro commands HACK, SITECONFIG, LOCAL_RULE_n, and LOCAL_CONFIG are rarely used in a macro configuration file. To simplify this appendix, we do not mention them again. [3] Likewise, for the sake of simplicity we avoid discussing UUCP configuration and concentrate on SMTP. Still, m4 configuration can appear to be enormously complex. Please remember that this appendix is a reference, and as such lists as many of the m4 macros as possible. Most of these you will never need to use. Refer to Chapter 10 for a realistic example of how m4 is used to build a sendmail.cf file. file:///C|/mynapster/Downloads/warez/tcpip/appe_03.htm (2 of 21) [2001-10-15 09:19:31] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix E] E.3 m4 sendmail Macros [3] To see examples of some of these commands, look at the ucbvax.mc sample file that comes with the sendmail V8 distribution. In the following section we provide additional information about the OSTYPE, DOMAIN, FEATURE, and MAILER macros and details of the various commands used to build the m4 source files they call. Chapter 10 provides an example of building a custom DOMAIN macro source file. The source files can contain any of the macros we have already mentioned as well as the additional ones documented below. The macro configuration (.mc) file also can contain any of the commands documented below. In fact, pretty much any macro can appear in any file. To bring some order out of this chaos, we have organized the commands according to the files they are most likely to appear in, which is similar to the organization found in the documentation that comes with sendmail distribution. Just remember, actual implementation files may have a different organization. We start by examining the define macros and the FEATURE macros that are the primary building blocks of all the other files. E.3.1 define The syntax of the define macro is: define('parameter', 'value') Where parameter is the keyword name of a sendmail configuration parameter and value is the value assigned to that configuration parameter. The parameter and the value are normally enclosed in single quotes to prevent inappropriate macro expansion. Many of the configuration parameters that can be set using the define command are shown below. Most of the parameters correspond to sendmail options, macros, or classes. The name of the option, macro, or class set by the parameter is listed in the parameter description enclosed in square brackets ([]). Macro names begin with a dollar sign ($j), class names begin with a dollar sign and an equal sign ($=w), and options are shown with long option names (SingleThreadDelivery). To find out more about these parameters, see the descriptions of the macros, options, and classes they represent that are provided later in this appendix. Because many define parameters are equivalent to options, macros, and classes, the command: define('confDOMAIN_NAME', 'peanut.nuts.com') placed in an m4 source file has the same effect as: Djpeanut.nuts.com placed directly in the sendmail.cf file. If you compile and install a new version of sendmail, build your configuration with m4 and set values for macros, classes, and options with the m4 define macro. file:///C|/mynapster/Downloads/warez/tcpip/appe_03.htm (3 of 21) [2001-10-15 09:19:31] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix E] E.3 m4 sendmail Macros The list of define parameters is quite long. However, because most of the parameters default to a reasonable value they do not have to be explicitly set in the m4 source file. The default value of each parameter is shown in the listing - unless there is no default. confMAILER_NAME Default is MAILER-DAEMON. The sender name used on error messages. [$n] confDOMAIN_NAME The full hostname. [$j] confCF_VERSION The configuration file's version number. [$Z] confFROM_HEADER Default is $?x$x <$g>$|$g$. . The From: header format. confRECEIVED_HEADER Default is $?sfrom $s $.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b . The Received: header format. confCW_FILE Default is /etc/sendmail.cw. The file of local host aliases. [$=w] confCT_FILE Default is /etc/sendmail.ct. The file of trusted usernames. [$=t] confTRUSTED_USERS Trusted users name to add to root, uucp, and daemon. confSMTP_MAILER Default is esmtp. The mailer used for SMTP connections; must be smtp, smtp8, or esmtp. confUUCP_MAILER Default is uucp-old. The default UUCP mailer. confLOCAL_MAILER Default is local. The mailer used for local connections. confRELAY_MAILER Default is relay. The default mailer name for relaying. confSEVEN_BIT_INPUT Default is False. Force input to seven bits. [SevenBitInput] file:///C|/mynapster/Downloads/warez/tcpip/appe_03.htm (4 of 21) [2001-10-15 09:19:31] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix E] E.3 m4 sendmail Macros confEIGHT_BIT_HANDLING Default is pass8. Defines how 8-bit data is handled. [EightBitMode] confALIAS_WAIT Default is 10m. The amount of time to wait for alias file rebuild. [AliasWait] confMIN_FREE_BLOCKS Default is 100. The minimum number of free blocks on the queue filesystem that must be available to accept SMTP mail. [MinFreeBlocks] confMAX_MESSAGE_SIZE Default is infinite. The maximum message size. [MaxMessageSize] confBLANK_SUB The character used to replace unquoted blank characters in email addresses. [BlankSub] confCON_EXPENSIVE Default is False. Tells system to hold mail bound for mailers that have the e flag set until the next queue run. [HoldExpensive] confCHECKPOINT_INTERVAL Default is 10. Tells system to checkpoint the queue files after this number of queued items are processed. [CheckpointInterval] confDELIVERY_MODE Default is background. Sets the default delivery mode. [DeliveryMode] confAUTO_REBUILD Default is False. Automatically rebuilds alias file. [AutoRebuildAliases] confERROR_MODE Default is print. Defines how errors are handled. [ErrorMode] confERROR_MESSAGE Points to a file containing a message that is prepended to error messages. [ErrorHeader] confSAVE_FROM_LINES Tells system not to discard UNIX From: lines. They are discarded if this is not set. [SaveFromLine] confTEMP_FILE_MODE Default is 0600. File mode for temporary files. [TempFileMode] confMATCH_GECOS file:///C|/mynapster/Downloads/warez/tcpip/appe_03.htm (5 of 21) [2001-10-15 09:19:31] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix E] E.3 m4 sendmail Macros Tells system to match the email username to the GECOS field. This match is not done if this is not set. [MatchGECOS] confMAX_HOP Default is 25. The counter used to determine mail loops. [MaxHopCount] confIGNORE_DOTS Default is False. Tells system to ignore dots in incoming messages. [IgnoreDots] confBIND_OPTS Default is undefined. Sets options for DNS resolver. [ResolverOptions] confMIME_FORMAT_ERRORS* Default is True. Tells system to send MIME-encapsulated error messages. [SendMimeErrors] confFORWARD_PATH Default is $z/.forward.$w:$z/.forward. Places to search for .forward files. [ForwardPath] confMCI_CACHE_SIZE Default is 2. The number of open connections that can be cached. [ConnectionCacheSize] confMCI_CACHE_TIMEOUT Default is 5m. The amount of time inactive open connections are held in the cache. [ConnectionCacheTimeout] confHOST_STATUS_DIRECTORY Directory in which host status is saved. [HostStatusDirectory] confUSE_ERRORS_TO* Default is False. Delivers errors using the Errors-To: header. [UserErrorsTo] confLOG_LEVEL Default is 9. Level of detail for the logfile. [LogLevel] confME_TOO Default is False. Sends a copy to the sender. [MeToo] confCHECK_ALIASES Default is False. Looks up every alias during alias file build. [CheckAliases] confOLD_STYLE_HEADERS* Default is True. Treats headers without special chars as old style. [OldStyleHeaders] confDAEMON_OPTIONS file:///C|/mynapster/Downloads/warez/tcpip/appe_03.htm (6 of 21) [2001-10-15 09:19:31] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix E] E.3 m4 sendmail Macros SMTP daemon options. [DaemonPortOptions] confPRIVACY_FLAGS Default is authwarnings. These flags restrict the use of some mail commands. [PrivacyOptions] confCOPY_ERRORS_TO Address to receive copies of error messages. [PostmasterCopy] confQUEUE_FACTOR Default is 600000. Used to calculate when a loaded system should queue mail instead of attempting delivery. [QueueFactor] confDONT_PRUNE_ROUTES Default is False. Don't prune route-addresses to the minimum possible. [DontPruneRoutes] confSAFE_QUEUE Create a queue file, then attempt delivery. This is not done unless this paramter is specified. [SuperSafe] confTO_INITIAL Default is 5m. Maximum time to wait for the initial connect response. [Timeout.initial] confTO_CONNECT Default is 0. Maximum time to wait for a connect to complete. [Timeout.connect] confTO_ICONNECT Maximum time to wait for the very first connect attempt to a host. [Timeout.iconnect] confTO_HELO Default is 5m. Maximum time to wait for a HELO or EHLO response. [Timeout.helo] confTO_MAIL Default is 10m. Maximum time to wait for a MAIL command response. [Timeout.mail] confTO_RCPT Default is 1h. Maximum time to wait for a RCPT command response. [Timeout.rcpt] confTO_DATAINIT Default is 5m. Maximum time to wait for a DATA command response. [Timeout.datainit] confTO_DATABLOCK Default is 1h. Maximum time to wait for a block during DATA phase. [Timeout.datablock] confTO_DATAFINAL file:///C|/mynapster/Downloads/warez/tcpip/appe_03.htm (7 of 21) [2001-10-15 09:19:31] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix E] E.3 m4 sendmail Macros Default is 1h. Maximum time to wait for a response to the terminating ".". [Timeout.datafinal] confTO_RSET Default is 5m. Maximum time to wait for a RSET command response. [Timeout.rset] confTO_QUIT Default is 2m. Maximum time to wait for a QUIT command response. [Timeout.quit] confTO_MISC Default is 2m. Maximum time to wait for other SMTP command responses. [Timeout.misc] confTO_COMMAND Default is 1h. Maximum time to wait for a command to be issued. [Timeout.command] confTO_IDENT Default is 30s. Maximum time to wait for an IDENT query response. [Timeout.ident] confTO_FILEOPEN Default is 60s. Maximum time to wait for a file open. [Timeout.fileopen] confTO_QUEUERETURN Default is 5d. Time until a message is returned from the queue as undeliverable. [Timeout.queuereturn] confTO_QUEUERETURN_NORMAL "Undeliverable" timeout for normal priority messages. [Timeout.queuereturn.normal] confTO_QUEUERETURN_URGENT "Undeliverable" timeout for urgent priority messages. [Timeout.queuereturn.urgent] confTO_QUEUERETURN_NONURGENT "Undeliverable" timeout for low priority messages. [Timeout.queuereturn.non-urgent] confTO_QUEUEWARN Default is 4h. Time until a "still queued" warning is sent about a message. [Timeout.queuewarn] confTO_QUEUEWARN_NORMAL Time until a "still queued" warning is sent for normal priority messages. [Timeout.queuewarn.normal] confTO_QUEUEWARN_URGENT Time until a "still queued" warning is sent for urgent priority messages. [Timeout.queuewarn.urgent] file:///C|/mynapster/Downloads/warez/tcpip/appe_03.htm (8 of 21) [2001-10-15 09:19:31] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [...]... sendmail.cf file The bulk of information about sendmail.cf is found in Chapter 10 Previous: E.2 The sendmail Command E.2 The sendmail Command TCP/IP Network Administration Next: E.4 More sendmail.cf Book Index E.4 More sendmail.cf [ 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... servers mentioned in the "DOMAIN" section of this appendix Selecting local and smtp provides everything you need for a standard TCP/IP installation Of all the remaining mailers, only uucp is widely used uucp provides UUCP mail support for systems directly connected to UUCP networks The uucp-old mailer supports standard UUCP mail and the uucp-new mailer is used for remote sites that can handle multiple... the hostnames of systems that need the old mailer and class Y for the names of remote systems that can work with the new mailer Specify MAILER(uucp) after the MAILER(smtp) entry if your system has both TCP/IP and UUCP connections Ordering the MAILER statements in this way adds two more mailers to the two standard UUCP mailers: the uucp-dom mailer to support standard domain names, and the uucp-uudom mailer... E.3 m4 sendmail Macros does not provide procmail Even when procmail is used as the local mailer, as it is in Slackware Linux, the MAILER(procmail) command is not required mail11 Only used on DECNET mail networks that use the mail11 mailer phquery Provides a name lookup program for the CSO phone book (ph) directory service User directory services are usually configured in the user mail agent, not in sendmail... Several of the FEATURE macros actually remove features from the sendmail.cf file instead of adding them nouucp removes the code to handle UUCP addresses for systems that do not have access to UUCP networks, and nodns removes the code for DNS lookups for systems that do not have access to DNS nocanonify, which is rarely used, disables the $[name]$ syntax that converts nicknames and IP addresses;... number It can be specified with the number or the name found in /etc/services The default is port 25, smtp Addr=mask, where mask is an IP address mask specified either in dotted decimal notation or as a network name The default is INADDR-ANY, which accepts all addresses Family=addressfamily, where addressfamily is a valid address family (see the ifconfig command) The default is INET, which allows IP addresses... delivery), b (background delivery), q (queue the message), or d (defer until the queue run) The default is b DialDelay=delaytime Delay delaytime seconds before redialing a failed connection on dial-on-demand networks The default is 0 (no redial) DontExpandCnames Disable the $[name$] syntax used to convert nicknames to canonical names DontInitGroups Don't use the initgroups(3) call This setting reduces NIS... and finally the hosts file If the operating system has a built-in service switch feature, it is used and this option is ignored See the description of the nsswitch.conf file in Chapter 9, Configuring Network Servers It is a service switch file SevenBitInput Strip input to 7 bits for compatibility with old systems This shouldn't be necessary SingleLineFromHeader For compatibility with some versions... file I Use the BIND name server to resolve all hostnames i Ignore dots in incoming messages Ln Set the level of logging to n Mxval Set macro x to val m Send to me, too Nnet Define the name of the home network o Accept old format headers Qdir Define the name of the queue directory qn Define a factor n used to decide when to queue jobs rt Set interval t for read timeout Sfile Define the name of the statistics . TCP/IP Network Administration Next: E.3 m4 sendmail Macros E.1 Compiling sendmail Book Index E.3 m4 sendmail Macros [ Library Home | DNS & BIND | TCP/IP. the code to handle UUCP addresses for systems that do not have access to UUCP networks, and nodns removes the code for DNS lookups for systems that do not

Ngày đăng: 24/12/2013, 03:16

Tài liệu cùng người dùng

Tài liệu liên quan