Linux Network Administrator Manual (15) Chapter 15 Sendmail + iDA

zhaozj2021-02-11  196

Linux Network Administrator Manual (15)

2000-07-30 20:11

Publisher: NetBull Readings: 1210 Translation: Zhao Wei GoHigh@shtdu.edu.cn Chapter 15 Sendmail IDA 15.1 Sendmail IDA Overview Some people have said that only have a sendmail.cf file, you are a real UNIX system administrator. Some people say if you try to edit twice like this, then you must be crazy. SenDmail is an incredible functional program. It is also unbelievable to most people. Any procedure with 792 pages (Sendmail, any program published by O'Reilly and Associates) will not be reversed. Sendmail IDA varies, it deletes the need for editing to always concealed Sendmail.cf files and allows managers to define routing and addressing configurations related to sites through relatively easy-to-understand support files called Tables. Switch to Sendmail IDA, save your many working hours and energy. Compared with other mail transport agents, there is almost no more faster and simpler that use Sendmail IDA. Typical work required to run regular UUCP or Internet sites is easy to complete. Usually very difficult configurations have also become simple, easy to establish and maintain. At this time you write this book, the current version Sendmail5.67B IDA1.5 can be obtained from vixen.cso.uiuc.edu by anonymous FTP. Under Linux, its compilation does not require any patch. For all configuration files required for Sendmail IDA source program under Linux, all profiles needed to include in NewSPak-2.2.tar.gz, the compressed file can pass anonymous FTP from Sunsite.Unc.edu / Pub / Linux / system / mail download. 15.2 Profile - Overview Traditional Sendmail is set by a system profile (typical is /etc/sendmail.cf or /usr/lib/sendmail.cf), this file is not any program you have ever seen. Language is similar. Editing the Sendmail.cf file to provide customized performance may be a humble experience. Sendmail IDA makes this pain substantially out of time by making all configuration options. These options are configured by running M4 (a macro handler) or DBM (a database handler) on a plurality of data files via source code. Sendmail.cf files only define the system default performance. In fact, all special custom operations are done through many optional forms, not directly editing Sendmail.cf files. Sendmail all forms are listed in Figure 15.1. Mailertable defines special performance for remote hosts or domains. UUCPXTABLE forces uucp messages to be delivered to hosts with DNS format. Pathtable Defines UUCP BANG-PATHS to the remote host or domain. UUCPRELAYS short circuit path to the famous remote host. GenericFrom converts internal addresses into ordinary addresses visible outside. XALISES converts normal addresses into valid internal addresses / or converts internal addresses into normal addresses. DecnetXTable converts the RFC-822 address to the address of the Decnet. Figure 15.1: Support file for Sendmail. 15.3 Sendmail.cf files The sendmail.cf files for Sendmail IDA do not need to be edited directly, but generated from a local system administrator. Below, we will call it Sendmail.m4. This file contains several definitions and others simply point to the connection to the true workform. Generally, it only needs to be indicated:.

The path name and file name used on the local system. . Site name for E-mail purposes. . Which default mail program (or a sensitive host) is expected. A large number of parameters can be defined to set up the performance of the local site or override the compiled input configuration item. These configuration options are determined in the IDA / CF / Options file in the source code directory. For the minimum configuration Sendmail.m4 file (UUCP or SMTP with all non-local mail is relayed to direct connections) If not, if not, the comment line is not, it can be short to only 10 or 15 lines. 15.3.1 An example file of a Sendmail.m4 below shows the Sendmail.m4 file in the virtual winery VSTOUT. VStout uses SMTP to all hosts on the Winery LAN, and send all other messages of all other destinations through UUCP to its Internet trunk host MORIA. 15.3.2 Typical parameters for Sendmail.m4 Sendmail.m4 files have been needed; others can be omitted if you are lucky enough to be lucky. The following sections describe each item in the Sendmail.m4 example file. Defining paths (items that define paths) DNL #define (libdir, / usr / local / lib / mail) DNL # where all support files Go libdir defines a directory, in this directory, Sendmail

IDA expects to find all configuration files, DNL # --------------------------------- - DNL # (the string 'DNL' Is The M4 Equivalent of Commenting Out a line) DNL # you generally don't want to override libdir from the compiled in paths DNL #define (libdir, / usr / local / lib / mail) dnl # where all support files go define (LOCAL_MAILER_DEF, mailers.linux) dnl # mailer for local delivery define (POSTMASTERBOUNCE) dnl # postmaster gets bounces define (PSEUDODOMAINS, BITNET UUCP) dnl # do not try DNS on these dnl # - -------------------------------------------------- --------- DNL # Define (pseudonyms, vstout.vbrew.com vstout.uucp vbrew.com) DNL # names we're knower by define (default_host, vstout.

Vbrew.com) # urprimary 'name' for mail define (uucpname, vStout) DNL # ur uucp name DNL # DNL # ----------------------- -------------------------------------- Define (uucpnodes, | uuname | sort | uniq) DNL # our uucp neighbors define (BANGIMPLIESUUCP) dnl # make certain that uucp define (BANGONLYUUCP) dnl # make is treated correctly define (RELAY_HOST, moria) dnl # our smart relay host define (RELAY_MAILER, UUCP-A) dnl # via we reach moria UUCP DNL # DNL # --------------------------------------------- ---------------------- DNL # DNL # The Various DBM Lookup Tables DNL # Define (aliases, libdir / aliases) DNL # system aliases define (domaintable, libdir / domaintable) dnl # domainize hosts define (pATHTABLE, LIBDIR / pathtable) dnl # paths database define (GENERICFROM, LIBDIR / generics) dnl # generic from addresses define (mAILERTABLE, LIBDIR / mailertable) dnl # mailers per host or domain define (uUCPXTABLE , Libdir / uucpxtable) DNL # paths to hosts we feed define (uucprelays, libdir / uucprelays) DNL # short-circuit paths DNL # DNL # ------------------------------------------------------------------------------------------------------------ -------------------- DNL # DNL # include the 'REAL' Code That Makes It All Work DNL # (Sendmail) DNL # include. MC) DNL # Required Entry !!! DNL # DNL # ------------- End of sample sendmail.m4 file ------ Figure 15.2: Sendmail.m4 for VSTOUT Example file. Various DBM tables and special local definitions. In a typical execution program release, this is compiled into the SENDMAIL executable, and does not need to be explicitly set in the Sendmail.m4 file. The above example has a leader DNL, ​​which means that the line is basically a notes as information. In order to change the position of the support file to a different place, remove the DNL annotation from above, set the path to the desired location, and rebuild and reset the sendmail.cf file. Definly defining the local mailer defining (local_mailer_def, mailers.

