. Internet -UUCP , hostname uucp . - 283 - . /usr/lib/smail/qualify smail, hostname. qualify hostname , . , . , . qualify , hostname . hostname * hostname, , . . , , . , , uucp , qualify. # /usr/lib/smail/qualify, last changed Feb 12, 1994 by janet # * uucp 16. Sendmail + IDA 16.1 Sendmail + IDA , Unix, sendmail.cf . , :-) Sendmail - . . , (Sendmail, O'Reilly and Associats) 792 , . Sendmail + IDA - . sendmail.cf - - 284 - , . sendmail + IDA . , , sendmail + IDA. , , UUCP Internet , . , , . , sendmail5.67b + IDA1.5 FTP vixen.cso.uiuc.edu. , Linux. , , sendmail + IDA, , , Linux newspak-2.2.tar.gz, FTP sunsite.unc.edu /pub/Linux/system/Mail. 16.2 --- sendmail ( /etc/sendmail.cf /usr/lib/sendmail.cf), - , . sendmail.cf , . Sendmail + IDA , , . , m4 ( ) dbm ( ) Make-, . Sendmail.cf . sendmail.cf . - 285 - 16.3 Sendmail.cf Sendmail.cf sendmail + IDA , m4 , . , sendmail.m4. , . , : + , . + . + mailer ( smart host) . , , . ida/cf/OPTIONS . sendmail.m4 (UUCP SMTP - , smart-host) 10 15 , . Mailertable . Uucpxtable UUCP , DNS. Pathtable UUCP . Uucprelays pathalias . Genericfrom , . Xaliases \ . Decnetxtable RFC-822 DECnet-. - 286 - 16.3.1 Sendmail.m4 sendmail.m4 vstout . Vstout SMTP, LAN , moria, host Internet, UUCP. 16.3.2 sendmail.m4 sendmail.m4 ; , . sendmail.m4 . dnl #------------------ SAMPLE SENDMAIL.M4 FILE ------------------ 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 # don't try DNS on these dnl #------------------------------------------------------------- dnl # define(PSEUDONYMS, vstout.vbrew.com vstout.UUCP vbrew.com) dnl # names we're known by define(DEFAULT HOST, vstout.vbrew.com)dnl # our primary 'name' for mail define(UUCPNAME, vstout)dnl # our uucp name dnl # dnl #------------------------------------------------------------- dnl # define(UUCPNODES, |uuname|sort|uniq)dnl # our uucp neighbors define(BANGIMPLIESUUCP)dnl # make certain that uucp define(BANGONLYUUCP)dnl # mail is treated correctly define(RELAY HOST, moria)dnl # our smart relay host define(RELAY MAILER, UUCP-A)dnl # we reach moria via uucp - 287 - 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 # (provided with the source code) dnl # include(Sendmail.mc)dnl # REQUIRED ENTRY !!! dnl # dnl #------------ END OF SAMPLE SENDMAIL.M4 FILE ------- 16.3.2.1 , dnl #define(LIBDIR,/usr/local/lib/mail)dnl # where all support files go LIBDIR , sendmail + IDA , dbm , . , sendmail binary send-mail.m4. dnl, - . , dnl , , , sendmail.cf . - 288 - 16.3.2.2 Mailer' define(LOCAL MAILER DEF, mailers.linux)dnl # mailer for local delivery . Unix sendmail binary. Linux, mailer, , . LOCAL MAILER DEF sendmail.m4. , LOCAL MAILER DEF mailers.linux. mailers.linux , LIBDIR. Mlocal mailer , sendmail , . sendmail, . # -- /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 deliver Sendmail.mc , sendmail.cf. , mailers.linux sendmail.m4: dnl --- (in sendmail.m4) --- define(LOCAL MAILER DEF, DELIVER)dnl # mailer for local delivery , Sendmail.mc , deliver /bin, Slackware1.1.1 ( /usr/bin). deliver /bin. - 289 - 16.3.2.3 Bounced- define(POSTMASTERBOUNCE)dnl # postmaster gets bounces , , 100 %. sys-logd , - . POSTMASTERBOUNCE , . , , . 16.3.2.4 define(PSEUDODOMAINS, BITNET UUCP)dnl # don't try DNS on these , , DNS. PSEUDODOMAINS DNS , . 16.3.2.5 define(PSEUDONYMS, vstout.vbrew.com vstout.UUCP vbrew.com)dnl # names we're known by define(DEFAULT HOST, vstout.vbrew.com)dnl # our primary 'name' for mail , , , , " " . PSEUDONYMS hostname, . - 290 - DEFAULT HOST hostname, host. 16.3.2.6 Uucp- 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 treated correctly , DNS UUCP. UUCPNAME hostname, UUCP. UUCPNODES , hostnames , UUCP . BANGIMPLIESUUCP BANGONLYUUCP , , UUCP UUCP, DNS, Internet. 16.3.2.7 Relay- Mailer' define(RELAY HOST, moria)dnl # our smart relay host define(RELAY MAILER, UUCP-A)dnl # we reach moria via UUCP RELAY HOST UUCP hostname ( ). RELAY MAILER mailer, , . , , . , , , relay host. - 291 - 16.3.2.8 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 , , sendmail + IDA dbm , . LIBDIR. 16.3.2.9 Sendmail.mc include(Sendmail.mc)dnl # REQUIRED ENTRY !!! sendmail + IDA Sendmail.mc, "" , sendmail.cf. , sendmail . . 16.3.2.10 ? dbm , sendmail + IDA DEFAULT MAILER ( RELAY HOST RELAY MAILER) sendmail.m4, , sendmail.cf. domaintable uucpxtable. DEFAULT HOST, PSEUDONYMS, , DEFAULT MAILER. - relay host relay mailer, , . - 292 - UUCP UUCPNAME UUCP. RELAY MAILER, RELAY HOST, smart-host relay . , RELAY MAILER UUCP-A UUCP . SMTP "Domain Name Service ", DEFAULT MAILER TCP-A RELAY HOST RELAY MAILER. 16.4 Sendmail + IDA Sendmail + IDA , sendmail ( sendmail.m4) , , . dbm Make-, . . , , , ( touch) Make- LIBDIR, Make- . 16.4.1 Mailertable Mailertable , host . Internet, relay host gateway, , (UUCP SMTP). UUCP . . Sendmail , , . . - 293 - , Groucho Marx UUCP relay host ada. , mailertable, : # (in mailertable) # # forward all mail for the domain .cs.groucho.edu via UUCP to ada UUCP- A,ada .cs.groucho.edu , groucho.edu relay host - bighub. mailertable : # (in mailertable) # # forward all mail for the domain cs.groucho.edu via UUCP to ada UUCP-A,ada .cs.groucho.edu # # forward all mail for the domain groucho.edu via UUCP to bighub UUCP- A,bighub .groucho.edu , . , .cs.groucho.edu bighub ada , . # (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 # mailertable , UUCP-A mailer sendmail UUCP . - 294 - mailer' ada . Mailertable () : mailer delimiter relayhost host or domain mailer'. - , . mailer' - TCP-A (TCP/IP - Internet), TCP-U (TCP/IP uucp-), UUCP-A (UUCP - Internet). , mailer host mailertable, , mailertable. ! hostname mailer'. , . , . mailer relay host. : hostname , . foo!bar!Joe foo, xyzzy!Janet . 16.4.2 Uucpxtable , Internet (SMTP), Domain Name Service (DNS), relay host. Uucpxtable UUCP, hostname UUCP-. , UUCP, mailer . UUCP, UUCP, , , UUCP , - 295 - RELAY MAILER RELAY HOST DEFAULT MAILER. Internet, UUCP uucpxtable. , , sesame.com DNS sesame UUCP. uucpxtable, host UUCP. #============== /usr/local/lib/mail/uucpxtable ============ # Mail sent to joe@sesame.com is rewritten to sesame!joe and # therefore delivered via UUCP # sesame sesame.com # #---------------------------------------------------------- 16.4.3 pathtable Pathtable , . pathtable pathalias-, . . pathtable. #=============== /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 don't 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 # - 296 - # forwarding to a system that is a UUCP neighbor of a reachable # internet site. # swim!%s@gcc.groucho.edu swim # # The following sends all mail for two networks through different # gateways (see the leading '.' ?). # In this example, "uugate" and "byte" are specific systems that serve # as mail gateways to the .UUCP and .BITNET pseudo-domains respectively # %s@uugate.groucho.edu .UUCP byte!%s@mail.shift.com .BITNET # #=================== end of pathtable ======================= 16.4.4 domaintable Domaintable , , DNS . , . , host " ". domaintable. , : #============= /usr/local/lib/mail/domaintable ================= # # brokenhost.correct.domain brokenhost.wrong.domain # # #=================== end of domaintable ======================== 16.4.5 aliases Aliases( ) : - 297 - + , . + . + . aliases . aliases, , sendmail setuid-root. aliases, # /usr/lib/sendmail -bi , dbm . , newaliases, cron. #--------------------- /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-DAEMON: postmaster # required entry # - 298 - #------------------------------------------------------------------- 16.4.6 , . , sendmail + IDA . Uucprelays uucprelays " " UUCP , host , , UUCP pathalias. Genericfrom xaliases genericfrom usernames , () usernames , usernames. xalparse genericfrom aliases , username xaliases. Decnetxtable decnet-, domaintable, , smtp-. 16.5 sendmail , sendmail + IDA, , . sendmail + IDA Linux sunsite.unc.edu /pub/Linux/system/Mail. sendmail, , sendmail5.67b + IDA1.5. sendmail , README, . sendmail + IDA vixen.cso.uiuc.edu. - 299 - sendmail + IDA Linux, Linux - newspak-2.2.tar.gz, sun- site.unc.edu /pub/Linux/system/Mail. smail , ( ) smail . 16.5.1 , : $ gunzip -c sendmail5.65b+IDA1.5+mailx5.3b.tgz | tar xvf - "" tar, Slackware, tar -zxvf filename.tgz . , sendmail5.65b +IDA1.5+ mailx5.3b. , sendmail + IDA mailx. paths , , tar: # cd sendmail5.65b+IDA1.5+mailx5.3b # tar cf - . | (cd /; tar xvvpoof -) 16.5.2 sendmail.cf sendmail.cf, , sendmail.m4, m4. /usr/local/lib/mail/CF, sample.m4. yourhostname.m4, , . , , . , , , sendmail.m4. LOCAL MAILER DEF , mailer . . " Mailer' " . - 300 - PSEUDONYMS , host. DEFAULT HOST . hostname . UUCPNAME hostnmae. RELAY HOST RELAY MAILER UUCP smart-host RELAY HOST UUCP " " uucp . UUCP-A mailer, . DEFAULT MAILER Internet DNS, TCP-A. , sendmail TCP-A mailer, SMTP RFC . Internet RELAY HOST or RELAY MAILER. sendmail.cf, # make yourhostname.cf yourhostname.m4 yourhostname.cf . , , , , , . . , : # cp yourhostname.cf /etc/sendmail.cf sendmail . ( /etc/rc.inet2). , . # /usr/lib/sendmail -bd -q1h 16.5.3 sendmail.cf - 301 - " " , sendmail -bt . - sendmail.cf, . , -Cfilename . , vstout.cf , vstout.m4. # /usr/lib/sendmail -bt -Cvstout.cf ADDRESS TEST MODE Enter
[Note: No initial ruleset 3 call] > , sendmail . mailer'. , . # /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 9 returns: < me > rewrite: ruleset 7 returns: < > , me rewrite: ruleset 3 returns: < > , me rewrite: ruleset 0 input: < > , me rewrite: ruleset 8 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 - 302 - rewrite: ruleset 0 returns: $# LOCAL $@ vstout . vbrew . com $: me sendmail . ruleset, , ruleset , . , ruleset 3 0 ( - 3,0 ). ruleset 0. , UUCP. # /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 > , , Internet hostname. # /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 . vbrew . com [...] rewrite: ruleset 0 returns: $# LOCAL $@ vstout . vbrew . com $: me > , PSEUDONYMS DEFAULT NAME sendmail.m4. , relay host. # /usr/lib/sendmail -bt -Cvstout.cf ADDRESS TEST MODE - 303 - 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 rewrite: ruleset 9 returns: < fred > @ 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 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 rewrite: 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 retu rns < @ moria . com > , fred rewrite: ruleset 0 returns: $# UUCP-A $@ moria $: < @ moria . com > , fred > 16.5.4 - sendmail.cf . , dbm , . , , , dbm make , . UUCP , , README.linux . , Make- . UUCP smart-host, uucpxtable - 304 - ( smart host) dbm uucpxtable. , RELAY HOST, 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 @ sesame . com rewrite: ruleset 7 input: fred @ sesame . com rewrite: ruleset 9 input: fred @ sesame . com rewrite: ruleset 9 returns: < fred > @ sesame . com rewrite: ruleset 7 returns: < @ sesame . com > , fred rewrite: ruleset 3 returns: < @ sesame . com > , fred rewrite: ruleset 0 input: < @ sesame . com > , fred rewrite: ruleset 8 input: < @ sesame . com > , fred rewrite: ruleset 8 returns: < @ sesame . com > , fred rewrite: ruleset 29 input: < @ sesame . com > , fred rewrite: ruleset 29 returns: < @ sesame . com > , fred rewrite: ruleset 26 input: < @ sesame . com > , fred rewrite: ruleset 25 input: < @ sesame . com > , fred rewrite: ruleset 25 returns: < @ sesame . com > , fred rewrite: ruleset 4 input: < @ sesame . com > , fred rewrite: ruleset 4 returns: fred @ sesame . com rewrite: ruleset 26 returns: < @ sesame . com > , fred rewrite: ruleset 0 returns: $# UUCP-A $@ moria $: < @ sesame . com > , fred > UUCP RELAY HOST, , . , UUCP host, UUCP, ( domaintable). , swim host - UUCP . swim!Fred sendmail : - 305 - # /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 [...lines omitted...] rewrite: ruleset 0 returns: $# UUCP $@ swim $: < > , fred > uucpxtable, UUCP UUCP , Internet , . # /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 [...lines omitted...] rewrite: ruleset 0 returns: $# UUCP $@ swim . 2birds $: < > , dude > 16.6 , , , sendmail + IDA, , , . . , DNS - . . , , , , , , . , " ". - 306 - 16.6.1 host , mailertable. , backwood.org GATEWAY UUCP,