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