Linux) DNL # MAILER for Local Delvery Many operating systems provide procedures for processing local mail delivery. For many major UNIX variants, typical procedures have already made it into the Sendmail executive program. In Linux, you need to explicitly define the right local mail program because local delivery programs are not necessary to include in the release you have installed. This is made by indicating local_mailr_def in Sendmail.m4 file. For example, in order to provide this service to enable General Deliver programs [1], you should set local_mailr_def to Mailers.Linux. Then, the following file should be installed as mailers.linux in the directory specified by libdir. It explicitly defines the Deliver program in an internal mlocal mail program with an appropriate parameter so that Sendmail can correctly deliver the target for the local system. Unless you are a Sendmail expert, you don't need to change the following example. # - /usr/local/lib/mail/mailers.linux - # (local mailers for use on linux) mlocal, p = / usr / bin / deliver, f = SLSMFDMP, S = 10, r = 25/10, A = DELIVER $ U MPROG, P = / BIN / SH, F = LSDFMEUP, S = 10, R = 10, A = SH -C $ U in sendmail.mc file included in the sendmail.cf file for Deliver A built-in default value. In order to specify it, you can't use the mailers.linux file, but to do the following in your sendmail.m4 file: DNL --- (in sendmail.m4) --- define (local_mailer_def, deliver) DNL # mailer for Local Delivery is unfortunately, sendmail.mc assumes that Deliver is installed in / bin, and for Slackware1.1.1 (which is installed in / usr / bin) is not this. In that case, you must use a link to disguise it or rebuild Deliver from the source code to reside in / bin. DEALING WITH Bounced Mail Define (Postmasterbounce) DNL # Postmaster Gets Bounces Many sites found, confident emails were very important to send and receive in closeness of success rates. Just checking the syslogd (8) log is very helpful, local mail managers often need to observe the title information of the message rebounded back to determine if the mail is not delivered because the user error is also one of the relevant systems. Defining Postmasterbounce will cause a copy of each rebound back and sent to people as a system mail manager (postmaster). Unfortunately, setting this parameter will also cause the text of the message to be sent to the mail administrator Postmaster, which potentially involves the privacy problem of using the email on the system. In general, site mail managers should try their best to strictly legislate (or by using the shell script to delete the contents of the rebound they received), do not read the contents of their own mail. Domain Name Service Related Items Define (PseudodoMain, "Domain Name Service Related Items

