1 2 3 NEW SENDMAIL CONFIGURATION FILES 4 5 Eric Allman <eric@CS.Berkeley.EDU> 6 7 @(#)README 8.44 (Berkeley) 01/10/95 8 9 10This document describes the sendmail configuration files being used 11at Berkeley. These use features in the new (R8) sendmail; they will 12not work on other versions. 13 14These configuration files are probably not as general as previous 15versions, and don't handle as many of the weird cases automagically. 16I was able to simplify by them for two reasons. First, the network 17has become more consistent -- for example, at this point, everyone 18on the internet is supposed to be running a name server, so hacks to 19handle NIC-registered hosts can go away. Second, I assumed that a 20subdomain would be running SMTP internally -- UUCP is presumed to be 21a long-haul protocol. I realize that this is not universal, but it 22does describe the vast majority of sites with which I am familiar, 23including those outside the US. 24 25Of course, the downside of this is that if you do live in a weird 26world, things are going to get weirder for you. I'm sorry about that, 27but at the time we at Berkeley had a problem, and it seemed like the 28right thing to do. 29 30This package requires a post-V7 version of m4; if you are running the 314.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with 32a newer version. You can m4-expand on their system, then run locally. 33SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work. GNU m4 version 1.1 34also works. Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't 35work -- you'll have to use a Net/2 or GNU version. 36 37IF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run 38"m4 foo.mc > foo.cf" -- that should be all you need. There is also 39a fairly crude (but functional) Makefile.dist that works on the 40old version of make. 41 42To get started, you may want to look at tcpproto.mc (for TCP-only 43sites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for 44clusters of clients using a single mail host). Others are versions 45that we use at Berkeley, although not all are in current use. For 46example, ucbarpa has gone away, but I've left ucbarpa.mc in because 47it demonstrates some interesting techniques. 48 49I'm not pretending that this README describes everything that these 50configuration files can do; clever people can probably tweak them 51to great effect. But it should get you started. 52 53******************************************************************* 54*** BE SURE YOU CUSTOMIZE THESE FILES! They have some *** 55*** Berkeley-specific assumptions built in, such as the name *** 56*** of our UUCP-relay. You'll want to create your own domain *** 57*** description, and use that in place of domain/Berkeley.m4. *** 58******************************************************************* 59 60 61+--------------------------+ 62| INTRODUCTION AND EXAMPLE | 63+--------------------------+ 64 65Configuration files are contained in the subdirectory "cf", with a 66suffix ".mc". They must be run through "m4" to produce a ".cf" file. 67 68Let's examine a typical .mc file (cf/cs-exposed.mc): 69 70 divert(-1) 71 # 72 # Copyright (c) 1983 Eric P. Allman 73 # Copyright (c) 1988 The Regents of the University of California. 74 # All rights reserved. 75 # 76 # Redistribution and use in source and binary forms are permitted 77 # provided that the above copyright notice and this paragraph are 78 # duplicated in all such forms and that any documentation, 79 # advertising materials, and other materials related to such 80 # distribution and use acknowledge that the software was developed 81 # by the University of California, Berkeley. The name of the 82 # University may not be used to endorse or promote products derived 83 # from this software without specific prior written permission. 84 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 85 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 86 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 87 # 88 89The divert(-1) will delete the crud in the resulting output file. 90The copyright notice is what your lawyers require. Our lawyers require 91the one that I've included in my files. A copyleft is a copyright by 92another name. 93 94The next line MUST be 95 96 include(`../m4/cf.m4') 97 98This will pull in the M4 macros you will need to make sense of 99everything else. As the saying goes, don't think about it, just 100do it. If you don't do it, don't bother reading the rest of this 101file. 102 103 VERSIONID(`<SCCS or RCS version id>') 104 105VERSIONID is a macro that stuffs the version information into the 106resulting file. We use SCCS; you could use RCS, something else, or 107omit it completely. This is not the same as the version id included 108in SMTP greeting messages -- this is defined in m4/version.m4. 109 110 DOMAIN(cs.exposed) 111 112This example exposes the host inside of the CS subdomain -- that is, 113it doesn't try to hide the name of the workstation to the outside 114world. Changing this to DOMAIN(cs.hidden) would have made outgoing 115messages refer to "<username>@CS.Berkeley.EDU" instead of using the 116local hostname. Internally this is effected by using 117"MASQUERADE_AS(CS.Berkeley.EDU)". 118 119 MAILER(smtp) 120 121These describe the mailers used at the default CS site site. The 122local mailer is always included automatically. 123 124 125+--------+ 126| OSTYPE | 127+--------+ 128 129Note that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes 130default Computer Science Division environment. There are several 131explicit environments available: bsd4.3, bsd4.4, hpux, irix, osf1, 132riscos4.5, sunos3.5, sunos4.1, and ultrix4.1. These change things 133like the location of the alias file and queue directory. Some of 134these files are identical to one another. 135 136Operating system definitions are easy to write. They may define 137the following variables (everything defaults, so an ostype file 138may be empty). 139 140ALIAS_FILE [/etc/aliases] The location of the text version 141 of the alias file(s). It can be a comma-separated 142 list of names (but be sure you quote values with 143 comments in them -- for example, use 144 define(`ALIAS_FILE', `a,b') 145 to get "a" and "b" both listed as alias files; 146 otherwise the define() primitive only sees "a"). 147HELP_FILE [/usr/lib/sendmail.hf] The name of the file 148 containing information printed in response to 149 the SMTP HELP command. 150QUEUE_DIR [/var/spool/mqueue] The directory containing 151 queue files. 152STATUS_FILE [/etc/sendmail.st] The file containing status 153 information. 154LOCAL_MAILER_PATH [/bin/mail] The program used to deliver local mail. 155LOCAL_MAILER_FLAGS [rmn] The flags used by the local mailer. The 156 flags lsDFM are always included. 157LOCAL_MAILER_ARGS [mail -d $u] The arguments passed to deliver local 158 mail. 159LOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. 160LOCAL_SHELL_FLAGS [eu] The flags used by the shell mailer. The 161 flags lsDFM are always included. 162LOCAL_SHELL_ARGS [sh -c $u] The arguments passed to deliver "prog" 163 mail. 164LOCAL_SHELL_DIR [$z:/] The directory search path in which the 165 shell should run. 166USENET_MAILER_PATH [/usr/lib/news/inews] The name of the program 167 used to submit news. 168USENET_MAILER_FLAGS [rlsDFMmn] The mailer flags for the usenet mailer. 169USENET_MAILER_ARGS [-m -h -n] The command line arguments for the 170 usenet mailer. 171USENET_MAILER_MAX [100000] The maximum size of messages that will 172 be accepted by the usenet mailer. 173SMTP_MAILER_FLAGS [undefined] Flags added to SMTP mailer. Default 174 flags are `mDFMUX' for all SMTP-based mailers; the 175 "esmtp" mailer adds `a' and "smtp8" adds `8'. 176SMTP_MAILER_MAX [undefined] The maximum size of messages that will 177 be transported using the smtp, smtp8, or esmtp 178 mailers. 179SMTP_MAILER_ARGS [IPC $h] The arguments passed to the smtp mailer. 180 About the only reason you would want to change this 181 would be to change the default port. 182ESMTP_MAILER_ARGS [IPC $h] The arguments passed to the esmtp mailer. 183SMTP8_MAILER_ARGS [IPC $h] The arguments passed to the smtp8 mailer. 184RELAY_MAILER_ARGS [IPC $h] The arguments passed to the relay mailer. 185UUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. Default 186 flags are `DFMhuU' (and `m' for suucp mailer, minus 187 `U' for uucp-dom mailer). 188UUCP_MAILER_ARGS [uux - -r -z -a$g -gC $h!rmail ($u)] The arguments 189 passed to the UUCP mailer. 190UUCP_MAX_SIZE [100000] The maximum size message accepted for 191 transmission by the UUCP mailers. 192FAX_MAILER_PATH [/usr/local/lib/fax/mailfax] The program used to 193 submit FAX messages. 194FAX_MAILER_MAX [100000] The maximum size message accepted for 195 transmission by FAX. 196POP_MAILER_PATH [/usr/lib/mh/spop] The pathname of the POP mailer. 197POP_MAILER_FLAGS [Penu] Flags added to POP mailer. Flags "lsDFM" 198 are always added. 199POP_MAILER_ARGS [pop $u] The arguments passed to the POP mailer. 200PROCMAIL_MAILER_FLAGS [Shu] Flags added to Procmail mailer. Flags 201 ``DFMmn'' are always set. 202PROCMAIL_MAILER_ARGS [procmail -m $h $f $u] The arguments passed to 203 the Procmail mailer. 204 205+---------+ 206| DOMAINS | 207+---------+ 208 209You will probably want to collect domain-dependent defines into one 210file, referenced by the DOMAIN macro. For example, our Berkeley 211domain file includes definitions for several internal distinguished 212hosts: 213 214UUCP_RELAY The host that will forward UUCP-addressed email. 215 If not defined, all UUCP sites must be directly 216 connected. 217BITNET_RELAY The host that will forward BITNET-addressed email. 218 If not defined, the .BITNET pseudo-domain won't work. 219LOCAL_RELAY The site that will handle unqualified names -- that 220 is, names with out an @domain extension. If not set, 221 they are assumed to belong on this machine. This 222 allows you to have a central site to store a 223 company- or department-wide alias database. This 224 only works at small sites, and there are better 225 methods. 226LUSER_RELAY The site that will handle lusers -- that is, apparently 227 local names that aren't local accounts or aliases. 228 229Any of these can be either ``mailer:hostname'' (in which case the 230mailer is the internal mailer name, such as ``suucp'' and the hostname 231is the name of the host as appropriate for that mailer) or just a 232``hostname'', in which case a default mailer type (usually ``relay'', 233a variant on SMTP) is used. WARNING: if you have a wildcard MX 234record matching your domain, you probably want to define these to 235have a trailing dot so that you won't get the mail diverted back 236to yourself. 237 238The domain file can also be used to define a domain name, if needed 239(using "DD<domain>") and set certain site-wide features. If all hosts 240at your site masquerade behind one email name, you could also use 241MASQUERADE_AS here. 242 243You do not have to define a domain -- in particular, if you are a 244single machine sitting off somewhere, it is probably more work than 245it's worth. This is just a mechanism for combining "domain dependent 246knowledge" into one place. 247 248+---------+ 249| MAILERS | 250+---------+ 251 252There are fewer mailers supported in this version than the previous 253version, owing mostly to a simpler world. 254 255local The local and prog mailers. You will almost always 256 need these; the only exception is if you relay ALL 257 your mail to another site. This mailer is included 258 automatically. 259 260smtp The Simple Mail Transport Protocol mailer. This does 261 not hide hosts behind a gateway or another other 262 such hack; it assumes a world where everyone is 263 running the name server. This file actually defines 264 four mailers: "smtp" for regular (old-style) SMTP to 265 other servers, "esmtp" for extended SMTP to other 266 servers, "smtp8" to do SMTP to other servers without 267 converting 8-bit data to MIME (essentially, this is 268 your statement that you know the other end is 8-bit 269 clean even if it doesn't say so), and "relay" for 270 transmission to our RELAY_HOST, LUSER_RELAY, or 271 MAILER_HUB. 272 273uucp The Unix-to-Unix Copy Program mailer. Actually, this 274 defines two mailers, "uucp-old" (a.k.a. "uucp") and 275 "uucp-new" (a.k.a. "suucp"). The latter is for when you 276 know that the UUCP mailer at the other end can handle 277 multiple recipients in one transfer. If the smtp mailer 278 is also included in your configuration, two other mailers 279 ("uucp-dom" and "uucp-uudom") are also defined. When you 280 include the uucp mailer, sendmail looks for all names in 281 the $=U class and sends them to the uucp-old mailer; all 282 names in the $=Y class are sent to uucp-new; and all 283 names in the $=Z class are sent to uucp-uudom. Note that 284 this is a function of what version of rmail runs on 285 the receiving end, and hence may be out of your control. 286 See the section below describing UUCP mailers in more 287 detail. 288 289usenet Usenet (network news) delivery. If this is specified, 290 an extra rule is added to ruleset 0 that forwards all 291 local email for users named ``group.usenet'' to the 292 ``inews'' program. Note that this works for all groups, 293 and may be considered a security problem. 294 295fax Facsimile transmission. This is experimental and based 296 on Sam Leffler's FlexFAX software. For more information, 297 see below. 298 299pop Post Office Protocol. 300 301procmail An interface to procmail (does not come with sendmail). 302 This is designed to be used in mailertables. For example, 303 a common question is "how do I forward all mail for a given 304 domain to a single person?". If you have this mailer 305 defined, you could set up a mailertable reading: 306 307 host.com procmail:/etc/procmailrcs/host.com 308 309 with the file /etc/procmailrcs/host.com reading: 310 311 :0 # forward mail for host.com 312 ! -oi -f $1 person@other.host 313 314 This would arrange for (anything)@host.com to be sent 315 to person@other.host. Within the procmail script, $1 is 316 the name of the sender and $2 is the name of the recipient. 317 If you use this with FEATURE(local_procmail), the FEATURE 318 should be listed first. 319 320The local mailer accepts addresses of the form "user+detail", where 321the "+detail" is not used for mailbox matching but is available 322to certain local mail programs (in particular, see FEATURE(local_procmail)). 323For example, "eric", "eric+sendmail", and "eric+sww" all indicate 324the same user, but additional arguments <null>, "sendmail", and "sww" 325may be provided for use in sorting mail. 326 327 328+----------+ 329| FEATURES | 330+----------+ 331 332Special features can be requested using the "FEATURE" macro. For 333example, the .mc line: 334 335 FEATURE(use_cw_file) 336 337tells sendmail that you want to have it read an /etc/sendmail.cw 338file to get values for class $=w. The FEATURE may contain a single 339optional parameter -- for example: 340 341 FEATURE(mailertable, dbm /usr/lib/mailertable) 342 343Available features are: 344 345use_cw_file Read the file /etc/sendmail.cw file to get alternate 346 names for this host. This might be used if you were 347 on a host that MXed for a dynamic set of other 348 hosts. If the set is static, just including the line 349 "Cw<name1> <name2> ..." is probably superior. 350 The actual filename can be overridden by redefining 351 confCW_FILE. 352 353redirect Reject all mail addressed to "address.REDIRECT" with 354 a ``551 User not local; please try <address>'' message. 355 If this is set, you can alias people who have left 356 to their new address with ".REDIRECT" appended. 357 358nouucp Don't do anything special with UUCP addresses at all. 359 360nocanonify Don't pass addresses to $[ ... $] for canonification. 361 This would generally only be used by sites that only 362 act as mail gateways or which have user agents that do 363 full canonification themselves. You may also want to 364 use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to 365 turn off the usual resolver options that do a similar 366 thing. 367 368stickyhost If set, email sent to "user@local.host" are marked 369 as "sticky" -- that is, the local addresses aren't 370 matched against UDB and don't go through ruleset 5. 371 This is used if you want a set up where "user" is 372 not necessarily the same as "user@local.host", e.g., 373 to make a distinct domain-wide namespace. Prior to 374 8.7 this was the default, and notsticky was used to 375 turn this off. 376 377mailertable Include a "mailer table" which can be used to override 378 routing for particular domains. The argument of the 379 FEATURE may be the key definition. If none is specified, 380 the definition used is: 381 hash -o /etc/mailertable 382 Keys in this database are fully qualified domain names 383 or partial domains preceded by a dot -- for example, 384 "vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU". 385 Values must be of the form: 386 mailer:domain 387 where "mailer" is the internal mailer name, and "domain" 388 is where to send the message. These maps are not 389 reflected into the message header. 390 391domaintable Include a "domain table" which can be used to provide 392 domain name mapping. Use of this should really be 393 limited to your own domains. It may be useful if you 394 change names (e.g., your company changes names from 395 oldname.com to newname.com). The argument of the 396 FEATURE may be the key definition. If none is specified, 397 the definition used is: 398 hash -o /etc/domaintable 399 The key in this table is the domain name; the value is 400 the new (fully qualified) domain. Anything in the 401 domaintable is reflected into headers; that is, this 402 is done in ruleset 3. 403 404bitdomain Look up bitnet hosts in a table to try to turn them into 405 internet addresses. The table can be built using the 406 bitdomain program contributed by John Gardiner Myers. 407 The argument of the FEATURE may be the key definition; if 408 none is specified, the definition used is: 409 hash -o /etc/bitdomain.db 410 Keys are the bitnet hostname; values are the corresponding 411 internet hostname. 412 413uucpdomain Similar feature for UUCP hosts. The default map definition 414 is: 415 hash -o /etc/uudomain.db 416 At the moment there is no automagic tool to build this 417 database. 418 419always_add_domain 420 Include the local host domain even on locally delivered 421 mail. Normally it is not added unless it is already 422 present. 423 424allmasquerade If masquerading is enabled (using MASQUERADE_AS), this 425 feature will cause recipient addresses to also masquerade 426 as being from the masquerade host. Normally they get 427 the local hostname. Although this may be right for 428 ordinary users, it can break local aliases. For example, 429 if you send to "localalias", the originating sendmail will 430 find that alias and send to all members, but send the 431 message with "To: localalias@masqueradehost". Since that 432 alias likely does not exist, replies will fail. Use this 433 feature ONLY if you can guarantee that the ENTIRE 434 namespace on your masquerade host supersets all the 435 local entries. 436 437nodns We aren't running DNS at our site (for example, 438 we are UUCP-only connected). It's hard to consider 439 this a "feature", but hey, it had to go somewhere. 440 441nullclient This is a special case -- it creates a stripped down 442 configuration file containing nothing but support for 443 forwarding all mail to a central hub via a local 444 SMTP-based network. The argument is the name of that 445 hub. 446 447 The only other feature that should be used in conjunction 448 with this one is "nocanonify" (this causes addresses to 449 be sent unqualified via the SMTP connection; normally 450 they are qualifed with the masquerade name, which 451 defaults to the name of the hub machine). No mailers 452 should be defined. No aliasing or forwarding is done. 453 454local_procmail Use procmail as the local mailer. This mailer can 455 make use of the "user+indicator@local.host" syntax; 456 normally the +indicator is just tossed, but by default 457 it is passed as the -a argument to procmail. The 458 argument to this feature is the pathname of procmail, 459 which defaults to /usr/local/bin/procmail. 460 461 462+-------+ 463| HACKS | 464+-------+ 465 466Some things just can't be called features. To make this clear, 467they go in the hack subdirectory and are referenced using the HACK 468macro. These will tend to be site-dependent. The release 469includes the Berkeley-dependent "cssubdomain" hack (that makes 470sendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU; 471this is intended as a short-term aid while we move hosts into 472subdomains. 473 474 475+--------------------+ 476| SITE CONFIGURATION | 477+--------------------+ 478 479 ***************************************************** 480 * This section is really obsolete, and is preserved * 481 * only for back compatibility. You should plan on * 482 * using mailertables for new installations. In * 483 * particular, it doesn't work for the newer forms * 484 * of UUCP mailers, such as uucp-uudom. * 485 ***************************************************** 486 487Complex sites will need more local configuration information, such as 488lists of UUCP hosts they speak with directly. This can get a bit more 489tricky. For an example of a "complex" site, see cf/ucbvax.mc. 490 491If your host is known by several different names, you need to augment 492the $=w class. This is a list of names by which you are known, and 493anything sent to an address using a host name in this list will be 494treated as local mail. You can do this in two ways: either create 495the file /etc/sendmail.cw containing a list of your aliases (one per 496line), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the 497line: 498 499 Cw alias.host.name 500 501at the end of that file. See the ``vangogh.mc'' file for an example. 502Be sure you use the fully-qualified name of the host, rather than a 503short name. 504 505The SITECONFIG macro allows you to indirectly reference site-dependent 506configuration information stored in the siteconfig subdirectory. For 507example, the line 508 509 SITECONFIG(uucp.ucbvax, ucbvax, U) 510 511reads the file uucp.ucbvax for local connection information. The 512second parameter is the local name (in this case just "ucbvax" since 513it is locally connected, and hence a UUCP hostname). The third 514parameter is the name of both a macro to store the local name (in 515this case, $U) and the name of the class (e.g., $=U) in which to store 516the host information read from the file. Another SITECONFIG line reads 517 518 SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W) 519 520This says that the file uucp.ucbarpa contains the list of UUCP sites 521connected to ucbarpa.Berkeley.EDU. The $=W class will be used to 522store this list, and $W is defined to be ucbarpa.Berkeley.EDU, that 523is, the name of the relay to which the hosts listed in uucp.ucbarpa 524are connected. [The machine ucbarpa is gone now, but I've left 525this out-of-date configuration file around to demonstrate how you 526might do this.] 527 528Note that the case of SITECONFIG with a third parameter of ``U'' is 529special; the second parameter is assumed to be the UUCP name of the 530local site, rather than the name of a remote site, and the UUCP name 531is entered into $=w (the list of local hostnames) as $U.UUCP. 532 533The siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing 534more than a sequence of SITE macros describing connectivity. For 535example: 536 537 SITE(cnmat) 538 SITE(sgi olympus) 539 540The second example demonstrates that you can use two names on the 541same line; these are usually aliases for the same host (or are at 542least in the same company). 543 544 545+--------------------+ 546| USING UUCP MAILERS | 547+--------------------+ 548 549It's hard to get UUCP mailers right because of the extremely ad hoc 550nature of UUCP addressing. These config files are really designed 551for domain-based addressing, even for UUCP sites. 552 553There are four UUCP mailers available. The choice of which one to 554use is partly a matter of local preferences and what is running at 555the other end of your UUCP connection. Unlike good protocols that 556define what will go over the wire, UUCP uses the policy that you 557should do what is right for the other end; if they change, you have 558to change. This makes it hard to do the right thing, and discourages 559people from updating their software. In general, if you can avoid 560UUCP, please do. 561 562The major choice is whether to go for a domainized scheme or a 563non-domainized scheme. This depends entirely on what the other 564end will recognize. If at all possible, you should encourage the 565other end to go to a domain-based system -- non-domainized addresses 566don't work entirely properly. 567 568The four mailers are: 569 570 uucp-old (obsolete name: "uucp") 571 This is the oldest, the worst (but the closest to UUCP) way of 572 sending messages accros UUCP connections. It does bangify 573 everything and prepends $U (your UUCP name) to the sender's 574 address (which can already be a bang path itself). It can 575 only send to one address at a time, so it spends a lot of 576 time copying duplicates of messages. Avoid this if at all 577 possible. 578 579 uucp-new (obsolete name: "suucp") 580 The same as above, except that it assumes that in one rmail 581 command you can specify several recipients. It still has a 582 lot of other problems. 583 584 uucp-dom 585 This UUCP mailer keeps everything as domain addresses. 586 Basically, it uses the SMTP mailer rewriting rules. This mailer 587 is only included if MAILER(smtp) is also specified. 588 589 Unfortunately, a lot of UUCP mailer transport agents require 590 bangified addresses in the envelope, although you can use 591 domain-based addresses in the message header. (The envelope 592 shows up as the From_ line on UNIX mail.) So.... 593 594 uucp-uudom 595 This is a cross between uucp-new (for the envelope addresses) 596 and uucp-dom (for the header addresses). It bangifies the 597 envelope sender (From_ line in messages) without adding the 598 local hostname, unless there is no host name on the address 599 at all (e.g., "wolf") or the host component is a UUCP host name 600 instead of a domain name ("somehost!wolf" instead of 601 "some.dom.ain!wolf"). This is also included only if MAILER(smtp) 602 is also specified. 603 604Examples: 605 606We are on host grasp.insa-lyon.fr (UUCP host name "grasp"). The 607following summarizes the sender rewriting for various mailers. 608 609Mailer sender rewriting in the envelope 610------ ------ ------------------------- 611uucp-{old,new} wolf grasp!wolf 612uucp-dom wolf wolf@grasp.insa-lyon.fr 613uucp-uudom wolf grasp.insa-lyon.fr!wolf 614 615uucp-{old,new} wolf@fr.net grasp!fr.net!wolf 616uucp-dom wolf@fr.net wolf@fr.net 617uucp-uudom wolf@fr.net fr.net!wolf 618 619uucp-{old,new} somehost!wolf grasp!somehost!wolf 620uucp-dom somehost!wolf somehost!wolf@grasp.insa-lyon.fr 621uucp-uudom somehost!wolf grasp.insa-lyon.fr!somehost!wolf 622 623If you are using one of the domainized UUCP mailers, you really want 624to convert all UUCP addresses to domain format -- otherwise, it will 625do it for you (and probably not the way you expected). For example, 626if you have the address foo!bar!baz (and you are not sending to foo), 627the heuristics will add the @uucp.relay.name or @local.host.name to 628this address. However, if you map foo to foo.host.name first, it 629will not add the local hostname. You can do this using the uucpdomain 630feature. 631 632 633+-------------------+ 634| TWEAKING RULESETS | 635+-------------------+ 636 637For more complex configurations, you can define special rules. 638The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing 639the names. Any modifications made here are reflected in the header. 640 641A common use is to convert old UUCP addreses to SMTP addresses using 642the UUCPSMTP macro. For example: 643 644 LOCAL_RULE_3 645 UUCPSMTP(decvax, decvax.dec.com) 646 UUCPSMTP(research, research.att.com) 647 648will cause addresses of the form "decvax!user" and "research!user" 649to be converted to "user@decvax.dec.com" and "user@research.att.com" 650respectively. 651 652This could also be used to look up hosts in a database map: 653 654 LOCAL_RULE_3 655 R$* < @ $+ > $* $: $1 < @ $(hostmap $2 $) > $3 656 657This map would be defined in the LOCAL_CONFIG portion, as shown below. 658 659Similarly, LOCAL_RULE_0 can be used to introduce new parsing rules. 660For example, new rules are needed to parse hostnames that you accept 661via MX records. For example, you might have: 662 663 LOCAL_RULE_0 664 R$+ <@ host.dom.ain.> $#uucp $@ cnmat $: $1 < @ host.dom.ain.> 665 666You would use this if you had installed an MX record for cnmat.Berkeley.EDU 667pointing at this host; this rule catches the message and forwards it on 668using UUCP. 669 670You can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2. 671These rulesets are normally empty. 672 673A similar macro is LOCAL_CONFIG. This introduces lines added after the 674boilerplate option setting but before rulesets, and can be used to 675declare local database maps or whatever. For example: 676 677 LOCAL_CONFIG 678 Khostmap hash /etc/hostmap.db 679 Kyplocal nis -m hosts.byname 680 681 682+---------------------------+ 683| MASQUERADING AND RELAYING | 684+---------------------------+ 685 686You can have your host masquerade as another using 687 688 MASQUERADE_AS(host.domain) 689 690This causes outgoing SMTP mail to be labeled as coming from the 691indicated domain, rather than $j. One normally masquerades as one 692of one's own subdomains (for example, it's unlikely that I would 693choose to masquerade as an MIT site). 694 695The masquerade name is not normally canonified, so it is important 696that it be your One True Name, that is, fully qualified and not a 697CNAME. 698 699there are always users that need to be "exposed" -- that is, their 700internal site name should be displayed instead of the masquerade name. 701Root is an example. You can add users to this list using 702 703 EXPOSED_USER(usernames) 704 705This adds users to class E; you could also use something like 706 707 FE/etc/sendmail.cE 708 709You can also arrange to relay all unqualified names (that is, names 710without @host) to a relay host. For example, if you have a central 711email server, you might relay to that host so that users don't have 712to have .forward files or aliases. You can do this using 713 714 define(`LOCAL_RELAY', mailer:hostname) 715 716The ``mailer:'' can be omitted, in which case the mailer defaults to 717"smtp". There are some user names that you don't want relayed, perhaps 718because of local aliases. A common example is root, which may be 719locally aliased. You can add entries to this list using 720 721 LOCAL_USER(usernames) 722 723This adds users to class L; you could also use something like 724 725 FL/etc/sendmail.cL 726 727If you want all incoming mail sent to a centralized hub, as for a 728shared /var/spool/mail scheme, use 729 730 define(`MAIL_HUB', mailer:hostname) 731 732Again, ``mailer:'' defaults to "smtp". If you define both LOCAL_RELAY 733and MAIL_HUB, unqualified names will be sent to the LOCAL_RELAY and 734other local names will be sent to MAIL_HUB. Names in $=L will be 735delivered locally, so you MUST have aliases or .forward files for them. 736 737For example, if are on machine mastodon.CS.Berkeley.EDU, the following 738combinations of settings will have the indicated effects: 739 740email sent to.... eric eric@mastodon.CS.Berkeley.EDU 741 742LOCAL_RELAY set to mail.CS.Berkeley.EDU (delivered locally) 743mail.CS.Berkeley.EDU 744 745MAIL_HUB set to mammoth.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU 746mammoth.CS.Berkeley.EDU 747 748Both LOCAL_RELAY and mail.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU 749MAIL_HUB set as above 750 751If you want all outgoing mail to go to a central relay site, define 752SMART_HOST as well. Briefly: 753 754 LOCAL_RELAY applies to unqualifed names (e.g., "eric"). 755 MAIL_HUB applies to names qualified with the name of the 756 local host (e.g., "eric@mastodon.CS.Berkeley.EDU"). 757 SMART_HOST applies to names qualified with other hosts. 758 759However, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, and 760FAX_RELAY) take precedence over SMART_HOST, so if you really want 761absolutely everything to go to a single central site you will need to 762unset all the other relays -- or better yet, find or build a minimal 763config file that does this. 764 765 766+-------------------------------+ 767| NON-SMTP BASED CONFIGURATIONS | 768+-------------------------------+ 769 770These configuration files are designed primarily for use by SMTP-based 771sites. I don't pretend that they are well tuned for UUCP-only or 772UUCP-primarily nodes (the latter is defined as a small local net 773connected to the rest of the world via UUCP). However, there is one 774hook to handle some special cases. 775 776You can define a ``smart host'' that understands a richer address syntax 777using: 778 779 define(`SMART_HOST', mailer:hostname) 780 781In this case, the ``mailer:'' defaults to "relay". Any messages that 782can't be handled using the usual UUCP rules are passed to this host. 783 784If you are on a local SMTP-based net that connects to the outside 785world via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. 786For example: 787 788 define(`SMART_HOST', suucp:uunet) 789 LOCAL_NET_CONFIG 790 R$* < @ $* .$m. > $* $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3 791 792This will cause all names that end in your domain name ($m) via 793SMTP; anything else will be sent via suucp (smart UUCP) to uunet. 794If you have FEATURE(nocanonify), you may need to omit the dots after 795the $m. If you are running a local DNS inside your domain which is 796not otherwise connected to the outside world, you probably want to 797use: 798 799 define(`SMART_HOST', smtp:fire.wall.com) 800 LOCAL_NET_CONFIG 801 R$* < @ $* . > $* $#smtp $@ $2. $: $1 < @ $2. > $3 802 803That is, send directly only to things you found in your DNS lookup; 804anything else goes through SMART_HOST. 805 806If you are not running DNS at all, it is important to use 807FEATURE(nodns) to avoid having sendmail queue everything waiting 808for the name server to come up. 809 810 811+-----------+ 812| WHO AM I? | 813+-----------+ 814 815Normally, the $j macro is automatically defined to be your fully 816qualified domain name (FQDN). Sendmail does this by getting your 817host name using gethostname and then calling gethostbyname on the 818result. For example, in some environments gethostname returns 819only the root of the host name (such as "foo"); gethostbyname is 820supposed to return the FQDN ("foo.bar.com"). In some (fairly rare) 821cases, gethostbyname may fail to return the FQDN. In this case 822you MUST define confDOMAIN_NAME to be your fully qualified domain 823name. This is usually done using: 824 825 Dmbar.com 826 define(`confDOMAIN_NAME', `$w.$m')dnl 827 828 829+--------------------+ 830| USING MAILERTABLES | 831+--------------------+ 832 833To use FEATURE(mailertable), you will have to create an external 834database containing the routing information for various domains. 835For example, a mailertable file in text format might be: 836 837 .my.domain xnet:%1.my.domain 838 uuhost1.my.domain suucp:uuhost1 839 .bitnet smtp:relay.bit.net 840 841This should normally be stored in /etc/mailertable. The actual 842database version of the mailertable is built using: 843 844 makemap hash /etc/mailertable.db < /etc/mailertable 845 846The semantics are simple. Any LHS entry that does not begin with 847a dot matches the full host name indicated. LHS entries beginning 848with a dot match anything ending with that domain name -- that is, 849they can be thought of as having a leading "*" wildcard. Matching 850is done in order of most-to-least qualified -- for example, even 851though ".my.domain" is listed first in the above example, an entry 852of "uuhost1.my.domain" will match the second entry since it is 853more explicit. 854 855The RHS should always be a "mailer:host" pair. The mailer is the 856configuration name of a mailer (that is, an `M' line in the 857sendmail.cf file). The "host" will be the hostname passed to 858that mailer. In domain-based matches (that is, those with leading 859dots) the "%1" may be used to interpolate the wildcarded part of 860the host name. For example, the first line above sends everything 861addressed to "anything.my.domain" to that same host name, but using 862the (presumably experimental) xnet mailer. 863 864In some cases you may want to temporarily turn off MX records, 865particularly on gateways. For example, you may want to MX 866everything in a domain to one machine that then forwards it 867directly. To do this, you might use the DNS configuration: 868 869 *.domain. IN MX 0 relay.machine 870 871and on relay.machine use the mailertable: 872 873 .domain smtp:[gateway.domain] 874 875The [square brackets] turn off MX records for this host only. 876If you didn't do this, the mailertable would use the MX record 877again, which would give you an MX loop. 878 879 880+--------------------------------+ 881| USING USERDB TO MAP FULL NAMES | 882+--------------------------------+ 883 884The user database was not originally intended for mapping full names 885to login names (e.g., Eric.Allman => eric), but some people are using 886it that way. (I would recommend that you set up aliases for this 887purpose instead -- since you can specify multiple alias files, this 888is fairly easy.) The intent was to locate the default maildrop at 889a site, but allow you to override this by sending to a specific host. 890 891If you decide to set up the user database in this fashion, it is 892imperative that you not use FEATURE(stickyhost) -- otherwise, 893e-mail sent to Full.Name@local.host.name will be rejected. 894 895To build the internal form of the user database, use: 896 897 makemap btree /usr/data/base.db < /usr/data/base.txt 898 899 900+--------------------------------+ 901| MISCELLANEOUS SPECIAL FEATURES | 902+--------------------------------+ 903 904DOTTED_USER(name) 905 Sometimes it is convenient to merge configuration on a 906 centralized mail machine, for example, to forward all 907 root mail to a mail server. In this case it might be 908 useful to be able to treat the root addresses as a class 909 of addresses with subtle differences. You can do this 910 using dotted users. For example, a client might include 911 the alias: 912 913 root: root.client1@server 914 915 On the server, the mail configuration would include: 916 917 DOTTED_USER(root) 918 919 Aliases on the server that would match this address would 920 be "root.client", "root.*", and "root", tried in that 921 order. You can specify multiple addresses either by 922 joining them in one DOTTTED_USER macro or by having 923 multiple macros: 924 925 DOTTED_USER(root) 926 DOTTED_USER(postmaster mailer-daemon) 927 928 defines three dotted users. 929 930 931+----------------+ 932| SECURITY NOTES | 933+----------------+ 934 935A lot of sendmail security comes down to you. Sendmail 8 is much 936more careful about checking for security problems than previous 937versions, but there are some things that you still need to watch 938for. In particular: 939 940* Make sure the aliases file isn't writable except by trusted 941 system personnel. This includes both the text and database 942 version. 943 944* Make sure that other files that sendmail reads, such as the 945 mailertable, is only writable by trusted system personnel. 946 947* The queue directory should not be world writable PARTICULARLY 948 if your system allows "file giveaways" (that is, if a non-root 949 user can chown any file they own to any other user). 950 951* If your system allows file giveaways, DO NOT create a publically 952 writable directory for forward files. This will allow anyone 953 to steal anyone else's e-mail. Instead, create a script that 954 copies the .forward file from users' home directories once a 955 night (if you want the non-NFS-mounted forward directory). 956 957* If your system allows file giveaways, you'll find that 958 sendmail is much less trusting of :include: files -- in 959 particular, you'll have to have /SENDMAIL/ANY/SHELL/ in 960 /etc/shells before they will be trusted (that is, before 961 files and programs listed in them will be honored). 962 963In general, file giveaways are a mistake -- if you can turn them 964off I recommend you do so. 965 966 967+------------------+ 968| FlexFAX SOFTWARE | 969+------------------+ 970 971Sam Leffler's FlexFAX software is still in beta test -- but he expects a 972public version out "later this week" [as of 3/1/93]. The following 973blurb is direct from Sam: 974 975 $Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $ 976 977 How To Obtain This Software (in case all you get is this file) 978 -------------------------------------------------------------- 979 The source code is available for public ftp on 980 sgi.com sgi/fax/v2.1.src.tar.Z 981 (192.48.153.1) 982 983 You can also obtain inst'able images for Silicon Graphics machines from 984 sgi.com sgi/fax/v2.1.inst.tar 985 (192.48.153.1) 986 987 For example, 988 % ftp -n sgi.com 989 .... 990 ftp> user anonymous 991 ... <type in password> 992 ftp> cd sgi/fax 993 ftp> binary 994 ftp> get v2.1.src.tar.Z 995 996 In general, the latest version of the 2.1 release of the software is 997 always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp 998 directory. This file is a link to the appropriate released version (so 999 don't waste your time retrieving the linked file as well!) Any files of 1000 the form v2.1.*.patch are shell scripts that can be used to patch older 1001 versions of the source code. For example, the file v2.1.0.patch would 1002 contain patches to update v2.1.0.tar.Z. (Note to beta testers: this is 1003 different than the naming conventions used during beta testing.) Patch 1004 files only work to go between consecutive versions, so if you are 1005 multiple versions behind the latest release, you will need to apply 1006 each patch file between your current version and the latest. 1007 1008 1009 Obtaining the Software by Electronic Mail 1010 ----------------------------------------- 1011 Do not send me requests for the software; they will be ignored (without 1012 response). If you cannot use FTP at all, there is a service called 1013 "ftpmail" available from gatekeeper.dec.com: you can send e-mail to 1014 this machine and it will use FTP to retrieve files for you and send you 1015 the files back again via e-mail. To find out more about the ftpmail 1016 service, send a message to "ftpmail@gatekeeper.dec.com" whose body 1017 consists of the single line "help". 1018 1019 1020 Obtaining the Software Within Silicon Graphics 1021 ---------------------------------------------- 1022 Internal to Silicon Graphics there are inst'able images on the host 1023 flake.asd in the directory /usr/dist. Thus you can do something like: 1024 1025 % inst -f flake.asd.sgi.com:/usr/dist/flexfax 1026 1027 to install the latest version of the software on your machine. 1028 1029 1030 What to do Once You've Retrieved Stuff 1031 -------------------------------------- 1032 The external distributions come in a compressed or uncompressed tar 1033 file. To extract the source distribution: 1034 1035 % zcat v2.1.src.tar.Z | tar xf - 1036 1037 (uncompress and extract individual files in current directory). To 1038 unpack and install the client portion of the inst'able distribution: 1039 1040 % mkdir dist 1041 % cd dist; tar xf ../v2.1.inst.tar; cd .. 1042 % inst -f dist/flexfax 1043 ... 1044 inst> go 1045 1046 (Note, the dist subdirectory is because some versions of inst fail if 1047 the files are in the current directory.) Server binaries are also 1048 included in the inst'able images as flexfax.server.*. They are not 1049 installed by default, so to get them also you need to do: 1050 1051 % inst -f flexfax 1052 ... 1053 inst> install flexfax.server.* 1054 inst> go 1055 1056 The SGI binaries were built for Version 4.0.5H of the IRIX operating 1057 system. They should work w/o problem on earlier versions of the 1058 system, but I have not fully tested this. Also, note that to install a 1059 server on an SGI machine, you need to have installed the Display 1060 PostScript execution environment product (dps_eoe). Otherwise, the fax 1061 server will not be able to convert PostScript to facsimile for 1062 transmission. 1063 1064 If you are working from the source distribution, look at the file 1065 README in the top of the source tree. If you are working from the inst 1066 images, the subsystem flexfax.man.readme contains the README file and 1067 other useful pieces of information--the installed files are placed in 1068 the directory /usr/local/doc/flexfax). Basically you will need to run 1069 the faxaddmodem script to setup and configure your fax modem. Consult 1070 the README file and the manual page for faxaddmodem for information. 1071 1072 1073 FlexFAX Mail List 1074 ----------------- 1075 A mailing list for users of this software is located on sgi.com. 1076 If you want to join this mailing list or have a list-related request 1077 such as getting your name removed from it, send a request to 1078 1079 majordomo@whizzer.wpd.sgi.com 1080 1081 For example, to subscribe, send the line "subscribe flexfax" in 1082 the body of your message. The line "help" will return a list of 1083 the commands understood by the mailing list management software. 1084 1085 Submissions (including bug reports) should be directed to: 1086 1087 flexfax@sgi.com 1088 1089 When corresponding about this software please always specify what 1090 version you have, what system you're running on, and, if the problem is 1091 specific to your modem, identify the modem and firmware revision. 1092 1093 1094+--------------------------------+ 1095| TWEAKING CONFIGURATION OPTIONS | 1096+--------------------------------+ 1097 1098There are a large number of configuration options that don't normally 1099need to be changed. However, if you feel you need to tweak them, you 1100can define the following M4 variables. This list is shown in four 1101columns: the name you define, the default value for that definition, 1102the option or macro that is affected (either Ox for an option or Dx 1103for a macro), and a brief description. Greater detail of the semantics 1104can be found in the Installation and Operations Guide. 1105 1106Some options are likely to be deprecated in future versions -- that is, 1107the option is only included to provide back-compatibility. These are 1108marked with "*". 1109 1110Remember that these options are M4 variables, and hence may need to 1111be quoted. In particular, arguments with commas will usually have to 1112be ``double quoted, like this phrase'' to avoid having the comma 1113confuse things. This is common for alias file definitions and for 1114the read timeout. 1115 1116M4 Variable Name Default Mac/Opt Description 1117================ ======= ======= =========== 1118confMAILER_NAME MAILER-DAEMON Dn The sender name used for 1119 internally generated 1120 outgoing messages. 1121confFROM_LINE From $g $d Dl The From_ line used when 1122 sending to files or programs. 1123confFROM_HEADER $?x$x <$g>$|$g$. The format of an internally 1124 Dq generated From: address. 1125confOPERATORS .:%@!^/[]+ Do Address operator characters. 1126confSMTP_LOGIN_MSG $j Sendmail $v/$Z ready at $b 1127 De The initial (spontaneous) 1128 SMTP greeting message. 1129confRECEIVED_HEADER $?sfrom $s $.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b 1130 HReceived 1131 The format of the Received: 1132 header in messages passed 1133 through this host. It is 1134 unwise to try to change this. 1135confSEVEN_BIT_INPUT False O7 Force input to seven bits? 1136confEIGHT_BIT_HANDLING pass8 O8 8-bit data handling 1137confALIAS_WAIT 10 Oa Wait (in minutes) for alias 1138 file rebuild. 1139confMIN_FREE_BLOCKS 4 Ob Minimum number of free blocks 1140 on queue filesystem to accept 1141 SMTP mail. 1142confBLANK_SUB . OB Blank (space) substitution 1143 character. 1144confCON_EXPENSIVE False Oc Avoid connecting immediately 1145 to mailers marked expensive? 1146confCHECKPOINT_INTERVAL 10 OC Checkpoint queue files 1147 every N recipients. 1148confDELIVERY_MODE background Od Default delivery mode. 1149confAUTO_REBUILD False OD Automatically rebuild 1150 alias file if needed. 1151confERROR_MODE (undefined) Oe Error message mode. 1152confERROR_MESSAGE (undefined) OE Error message header/file. 1153confSAVE_FROM_LINES False Of Save extra leading 1154 From_ lines. 1155confTEMP_FILE_MODE 0600 OF Temporary file mode. 1156confDEF_GROUP_ID 1 Og Default group id. 1157confMATCH_GECOS False OG Match GECOS field. 1158confMAX_HOP 17 Oh Maximum hop count. 1159confIGNORE_DOTS False Oi * Ignore dot as terminator 1160 for incoming messages? 1161confBIND_OPTS (empty) OI Default options for BIND. 1162confMIME_FORMAT_ERRORS True Oj * Send error messages as MIME- 1163 encapsulated messages per 1164 RFC 1344. 1165confFORWARD_PATH (undefined) OJ The colon-separated list of 1166 places to search for .forward 1167 files. N.B.: see the Security 1168 Notes section. 1169confMCI_CACHE_SIZE 2 Ok Size of open connection cache. 1170confMCI_CACHE_TIMEOUT 5m OK Open connection cache timeout. 1171confUSE_ERRORS_TO False Ol * Use the Errors-To: header to 1172 deliver error messages. This 1173 should not be necessary because 1174 of general acceptance of the 1175 envelope/header distinction. 1176confLOG_LEVEL 9 OL Log level. 1177confME_TOO False Om Include sender in group 1178 expansions. 1179confCHECK_ALIASES True On Check RHS of aliases when 1180 running newaliases. 1181confOLD_STYLE_HEADERS True Oo * Assume that headers without 1182 special chars are old style. 1183confDAEMON_OPTIONS (undefined) OO SMTP daemon options. 1184confPRIVACY_FLAGS authwarnings Op Privacy flags. 1185confCOPY_ERRORS_TO (undefined) OP Address for additional copies 1186 of all error messages. 1187confQUEUE_FACTOR (undefined) Oq Slope of queue-only function 1188confREAD_TIMEOUT (undefined) Or SMTP read timeouts. 1189confDONT_PRUNE_ROUTES False OR Don't prune down route-addr 1190 syntax addresses to the 1191 minimum possible. 1192confSAFE_QUEUE True Os * Commit all messages to disk 1193 before forking. 1194confMESSAGE_TIMEOUT 5d/4h OT Timeout for messages before 1195 sending error/warning message. 1196confTIME_ZONE USE_SYSTEM Ot Time zone info -- can be 1197 USE_SYSTEM to use the system's 1198 idea, USE_TZ to use the user's 1199 TZ envariable, or something 1200 else to force that value. 1201confDEF_USER_ID 1 Ou Default user id. 1202confUSERDB_SPEC (undefined) OU User database specification. 1203confFALLBACK_MX (undefined) OV Fallback MX host. 1204confTRY_NULL_MX_LIST False Ow If we are the best MX for a 1205 host and haven't made other 1206 arrangements, try connecting 1207 to the host directly; normally 1208 this would be a config error. 1209confQUEUE_LA 8 Ox Load average at which queue-only 1210 function kicks in. 1211confREFUSE_LA 12 OX Load average at which incoming 1212 SMTP connections are refused. 1213confWORK_RECIPIENT_FACTOR 1214 (undefined) Oy Cost of each recipient. 1215confSEPARATE_PROC False OY Run all deliveries in a 1216 separate process. 1217confWORK_CLASS_FACTOR (undefined) Oz Priority multiplier for class. 1218confWORK_TIME_FACTOR (undefined) OZ Cost of each delivery attempt. 1219confQUEUE_SORT_ORDER Priority O QueueSortOrder 1220 Queue sort algorithm: 1221 Priority or Host. 1222confCW_FILE /etc/sendmail.cw Name of file used to get the 1223 Fw local additions to the $=w 1224 class. 1225confSMTP_MAILER smtp - The mailer name used when 1226 SMTP connectivity is required. 1227 One of "smtp", "smtp8", or 1228 "esmtp". 1229confLOCAL_MAILER local - The mailer name used when 1230 local connectivity is required. 1231 Almost always "local". 1232confRELAY_MAILER relay - The default mailer name used 1233 for relaying any mail (e.g., 1234 to a BITNET_RELAY, a 1235 SMART_HOST, or whatever). 1236 This can reasonably be "suucp" 1237 if you are on a UUCP-connected 1238 site. 1239confDOMAIN_NAME (undefined) Dj If defined, sets $j. 1240 1241 1242+-----------+ 1243| HIERARCHY | 1244+-----------+ 1245 1246Within this directory are several subdirectories, to wit: 1247 1248m4 General support routines. These are typically 1249 very important and should not be changed without 1250 very careful consideration. 1251 1252cf The configuration files themselves. They have 1253 ".mc" suffixes, and must be run through m4 to 1254 become complete. The resulting output should 1255 have a ".cf" suffix. 1256 1257ostype Definitions describing a particular operating 1258 system type. These should always be referenced 1259 using the OSTYPE macro in the .mc file. Examples 1260 include "bsd4.3", "bsd4.4", "sunos3.5", and 1261 "sunos4.1". 1262 1263domain Definitions describing a particular domain, referenced 1264 using the DOMAIN macro in the .mc file. These are 1265 site dependent; for example, we contribute "cs.exposed.m4" 1266 and "cs.hidden.m4" which both describe hosts in the 1267 CS.Berkeley.EDU subdomain; the former displays the local 1268 hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the 1269 latter does its best to hide the identity of the local 1270 workstation inside the CS subdomain. 1271 1272mailer Descriptions of mailers. These are referenced using 1273 the MAILER macro in the .mc file. 1274 1275sh Shell files used when building the .cf file from the 1276 .mc file in the cf subdirectory. 1277 1278feature These hold special orthogonal features that you might 1279 want to include. They should be referenced using 1280 the FEATURE macro. 1281 1282hack Local hacks. These can be referenced using the HACK 1283 macro. They shouldn't be of more than voyeuristic 1284 interest outside the .Berkeley.EDU domain, but who knows? 1285 We've all got our own peccadillos. 1286 1287siteconfig Site configuration -- e.g., tables of locally connected 1288 UUCP sites. 1289 1290 1291+------------------------+ 1292| ADMINISTRATIVE DETAILS | 1293+------------------------+ 1294 1295The following sections detail usage of certain internal parts of the 1296sendmail.cf file. Read them carefully if you are trying to modify 1297the current model. If you find the above descriptions adequate, these 1298should be {boring, confusing, tedious, ridiculous} (pick one or more). 1299 1300RULESETS (* means built in to sendmail) 1301 1302 0 * Parsing 1303 1 * Sender rewriting 1304 2 * Recipient rewriting 1305 3 * Canonicalization 1306 4 * Post cleanup 1307 5 * Local address rewrite (after aliasing) 1308 1x mailer rules (sender qualification) 1309 2x mailer rules (recipient qualification) 1310 3x mailer rules (sender header qualification) 1311 4x mailer rules (recipient header qualification) 1312 5x mailer subroutines (general) 1313 6x mailer subroutines (general) 1314 7x mailer subroutines (general) 1315 8x reserved 1316 90 Mailertable host stripping 1317 96 Bottom half of Ruleset 3 (ruleset 6 in old sendmail) 1318 97 Hook for recursive ruleset 0 call (ruleset 7 in old sendmail) 1319 98 Local part of ruleset 0 (ruleset 8 in old sendmail) 1320 1321 1322MAILERS 1323 1324 0 local, prog local and program mailers 1325 1 [e]smtp, relay SMTP channel 1326 2 uucp-* UNIX-to-UNIX Copy Program 1327 3 netnews Network News delivery 1328 4 fax Sam Leffler's FlexFAX software 1329 1330 1331MACROS 1332 1333 A 1334 B Bitnet Relay 1335 C 1336 D The local domain -- usually not needed 1337 E 1338 F FAX Relay 1339 G 1340 H mail Hub (for mail clusters) 1341 I 1342 J 1343 K 1344 L Luser Relay 1345 M Masquerade (who I claim to be) 1346 N 1347 O 1348 P 1349 Q 1350 R Relay (for unqualified names) 1351 S Smart Host 1352 T 1353 U my UUCP name (if I have a UUCP connection) 1354 V UUCP Relay (class V hosts) 1355 W UUCP Relay (class W hosts) 1356 X UUCP Relay (class X hosts) 1357 Y UUCP Relay (all other hosts) 1358 Z Version number 1359 1360 1361CLASSES 1362 1363 A 1364 B 1365 C 1366 D "dotted" users 1367 E addresses that should not seem to come from $M 1368 F hosts we forward for 1369 G 1370 H 1371 I 1372 J 1373 K 1374 L addresses that should not be forwarded to $R 1375 M 1376 N 1377 O operators that indicate network operations (cannot be in local names) 1378 P top level pseudo-domains: BITNET, FAX, UUCP, etc. 1379 Q 1380 R 1381 S 1382 T 1383 U locally connected UUCP hosts 1384 V UUCP hosts connected to relay $V 1385 W UUCP hosts connected to relay $W 1386 X UUCP hosts connected to relay $X 1387 Y locally connected smart UUCP hosts 1388 Z locally connected domain-ized UUCP hosts 1389 . the class containing only a dot 1390 1391 1392M4 DIVERSIONS 1393 1394 1 Local host detection and resolution 1395 2 Local Ruleset 3 additions 1396 3 Local Ruleset 0 additions 1397 4 UUCP Ruleset 0 additions 1398 5 locally interpreted names (overrides $R) 1399 6 local configuration (at top of file) 1400 7 mailer definitions 1401 8 1402 9 special local rulesets (1 and 2) 1403