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