BitNet UUCP) DNL # don't try DNS on these Some famous networks are typically referred to in the email address, but they are invalid for DNS. Defining Pseudodomains is an attempt to prevent unnecessary and always failed. Defining Names The Local System Is Known by Defining Names The Local System Is Known By) Define (pseudonyms, vStout.vbrew.com) DNL # Names We're Known By Define (Default_Host, vStout.vbrew.com) DNL # urprimary 'name' for mail is often, the system wants to hide their true identity, as a message for the mail gateway, or to receive and process the address that is addressed to the name of the 'old' name. Pseudonyms specifies a list of all hosts of the local system will receive its mail. DEFAULT_HOST specifies the host name that will appear on the header of the local host. It is important to set this parameter to a valid value, otherwise all returned messages will not be delivered. Associated with UUCP items (UUCP-Related Items) define (UUCPNAME, vstout) dnl # our uucp name define (UUCPNODES, | uuname | sort | uniq) dnl # our uucp neighbors define (BANGIMPLIESUUCP) dnl # make certain that uucp define ( Bangonlyuucp) DNL # Mail is Trated Correctly is often used, and the system uses a name when used for DNS, and the system is used for UUCP. UUCPNAME allows you to define different host names that appear in the outbound UUCP header. UUCPNODES defines commands to return the host name list for the system, and the system is directly connected to the UUCP connection. BangImpliesuucp and BangonlyuCP ensure that messages to UUCP'Bang 'syntax addresses are treated in accordance with UUCP performance instead of today's domain name service used on the Internet. Relay System and Mail Program Define (Relay_host, Moria) DNL # u h h h h a u d 许 系统 w m Moria Via UUCP Many system administrators do not want to ensure their system The work you need to do in all the world's network (and therefore there is also a system). They would rather go to another system that is known to another "Sensitive" system, but not willing. Relay_host defines the UUCP host name of such a sensitive neighboring system. Relay_mailer defines a mail program that is used to relay messages there. Note that setting these parameters will cause your outbound mail to be forwarded to this remote system, which will affect their system's load, this is important. Be sure to make a clear agreement from a remote mail manager before configuring your system as a relay host of a general purpose. DEFINE (AliaS, libdir / aliases) DNL # system aliases define (domaintable, libdir / domaintable) DNL # domainize hosts define (Pathtable,

LIBDIR / pathtable) dnl # paths database define (GENERICFROM, LIBDIR / generics) dnl # generic from addresses define (MAILERTABLE, LIBDIR / mailertable) dnl # mailers per host or domain define (UUCPXTABLE, LIBDIR / uucpxtable) dnl # paths to hosts we Feed Define (uucprelays,

Libdir / uucprelays) DNL # short-circuit paths Use these macros, you can change the location of Sendmail IDA to find various DBM tables, which define the "real" performance of the system. Typically, they remain in libdir is wise. The main sendmail.mc file (sendmail.mc file) include (sendmail.mc) DNL # Required Entry !!! Sendmail IDA author provides a sendmail.mc file, which contains the true "" "" Visceral. Periodically, new versions will issue an error or add new features, but do not need to have a complete version and recompile Sendmail from the source code. Please don't edit this file, this is very important. So those entries really must? When not using any optional DBM table, Sendmail IDA delivers mail by defining default_mailr (maybe RELAY_HOST and RELAY_MAILER) in the Sendmail.m4 file. Sendmail.m4 is used to generate sendmail.cf files. This feature can be easily overwritten through the entry in DomainTable or uuCpxtable. Using domain name service on the Internet, or a site that is only UUCP and uses uucp to forward all mail from a sensitive relay_host, it is likely to do not require any specific form. In fact, all systems should set default_host and pseudonyms macros (this defines the name and alias of the publicly known specification site), and the default_mailer macro. If all just a relay host and relay mail program, you don't need to set these defaults because it is working automatically. UUCP hosts are likely to also set UUCPNAME to their official (formal) uucp name. They may also set radiy_mailer and relay_host, which enables Sensitive-Host Routing by a message relay. The mail transmitter used is defined in the relay_mailer and is usually UUCP-A for the UUCP site. If your site is only SMTP and talks with the 'Domain Name Services', you should change Default_mailer to TCP-A and can also delete the Relay_mailer and the Relay_host line. 15.4 Sendmail IDA Table View Sendmail IDA provides several tables that allow you to overwrite the default settings of Sendmail (indicated in SendMail.m4) and define specific specifications for unique (single) cases, remote systems, and network definitions Behavior, these forms use the DBM after using the Makefile provided with the release. [? ] Most sites will only need few fews if they need to use these tables. If your site doesn't need these tables, then the easiest way is probably to make them a file (using the touch command) and use the default Makefile in libdir instead of editing the Makefile itself. 15.4.1 Mailertable Mailertable Defines special processes for specific hosts according to the remote host or network name. It is often used to select a middle mail relay host or a gateway to a remote network on a site, and specify the specific protocol (UUCP or SMTP) used. UUCP sites usually do not need to use this file. The order is very important. Sendmail reads files from top to bottom and processes the message according to the first rule it matches. So it usually puts a very clear rule on the file.

Part portions, and general rules are placed behind the file. Suppose you want to forward all messages of the Groucho Marx University Computer System through UUCP to a relay host ADA. To do this, you need to have a Mailertable: # (in mailertable) # # forward all mail for the domain .cs.grapo.edu via uucp to ada uucp-a, ada.cs.groucho.edu Assume that you want to send all messages in a larger Groucho.edu domain to a different relay host BIGHUB to perform address resolution and mail delivery. Then the extended Mailertable entry looks very like the following. # (in mailertable) # # Forward all mail for the domain cs.groucho.idu via uucp to ada uucp-a, ada .cs.groucho.idu # # Forward all mail for the domain groucho.edu via uucp to bighub uucp- A, BIGHUB .GROUCHO.EDU is as mentioned above, the order is very important. The above rule order will cause all mail to the .cs.groucho.idu passing through a more general BIGHUB path instead of a determined ADA path that is really desirable. # (In mailertable) # # forward all mail for the domain .groucho.edu via UUCP to bighub UUCP-A, bighub .groucho.edu # # (it is impossible to reach the next line because # the rule above will be matched first UUCP-A, Ada .cs.groucho.edu # In the above mailertable example, the UUCP-A mail program makes sendmail to deliver with the specified header through UUCP. A comma between mail program (MAILER) and remote system notifies it forwarding messages to ADA for address resolution and delivery. The entry in Mailertable has the following format: MAILER DELIMITER RELAYHOST HOST_OR_DOMAIN has some available MAILER. The difference between them is usually in the way of processing addresses. Typical MAILER is TCP-A (address of TCP / IP and Internet), address of TCP-U (TCP / IP and UUCP), UUCP-A (UUCP and INTERNET form). The character of MAILER segments from the left host section is defined on the top of the MAilertable, how to modify the address. It is important to recognize that this will only rewrite the envelope (to go into the remote system). It is not approved to rewrite any part other than the envelope because it is possible to destroy the configuration. ! An exclamation point makes the host name of the recipient before forwarding to MAILER. This symbol can be used when you want to force the email to enter a remote site for configuring an error. The comma does not change the address. The message is forwarded to the specified relay host only by the specified MAILER. : Only in the case where there is an intermediate host between your destination, the colon is used to delete the host name of the recipient. So for Foo! Bar! Joe, Foo will be deleted, and XYZZY! JANE will remain unchanged. 15.4.2 UUCPXTABLE usually, to the message with a full out-of-domain host is delivered by using the Internet Form (SMTP) postal manner using Domain Name Service (DNS), or by the relay host. UUCP

XTable proceeds to deliver the UUCP routing by converting a domain name to a UUCP form. When you are a site or a domain email forwarder, or when you want to send mail by direct and reliable UUCP links without wanting to pass the default MAILER that may be multi-hop, you can This table is often used when sending an email. The UUCP site with the UUCP neighbor dialog with domain mail will use this file to force the mail to deliver the direct UUCP point link between the two systems, not the indirect route through the RELAY_MAILER and RELAY_HOST or by default_mailer. Deliver. Internet sites that do not use uucp dialogs will usually use this uucpxtable. Suppose you provide an email forwarding service for a system called SESAME in a UUCP map in DNS. Then you will need the following entry to force the host's mail to deliver through your direct UUCP connection. # ============== / usr / local / lib / mail / uucpxtable ============= # mail Sent to joe@sesame.com is shutritten to Sesame ! Joe and # there # SESAME SESAME.COM # # ----------------------------------- ---------------------- 15.4.3 pathTable pathTable is used to define a clear route selection to the remote host or network. The PathTable file should use the syntax form of the path alias and sequence in alphabetical order. Two fields on each line must be separated by actual tab tabs, otherwise DBM may have problems. Most systems do not need any PathTable entry. # =============== / usr / local / lib / mail / pathTable =============== # # this is a pathalias-style paths file to let you kick mail to # UUCP neighbors to the direct UUCP path so you do not have to # go the long way through your smart host that takes other traffic # # you want real tabs on each line or m4 might complain # # route mail through one or more intermediate sites to a remote # system using UUCP-style addressing. # sesame! ernie!% s ernie # # forwarding to a system that is a UUCP neighbor of a reachable # internet site. # swim!% S@gcc.groucho.edu swim # # The folowing sends all mail for twoworks through different # Gateway (see the leading '.'?). # in this example, "uugate" and "byte"

Are Specific Systems That Serve # as mail gateway to the .uucp and .bitnet pseudo-domains respectively # %s@uugate.groucho.edu .uucp bye !%S@mail.shift.com .bitNet # ===== ============== end of pathTable ================================= 15.4.4 DomainTable DomainTable is generally used Forced a certain operation after a DNS query occurs. It allows administrators to establish a short-write name for the frequently referenced system or domain by automatically replacing the description name to the appropriate name. It can also be used to replace incorrect hosts or domain names into "correct" information. Most sites will not require any DomainTable entry. # ============= / usr / local / lib / mail / domainTable ================= # zkenhost.corRect.Domain brokernhost. WRONG.DOMAIN # # ============================================= == 15.4.5 Aliases Aliases allows many things to happen:. They provide an email addressing with a short-name or a well-known name to send to one or more people. . They call a program and use the message message as the input of this program. . They send emails to a file. All systems require Postmaster and Mailer-daem alias to be RFC compatible. When defining the program or can write an alias that can be written to the program, pay special attention to security issues, because Sendmail is usually running in SetUID-root. The changes to the AliaSS file will not work immediately, and only after the command # / usr / lib / sendmail -bi is executed, it works after the DBM table established. This can also be done by performing the newaliase command. This command is usually called from the cron. Details about the mail alias can be found from the AliaSES (5) man page. # --------------------- / usr / local / lib / mail / aliases ------------------ - # # demonstrate commonly seen types of aliases # usenet: janet # alias for a person admin: joe, janet # alias for several people newspak-users:: include: / usr / lib / lists / newspak # read recipients from a file changefeed : | / usr / local / lib / gup #

alias that invokes a program complaints: / var / log / complaints # alias that writes mail to a file # # The following two aliases must be present to be RFC-compliant # It is important to have them resolve to 'a person' who. Reads mail routinely. # Postmaster: root # required entry mailer-daem: Postmaster # Required Entry # # ----------------------------- ------------------------------------ 15.4.6 Little useful tables have the following tables, but rarely use. For more information, please refer to the document with the SENDMAIL IDA source code. The UUCPRELAYS UUCPRELAYS file is a path for "short" UUCP to the famous site, rather than using multi-hopular or unreliable route generated by using the Pathalias process UUCP mapping. The genericfrom and xaliases geneRICFrom files automatically hide the username and address of the outside world by converting the local username into a general sender address that does not match the internal username. The associated Xalparse tool automatically generates GenericFrom and AliaSes files, which occurs from a primary xaliases file. DecnetXTable DecnetXTable will be rewritten to the address in the form of the domain address, which is very like DomainTable to rewrite the address of the non-domain address as the SMTP form. 15.5 Installing Sendmail In this section, we will observe how to install a typical Sendmail IDA executive, and discuss what makes it easy to make and normal run. The latest execution program of Linux Sendmail IDA can be obtained from the / pub / linux / system / mail under SunSite.Unc.edu. Even if you have an earlier version of Sendmail, I strongly want you to use the Sendmail5.67b IDA1.5 version, because all Linux requirements have now been in the code of Vanilla and several major security vulnerabilities have been added. These vulnerabilities are present in the previous version of December 1, 1993. If you are from the source code to create Senmail, you should follow the README indication included in the Source Distribution. The latest Sendmail IDA source code is on Vixen.cso.uiuc.edu. To build (compile) Sendmail IDA on Linux, you also need the Linux private profile in newspak-2.2.tar.gz, this file in the / pub / linux / system / mail directory on SunSite.Unc.edu . If you have already installed SMAIL or other mail delivery agents, you may need to remove (or rename) all files from SMAIL for security considerations. 15.5.1 Extracting the Executive Procedure First You must open the Archive file in a safe place: # Gunzip -c sendmail5.65b ida1.5 mailx5.3b.tgz | tar xvf - If you have a " The latest "(" Modern ") TAR (for example, from the nearest SlackWare release), then you can only run tar -zxvf filename.tgz to get the same result. Open this archive file will create a named SEN

Directory for DMAIL5.65B IDA1.5 Mailx5.3b. In this directory, you can find the SENDMAIL IDA complete installer and the Mailx user agent executive. All file paths in this directory correspond to the location where the file should be installed, so gradually use the tar command to move them in the safe: # CD sendmail5.65b ida1.5 mailx5.3b # tar cf -. (CD /; TAR XVVPOOF -) 15.5.2 Creating Sendmail.cf Creating a custom Sendmail.cf file for a site, you must write a sendmail.m4 file, and process it with M4. In / usr / local / lib / mail / cf, you can find a sample file called Sample.m4. Copy it as YourHostName.m4 and edit it to reflect your site. This sample file is set to only a site with only UUCP. And require this site with domainized headers and talk to a sensitive host. I only need to change very little item like this. In this section, I will only give a simple summary for the macros you have to change. For the full description of their functions, see the discussion of Sendmail.m4. Local_mailer_def defines a detailed description of the local message to deliver the MAILER (mail program) file. The function will see "Define the local mail program" above section. Pseudonyms defines all the names you know by your local host. DEFAULT_HOST is placed in your wholly-owned domain name. This name will appear in all outbound emails as your host name. UUCPNAME is placed in your unlimited (absolute) host name. RELAY_HOST and RELAY_MAILER If you use uucp to talk to a sensitive host, set the RELAY_HOST to your 'Sensitive relay' uucp neighbor's name. If you want to have domain titles, use the UUCP-A mail program. DEFAULT_MAILER If you use DNS on the Internet, you should set it to TCP-a. This will notify Sendmail to use TCP-A mail programs that use SMTP to use regular RFC forms in the envelope to deliver mail. Internet site generally does not need to define relay_host or relay_mailer. To create a sendmail.cf file, execute the command # make YourHostName.cf This will process yourHostName.m4 file and create yourHostName.cf. Next, you should test if the configuration file you created is as you want. This will explain in the next two sections. Once you are satisfied with its performance, use the following command to copy it to / etc. # CP YourHostName.cf /etc/sendmail.cf At this time, your Sendmail system has been ready to run. Put the following line into the appropriate startup file (generally /etc/rc.inet2). You can now handle it to make the program start now. # / usr / lib / sendmail -bd -q1h 15.5.3 Test sendmail.cf file Use the -bt flag to call Sendmail to place it in 'Test' mode. The default profile installed on the system is a sendmail.cf file. You can use the -cfilename option to test an alternate file. In the following example, we test VSTOUT.CF, which is generated from the vStout.m4 file shown in Figure 15.2. # / usr / lib / sendmail -bt -cvstout.cf address test mode enter

[NOTE: No Initial Ruleset 3 Call]> The following test ensures that Sendmail can deliver all messages to your system. The results of the test in all situations should be the same and local mailer points to the local system name. First test how the email to the local user is delivered. # / usr / lib / sendmail -bt -cvstout.cf address Test Mode Enter [NOTE: NO Initial Ruleset 3 Call]> 3,0 me Rewrite: RuleSet 3 Input: Me Rewrite: RuleSet 7 Input: Me Rewrite: Ruleset 9 Input : 帖子 帖子 帖子,, ME REWRITE: RuleSet 20 INPUT: <>, Me Rewrite: Ruleset 20 Returns: <>, @ VStout. Vbrew. CoM, Me Rewrite: Ruleset 8 Returns: <>, @ vStout. Vbrew. com, me Rewrite: Ruleset 26 Input : <>, @ VStOut. Vbrew. com, me REWRITE: RuleSet 26 returns: @ # local $ @ vstout. vbrew. com $: me Rewrite: ruleset 0 returns: @ # local $ @ vstout. vbrew. COM $: ME The output shows how the address is handled in the SENDMAIL. The address is passed to various rule sets and analyzes it from these rule, and the wheels call other rule sets and divide it into each component. In our example, we pass the address ME to rule set 3 and 0 (this is the meaning of 3, 0 input before the address). The last line shows the analytical address returned by the rule set 0, contains MAILERs for delivering messages, and host names and usernames given to MAILER. Next, use the UUCP syntax to test the message to a user on your system. # / usr / lib / sendmail -bt -cvstout.cf address test mode enter

[NOTE: No Initial Ruleset 3 Call]> 3,0 VStout! Me Rewrite: RuleSet 3 Input: vStout! Me [...] REWRITE: RULESET 0 RETURns: $ # local $ @ vstout. Vbrew. COM $: ME> Next, use the Internet syntact with your wholly-owned hostname to post a user on your system. # / usr / lib / sendmail -bt -cvstout.cf address test mode enter

[NOTE: No Initial Ruleset 3 Call]> 3,0 me@vstout.vbrew.com Rewrite: RuleSet 3 Input: me @ vstout. Vbrw. Com [...] REWRITE: RuleSet 0 Returns: $ # local $ @ vstout . vbrew. COM $: ME> You should use each name specified in the pseudonyms and default_name parameters in the sendmail.m4 file, repeat the above two tests. Finally, test whether you can post to your relay host. # / usr / lib / sendmail -bt -cvstout.cf address test mode enter

[NOTE: NO Initial Ruleset 3 Call]> 3, 0 Fred@moria.com Rewrite: Ruleset 3 Input: Fred @ Moria. Com Rewrite: Ruleset 7 Input: Fred @ Moria. Com Rewrite: RuleSet 9 Input: Fred @ Moria. Com Ruleset 9 Returns: @ Moria. com Rewrite: Ruleset 7 Returns: <@ Moria. com>, Fred Rewrite: Ruleset 3 Returns: <@ Moria. com>, Fred Rewrite: RuleSet 0 Input: <@ Moria. com>, Fred ReWrite: Ruleset 8 Returns: <@ moria. com>, Fred Rewrite: Ruleset 29 Input: <@ Moria. com>, Fred Rewrite: Ruleset 29 Returns: <@ Moria. com>, Fred Ruleset 26 Input: <@ Moria. com>, Fred Rewrite: Ruleset 25 Input: <@ Moria. com>, Fred Rewrite: Ruleset 25 Returns: <@ Moria. Com>, Fred Rewrite: Ruleset 4 Input: <@ Moria. com>, Fred RewRite: Ruleset 4 Returns: Fred @ Moria. com Rewrite: RuleSet 26 Returns: $ 4 @ Moria. com>, Fred Rewrite: Ruleset 0 Returns: $ # Uucp-a $ @ Moria $: <@ Moria. Com>, fred> 15.5. 4 Integration - Concentrate test Sendmail.cf and various tables so far, you have already checked the email system has expected default performance, and you will be able to send and receive messages with valid addresses. In order to complete the installation, you will also need to create an appropriate DBM table to achieve the desired final result. After you create the various tables you need for your site, you must run Make in the directory containing the table to handle these tables via DBM. If you use UUCP, then you don't need to create in Readme.Linux Any table mentioned in the file. You only need touch these files to make Makefile work smoothly. If you are using UUCP and you have you have any other sites in addition to your Sense Sensitive Hosts, then you need to add uucpxtable entry for each site (otherwise the mail will pass through the Sensitive host. ) And run DBM for modified UUCPXTABLE. First you have to determine that the message through your Relay_host is sent via the relay_mailer. # / usr / lib / sendmail -bt -cvstout.cf address test mode enter

[NOTE: No Initial Ruleset 3 Call]> 3, 0 fred@sesame.com Rewrite: Ruleset 3 Input: Fred @ seesame. Com Rewrite: RuleSet 7 Input: Fred @ seesame. Com Rewrite: Ruleset 9 Input: Fred @ seesame. Com RuleSet 9 Returns: @ seesame. com Rewrite: ruleset 7 returns: <@ seesame: ruleset 3 returns: <@ seesame. com>, fred Rewrite: RuleSet 0 Input: <@ SESAME COM>, FRED REWRITE: RuLeset 8 @ @ sa. com>, Fred Rewrite: Ruleset 29 Input: <@ seesame. com>, Fred Rewrite: Ruleset 29 Returns: <@ seesame: ruleset 26 INPUT: <@ seesame: ruleset 25 INPUT: <@ seesame. com>, Fred Rewrite: ruleset 25 returns: <@ SESame. Com>, Fred ReWrite: Ruleset 4 Input: <@ seesame: ruleset 4 returns: fred @ seesame .com Rewrite: ruleset 26 returns: <@ seesame .com>, Fred Rewrite: Ruleset 0 Returns: $ # Uucp-a $ @ Moria $: <@ seesame. Com >, fred> In addition to relay_host, if you have a UUCP neighbor, you must ensure that the post will have the correct operation. Mail to a UUCP format method to a host with a UUCP dialog must be delivered directly to it (unless you use the DomainTable entry to clearly point not to do this). Suppose the host SWIM is a direct UUCP neighbor. Then enter SEndmail Enter Swim! Fred will produce the following results: # / usr / lib / sendmail -bt -cvstout.cf address test mode enter

[NOTE: No Initial Ruleset 3 Call]> 3, 0 Swim! Fred Rewrite: Ruleset 3 Input: Swim! Fred [... line omitted ...] Rewrite: Ruleset 0 Returns: $ # uucp $ @ swim $: < >, fred> If you have a uucpxtable entry to force UUCP to deliver to a UUCP neighbor (this neighbor is sent to the internet form to send their messages), and you also need to test it. # / usr / lib / sendmail -bt -cvstout.cf address test mode enter [NOTE: No Initial Ruleset 3 Call]> 3,0 Dude@swim.2birds.com Rewrite: RuleSet 3 Input: Dude @ Swim. 2birds .com [... line omitted ...] REWRITE: Ruleset 0 Returns: $ # uucp $ @ swim. 2birds $: <>, Dude> 15.6 Repeatable Mail Processing and Stupid Mail Skills Since We have discussed Sendmail The principle of the configuration, installation and testing of the IDA system, let us take a little more time to look at what will need to do every day in the work administrator. The remote system sometimes interrupts, modem or telephone lines will not pass, due to human factors, the definition of DNS may be incorrect, the network will suddenly lose its role. In these cases, mail managers need to know how to react quickly, effectively, and safely to keep mails from alternate routing until remote system or service providers can resume normal services. The next part of this chapter intends to provide you with the most frequently encountered "email emergency" solutions. 15.6.1 Forwarding the message to a relay host for a specific host or domain forwarding an email to a specified relay system, you usually use Mailertable. For example, in order to forward backwood.org's mail to their UUCP gateway system Backdoor, you have to put the following entries in Mailertable

source:

Linux free pigeon

转载请注明原文地址:https://www.9cbs.com/read-3679.html

New Post(0)