151220Seric 251220Seric 357246Seric NEW SENDMAIL CONFIGURATION FILES 451220Seric 557246Seric Eric Allman <eric@CS.Berkeley.EDU> 651220Seric 7*63761Seric @(#)README 8.2 (Berkeley) 07/11/93 851220Seric 951220Seric 1057246SericThis document describes the sendmail configuration files being used 1157246Sericat Berkeley. These use features in the new (R6) sendmail, and although 1257246Sericthere is an ``OLDSENDMAIL'' mode, they haven't really been tested on 1357247Sericold versions of sendmail and cannot be expected to work well. 1451220Seric 1557246SericThese configuration files are probably not as general as previous 1657246Sericversions, and don't handle as many of the wierd cases automagically. 1757246SericI was able to simplify by them for two reasons. First, the network 1857246Serichas become more consistent -- for example, at this point, everyone 1957246Sericon the internet is supposed to be running a name server, so hacks to 2057246Serichandle NIC-registered hosts can go away. Second, I assumed that a 2157246Sericsubdomain would be running SMTP internally -- UUCP is presumed to be 2257246Serica long-haul protocol. I realize that this is not universal, but it 2357246Sericdoes describe the vast majority of sites with which I am familiar, 2457246Sericincluding those outside the US. 2551220Seric 2657246SericOf course, the downside of this is that if you do live in a wierd 2757246Sericworld, things are going to get wierder for you. I'm sorry about that, 2857246Sericbut at the time we at Berkeley had a problem, and it seemed like the 2957246Sericright thing to do. 3051220Seric 3157247SericThis package requires a post-V7 version of m4; if you are running the 3257247Seric4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with 3357247Serica newer version. You can m4-expand on their system, then run locally. 3457247SericSunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work. GNU m4 (which is a 3557247Sericlanguage unto itself) also works, but I don't intend to work so hard 3657247Sericto keep this up in the future. [Note to GNU folks: the construct 3757246Seric"define(`FOO')" should work without my having to add a null value.] 3851220Seric 3958284SericIF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run 4058284Seric"m4 foo.mc > foo.cf" -- that should be all you need. 4158284Seric 4258284SericTo get started, you may want to look at tcpproto.mc (for TCP-only 4358284Sericsites) and uucpproto.m4 (for UUCP-only sites). Others are versions 4458284Sericthat we use at Berkeley, although not all are in current use. For 4558284Sericexample, ucbarpa has gone away, but I've left ucbarpa.mc in because 4658284Sericit demonstrates some interesting techniques. 4758284Seric 4857246SericI'm not pretending that this README describes everything that these 4957246Sericconfiguration files can do; clever people can probably tweak them 5057246Sericto great effect. But it should get you started. 5157246Seric 5258087Seric 5357246Seric+--------------------------+ 5457246Seric| INTRODUCTION AND EXAMPLE | 5557246Seric+--------------------------+ 5657246Seric 5757246SericConfiguration files are contained in the subdirectory "cf", with a 5857246Sericsuffix ".mc". They must be run through "m4" to produce a ".cf" file. 5957246Seric 6051220SericLet's examine a typical .mc file (cf/cs-exposed.mc): 6151220Seric 6251220Seric divert(-1) 6351220Seric # 6451220Seric # Copyright (c) 1983 Eric P. Allman 6551220Seric # Copyright (c) 1988 The Regents of the University of California. 6651220Seric # All rights reserved. 6751220Seric # 6851220Seric # Redistribution and use in source and binary forms are permitted 6951220Seric # provided that the above copyright notice and this paragraph are 7051220Seric # duplicated in all such forms and that any documentation, 7151220Seric # advertising materials, and other materials related to such 7251220Seric # distribution and use acknowledge that the software was developed 7351220Seric # by the University of California, Berkeley. The name of the 7451220Seric # University may not be used to endorse or promote products derived 7551220Seric # from this software without specific prior written permission. 7651220Seric # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 7751220Seric # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 7851220Seric # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 7951220Seric # 8051220Seric 8157246SericThe divert(-1) will delete the crud in the resulting output file. 8257247SericThe copyright notice is what your lawyers require. Our lawyers require 8357246Sericthe one that I've included in my files. A copyleft is a copyright by 8457246Sericanother name. 8551220Seric 8657246SericThe next line MUST be 8757246Seric 8851220Seric include(`../m4/cf.m4') 8951220Seric 9057246SericThis will pull in the M4 macros you will need to make sense of 9157246Sericeverything else. As the saying goes, don't think about it, just 9257246Sericdo it. If you don't do it, don't bother reading the rest of this 9357246Sericfile. 9451220Seric 9556778Seric VERSIONID(`<SCCS or RCS version id>') 9651220Seric 9751220SericVERSIONID is a macro that stuffs the version information into the 9851220Sericresulting file. We use SCCS; you could use RCS, something else, or 9957246Sericomit it completely. This is not the same as the version id included 10057246Sericin SMTP greeting messages -- this is defined in m4/version.m4. 10151220Seric 10251268Seric DOMAIN(cs.exposed) 10351220Seric 10451220SericThis example exposes the host inside of the CS subdomain -- that is, 10551220Sericit doesn't try to hide the name of the workstation to the outside 10651220Sericworld. Changing this to DOMAIN(cs.hidden) would have made outgoing 10751220Sericmessages refer to "<username>@CS.Berkeley.EDU" instead of using the 10857246Sericlocal hostname. Internaly this is effected by using 10957246Seric"MASQUERADE_AS(CS.Berkeley.EDU)". 11051220Seric 11151268Seric MAILER(smtp) 11251220Seric 11351309SericThese describe the mailers used at the default CS site site. The 11451309Sericlocal mailer is always included automatically. 11551220Seric 11658087Seric 11757246Seric+--------+ 11857246Seric| OSTYPE | 11957246Seric+--------+ 12057246Seric 12151220SericNote that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes 12251220Sericdefault Computer Science Division environment. There are several 12357247Sericexplicit environments available: bsd4.3, bsd4.4, hpux, irix, osf1, 12457247Sericriscos4.5, sunos3.5, sunos4.1, and ultrix4.1. These change things 12557247Sericlike the location of the alias file and queue directory. Some of 12657247Sericthese files are identical to one another. 12751220Seric 12857246SericOperating system definitions are easy to write. They may define 12957246Sericthe following variables (everything defaults, so an ostype file 13057246Sericmay be empty). 13151220Seric 13257246SericALIAS_FILE [/etc/aliases] The location of the text version 13359761Seric of the alias file(s). It can be a comma-separated 13459761Seric list of names. 13557246SericHELP_FILE [/usr/lib/sendmail.hf] The name of the file 13657246Seric containing information printed in response to 13757246Seric the SMTP HELP command. 13857246SericQUEUE_DIR [/var/spool/mqueue] The directory containing 13957246Seric queue files. 14057246SericSTATUS_FILE [/etc/sendmail.st] The file containing status 14157246Seric information. 14258087SericLOCAL_MAILER_PATH [/bin/mail] The program used to deliver local mail. 14357246SericLOCAL_MAILER_FLAGS [rn] The flags used by the local mailer. The 14457246Seric flags lsDFMm are always included. 145*63761SericLOCAL_MAILER_ARGS [mail -d $u] The arguments passed to deliver local 146*63761Seric mail. 14758087SericLOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. 14858087SericUSENET_MAILER_PATH [/usr/lib/news/inews] The name of the program 14958087Seric used to submit news. 15058087SericUSENET_MAILER_FLAGS [rlsDFMmn] The mailer flags for the usenet mailer. 15158087SericUSENET_MAILER_ARGS [-m -h -n] The command line arguments for the 15258087Seric usenet mailer. 15359886SericSMTP_MAILER_FLAGS [undefined] Flags added to SMTP mailer. 15459886SericUUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. 155*63761SericUUCP_MAILER_ARGS [uux - -r -z -a$f -gC $h!rmail ($u)] The arguments 156*63761Seric passed to the UUCP mailer. 15757246SericHOSTMAP_SPEC [dbm -o /etc/hostmap] The value for the builtin 15857246Seric hostmap key definition. You can redefine this 15957246Seric to change the class, flags, and filename of 16057246Seric the hostmap. The default flag (-o) makes this 16157246Seric map optional. 16257246Seric 16357246SericIn addition, the following boolean flags may be defined -- the value 16457246Sericis ignored. 16557246Seric 16657246SericNEED_DOMAIN If set, the $j macro is defined as $w.$D. 16757246Seric If not set, $j is defined as $w. If this is 16857246Seric set, the domain must be defined using the line 16957246Seric DD<domainname> (probably in the domain file, 17057246Seric but possibly in the .mc file). You will only 17157246Seric need this if you define your system hostname 17257246Seric without a domain (type "hostname" -- if it 17358087Seric has no dots in the output, you qualify) AND 17458087Seric if you are not running the nameserver AND if 17558087Seric the first (canonical) name in /etc/hosts for 17658087Seric your machine has no domain -- OR if you are 17758087Seric running Ultrix or OSF/1 sendmail. Either of 17858087Seric these is probably a mistake. 17957246Seric 18057246Seric+---------+ 18157246Seric| DOMAINS | 18257246Seric+---------+ 18357246Seric 18457246SericYou will probably want to collect domain-dependent defines into one 18557246Sericfile, referenced by the DOMAIN macro. For example, our Berkeley 18657246Sericdomain file includes definitions for several internal distinguished 18757246Serichosts: 18857246Seric 18957246SericUUCP_RELAY The host that will forward UUCP-addressed email. 19057246Seric If not defined, all UUCP sites must be directly 19157246Seric connected. 19257246SericBITNET_RELAY The host that will forward BITNET-addressed email. 19357246Seric If not defined, the .BITNET pseudo-domain won't work. 19457246SericCSNET_RELAY The host that will forward CSNET-addressed email. 19557246Seric If not defined, the .CSNET pseudo-domain won't work. 19657246SericLOCAL_RELAY The site that will handle unqualified names -- that 19757246Seric is, names with out an @domain extension. If not set, 19857246Seric they are assumed to belong on this machine. This 19957246Seric allows you to have a central site to store a 20057246Seric company- or department-wide alias database. This 20157246Seric only works at small sites, and there are better 20257246Seric methods. 20357246Seric 20457246SericThe domain file can also be used to define a domain name, if needed 20557982Seric(using "DD<domain>") and set certain site-wide features. If all hosts 20657982Sericat your site masquerade behind one email name, you could also use 20757982SericMASQUERADE_AS here. 20857246Seric 20958408SericYou do not have to define a domain -- in particular, if you are a 21058408Sericsingle machine sitting off somewhere, it is probably more work than 21158408Sericit's worth. This is just a mechanism for combining "domain dependent 21258408Sericknowledge" into one place. 21358408Seric 21457246Seric+---------+ 21557246Seric| MAILERS | 21657246Seric+---------+ 21757246Seric 21851220SericThere are fewer mailers supported in this version than the previous 21951220Sericversion, owing mostly to a simpler world. 22051220Seric 22151220Sericlocal The local and prog mailers. You will almost always 22251220Seric need these; the only exception is if you relay ALL 22357247Seric your mail to another site. This mailer is included 22457247Seric automatically. 22551220Seric 22651220Sericsmtp The Simple Mail Transport Protocol mailer. This does 22751220Seric not hide hosts behind a gateway or another other 22851220Seric such hack; it assumes a world where everyone is 229*63761Seric running the name server. This file actually defines 230*63761Seric three mailers: "smtp" for regular (old-style) SMTP to 231*63761Seric other servers, "esmtp" for extended SMTP to other 232*63761Seric servers, and "relay" for transmission to our 233*63761Seric RELAY_HOST or MAILER_HUB. 23451220Seric 23551220Sericuucp The Unix-to-Unix Copy Program mailer. Actually, this 23651220Seric defines two mailers, "uucp" and "suucp". The latter 23751220Seric is for when you know that the UUCP mailer at the other 23851220Seric end can handle multiple recipients in one transfer. 23957246Seric When you invoke this, sendmail looks for all names in 24057246Seric the $=U class and sends them to the uucp mailer; all 24157246Seric names in the $=Y class are sent to suucp. Note that 24257246Seric this is a function of what version of rmail runs on 24357246Seric the receiving end, and hence may be out of your control. 24451220Seric 24558087Sericusenet Usenet (network news) delivery. If this is specified, 24658087Seric an extra rule is added to ruleset 0 that forwards all 24758087Seric local email for users named ``group.usenet'' to the 24858087Seric ``inews'' program. Note that this works for all groups, 24958087Seric and may be considered a security problem. 25058087Seric 25158363Sericfax Facsimile transmission. This is experimental and based 25258363Seric on Sam Leffler's FlexFAX software. For more information, 25358363Seric see below. 25458087Seric 25558363Seric 25657246Seric+----------+ 25757246Seric| FEATURES | 25857246Seric+----------+ 25951268Seric 26057246SericSpecial features can be requested using the "FEATURE" macro. For 26157246Sericexample, the .mc line: 26257246Seric 26357246Seric FEATURE(use_cw_file) 26457246Seric 26557246Serictells sendmail that you want to have it read an /etc/sendmail.cw 26658782Sericfile to get values for class $=w. The FEATURE may contain a single 26758782Sericoptional parameter -- for example: 26857246Seric 26958782Seric FEATURE(mailertable, dbm /usr/lib/mailertable) 27058782Seric 27158782SericAvailable features are: 27258782Seric 27357246Sericuse_cw_file Read the file /etc/sendmail.cw file to get alternate 27457246Seric names for this host. This might be used if you were 27557246Seric on a host that MXed for a dynamic set of other 27657246Seric hosts. If the set is static, just including the line 27757246Seric "Cw<name1> <name2> ..." is probably superior. 27858408Seric The actual filename can be overridden by redefining 27958408Seric confCW_FILE. 28058087Sericredirect Reject all mail addressed to "address.REDIRECT" with 28158087Seric a ``551 User not local; please try <address>'' message. 28258087Seric If this is set, you can alias people who have left 28358087Seric to their new address with ".REDIRECT" appended. 28458284Sericnouucp Don't do anything special with UUCP addresses at all. 28559080Sericnocanonify Don't pass addresses to $[ ... $] for canonification. 28659080Seric This would generally only be used by sites that only 28759080Seric act as mail gateways or which have user agents that do 28859080Seric full canonification themselves. 28958526Sericnotsticky By default, email sent to "user@local.host" are marked 29058526Seric as "sticky" -- that is, the local addresses aren't 29158526Seric matched against UDB and don't go through ruleset 5. 29258526Seric This features disables this treatment. It would 29358526Seric normally be used on network gateway machines. 29458782Sericmailertable Include a "mailer table" which can be used to override 29558782Seric routing for particular domains. The argument of the 29658782Seric FEATURE may be the key definition. If none is specified, 29758782Seric the definition used is: 298*63761Seric hash /etc/mailertable -o 299*63761Seric Keys in this database are fully qualified domain names 300*63761Seric or partial domains preceded by a dot -- for example, 301*63761Seric "vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU". 302*63761Seric Values must be of the form: 30358782Seric mailer:domain 304*63761Seric where "mailer" is the internal mailer name, and "domain" 305*63761Seric is where to send the message. These maps are not 306*63761Seric reflected into the message header. 307*63761Sericdomaintable Include a "domain table" which can be used to provide 308*63761Seric full domains on unqualified (single word) hosts. The 309*63761Seric argument of the FEATURE may be the key definition. If 310*63761Seric none is specified, the definition used is: 311*63761Seric hash /etc/domaintable -o 312*63761Seric The key in this table is the unqualified host name; the 313*63761Seric value is the fully qualified domain. Anything in the 314*63761Seric domaintable is reflected into headers; that is, this 315*63761Seric is done in ruleset 3. 31659034Sericbitdomain Look up bitnet hosts in a table to try to turn them into 31759034Seric internet addresses. The table can be built using the 31859034Seric bitdomain program contributed by John Gardiner Meyers. 31959034Seric The argument of the FEATURE may be the key definition; if 32059034Seric none is specified, the definition used is: 32159034Seric hash /etc/bitdomain.db -o 32259034Seric Keys are the bitnet hostname; values are the corresponding 32359034Seric internet hostname. 32459037Sericuucpdomain Similar feature for UUCP hosts. The default map definition 32559037Seric is: 32659037Seric hash /etc/uudomain.db -o 32759037Seric At the moment there is no automagic tool to build this 32859037Seric database. 32960263Sericalways_add_domain 33060263Seric Include the local host domain even on locally delivered 33160263Seric mail. Normally it is not added unless it is already 33260263Seric present. 333*63761Sericallmasquerade If masquerading is enabled (using MASQUERADE_AS), this 334*63761Seric feature will cause recipient addresses to also masquerade 335*63761Seric as being from the masquerade host. Normally they get 336*63761Seric the local hostname. Although this may be right for 337*63761Seric ordinary users, it can break local aliases. For example, 338*63761Seric if you send to "localalias", the originating sendmail will 339*63761Seric find that alias and send to all members, but send the 340*63761Seric message with "To: localalias@masqueradehost". Since that 341*63761Seric alias likely does not exist, replies will fail. Use this 342*63761Seric feature ONLY if you can guarantee that the ENTIRE 343*63761Seric namespace on your masquerade host supersets all the 344*63761Seric local entries. 34557246Seric 34657246SericOther FEATUREs should be defined, but I was trying to keep these 34757246Sericconfig files fairly lean and mean. 34857246Seric 34958087Seric 35057246Seric+-------+ 35157246Seric| HACKS | 35257246Seric+-------+ 35357246Seric 35457246SericSome things just can't be called features. To make this clear, 35557247Sericthey go in the hack subdirectory and are referenced using the HACK 35657246Sericmacro. These will tend to be site-dependent. The release 35757246Sericincludes the Berkeley-dependent "cssubdomain" hack (that makes 35857246Sericsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU; 35957246Sericthis is intended as a short-term aid while we move hosts into 36057246Sericsubdomains. 36157246Seric 36258087Seric 36357246Seric+--------------------+ 36457246Seric| SITE CONFIGURATION | 36557246Seric+--------------------+ 36657246Seric 36757246SericComplex sites will need more local configuration information, such as 36857246Sericlists of UUCP hosts they speak with directly. This can get a bit more 36957246Serictricky. For an example of a "complex" site, see cf/ucbvax.mc. 37057246Seric 37157246SericThe SITECONFIG macro allows you to indirectly reference site-dependent 37257246Sericconfiguration information stored in the siteconfig subdirectory. For 37357246Sericexample, the line 37457246Seric 37557246Seric SITECONFIG(uucp.ucbvax, ucbvax, U) 37657246Seric 37757246Sericreads the file uucp.ucbvax for local connection information. The 37857246Sericsecond parameter is the local name (in this case just "ucbvax" since 37957246Sericit is locally connected, and hence a UUCP hostname) and the name of 38057246Sericthe class in which to store the host information. Another SITECONFIG 38157246Sericline reads 38257246Seric 38357246Seric SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W) 38457246Seric 38557246SericThis says that the file uucp.ucbarpa contains the list of UUCP sites 38657246Sericconnected to ucbarpa.Berkeley.EDU. The $=W class will be used to 38757246Sericstore this list. [The machine ucbarpa is gone now, but I've left 38857246Sericthis out-of-date configuration file around to demonstrate how you 38957246Sericmight do this.] 39057246Seric 39157246SericThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing 39257246Sericmore than a sequence of SITE macros describing connectivity. For 39357246Sericexample: 39457246Seric 39557246Seric SITE(cnmat) 39657246Seric SITE(sgi olympus) 39757246Seric 39857246SericThe second example demonstrates that you can use two names on the 39957246Sericsame line; these are usually aliases for the same host (or are at 40057246Sericleast in the same company). 40157246Seric 40258087Seric 40357246Seric+-------------------+ 40457246Seric| TWEAKING RULESETS | 40557246Seric+-------------------+ 40657246Seric 40751268SericFor more complex configurations, you can define special rules. 40851268SericThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing 40951268Sericthe names. Any modifications made here are reflected in the header. 41051268Seric 41151268SericA common use is to convert old UUCP addreses to SMTP addresses using 41251268Sericthe UUCPSMTP macro. For example: 41351268Seric 41451268Seric LOCAL_RULE_3 41551268Seric UUCPSMTP(decvax, decvax.dec.com) 41651268Seric UUCPSMTP(research, research.att.com) 41751268Seric 41851268Sericwill cause addresses of the form "decvax!user" and "research!user" 41951268Sericto be converted to "user@decvax.dec.com" and "user@research.att.com" 42051268Sericrespectively. 42151268Seric 42257246SericThis could also be used to look hosts in a database map: 42357246Seric 42457246Seric LOCAL_RULE_3 42557246Seric R$* < @ $+ > $* $: $1 < @ $(hostmap $2 $) > $3 42657246Seric 42757246SericThis map would be defined in the LOCAL_CONFIG portion, as shown below. 42857246Seric 42951268SericSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules. 43051268SericFor example, new rules are needed to parse hostnames that you accept 43151309Sericvia MX records. For example, you might have: 43251268Seric 43351309Seric LOCAL_RULE_0 43451309Seric R$+ < @ cnmat.Berkeley.EDU > $#uucp $@ cnmat $: $1 43551309Seric 43651309SericYou would use this if you had installed an MX record for cnmat.Berkeley.EDU 43751309Sericpointing at this host; this rule catches the message and forwards it on 43851309Sericusing UUCP. 43951309Seric 44058681SericYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2. 44158681SericThese rulesets are normally empty. 44258681Seric 44357246SericA similar macro is LOCAL_CONFIG. This introduces lines added after the 44457246Sericboilerplate option setting but before rulesets, and can be used to 44557945Sericdeclare local database maps or whatever. For example: 44651268Seric 44757246Seric LOCAL_CONFIG 44857246Seric Khostmap hash /etc/hostmap.db 44957246Seric Kyplocal nis -m hosts.byname 45051220Seric 45158087Seric 45257246Seric+---------------------------+ 45357246Seric| MASQUERADING AND RELAYING | 45457246Seric+---------------------------+ 45557246Seric 45657246SericYou can have your host masquerade as another using 45757246Seric 45857246Seric MASQUERADE_AS(host.domain) 45957246Seric 46057246SericThis causes outgoing SMTP mail to be labelled as coming from the 46157246Sericindicated domain, rather than $j. One normally masquerades as one 46257246Sericof your own subdomains (for example, it's unlikely that I would 46357246Sericchoose to masquerade as an MIT site). 46457246Seric 46557246Sericthere are always users that need to be "exposed" -- that is, their 46657246Sericinternal site name should be displayed instead of the masquerade name. 46757246SericRoot is an example. You can add users to this list using 46857246Seric 46957246Seric EXPOSED_USER(usernames) 47057246Seric 47157246SericThis adds users to class E; you could also use something like 47257246Seric 47357246Seric FE/etc/sendmail.cE 47457246Seric 47557246SericYou can also arrange to relay all unqualified names (that is, names 47657246Sericwithout @host) to a relay host. For example, if you have a central 47757246Sericemail server, you might relay to that host so that users don't have 47857246Sericto have .forward files or aliases. You can do this using 47957246Seric 48058071Seric define(`LOCAL_RELAY', mailer:hostname) 48157246Seric 48258071SericThe ``mailer:'' can be omitted, in which case the mailer defaults to 48358071Seric"smtp". There are some user names that you don't want relayed, perhaps 48458071Sericbecause of local aliases. A common example is root, which may be 48558071Sericlocally aliased. You can add entries to this list using 48657246Seric 48757246Seric LOCAL_USER(usernames) 48857246Seric 48957246SericThis adds users to class L; you could also use something like 49057246Seric 49157246Seric FL/etc/sendmail.cL 49257246Seric 49357591SericIf you want all mail sent to a centralized hub, as for a shared 49457591Seric/var/spool/mail scheme, use 49557591Seric 49658071Seric define(`MAIL_HUB', mailer:hostname) 49757591Seric 49858071SericAgain, ``mailer:'' defaults to "smtp". If you define both LOCAL_RELAY 49958071Sericand MAIL_HUB, unqualified names and names in class L will be sent to 50058071Sericthe LOCAL_RELAY and other local names will be sent to MAIL_HUB. For 50158071Sericexample, if are on machine mastodon.CS.Berkeley.EDU, the following 50258071Sericcombinations of settings will have the indicated effects: 50357591Seric 50457591Sericemail sent to.... eric eric@mastodon.CS.Berkeley.EDU 50557591Seric 50657591SericLOCAL_RELAY set to mail.CS.Berkeley.EDU (delivered locally) 50757591Sericmail.CS.Berkeley.EDU 50857591Seric 50957591SericMAIL_HUB set to mammoth.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU 51057591Sericmammoth.CS.Berkeley.EDU 51157591Seric 51257591SericBoth LOCAL_RELAY and mail.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU 51357591SericMAIL_HUB set as above 51457591Seric 51558071Seric 51658071Seric+-------------------------------+ 51758071Seric| NON-SMTP BASED CONFIGURATIONS | 51858071Seric+-------------------------------+ 51958071Seric 52058071SericThese configuration files are designed primarily for use by SMTP-based 52158071Sericsites. I don't pretend that they are well tuned for UUCP-only or 52258071SericUUCP-primarily nodes (the latter is defined as a small local net 52358071Sericconnected to the rest of the world via UUCP). However, there is one 52458071Serichook to handle some special cases. 52558071Seric 52658071SericYou can define a ``smart host'' that understands a richer address syntax 52758071Sericusing: 52858071Seric 52958071Seric define(`SMART_HOST', mailer:hostname) 53058071Seric 53158071SericIn this case, the ``mailer:'' defaults to "suucp". Any messages that 53258071Sericcan't be handled using the usual UUCP rules are passed to this host. 53358071Seric 53458071SericIf you are on a local SMTP-based net that connects to the outside 53558071Sericworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. 53658071SericFor example: 53758071Seric 53858071Seric define(`SMART_HOST', suucp:uunet) 53958071Seric LOCAL_NET_CONFIG 540*63761Seric R$* < @ $* .$m. > $* $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3 54158071Seric 54258071SericThis will cause all names that end in your domain name ($m) via 54358071SericSMTP; anything else will be sent via suucp (smart UUCP) to uunet. 544*63761SericIf you have FEATURE(nocanonify), you may need to omit the dots after 545*63761Sericthe $m. If you are running a local DNS inside your domain which is 546*63761Sericnot otherwise connected to the outside world, you probably want to 547*63761Sericuse: 54858071Seric 549*63761Seric define(`SMART_HOST', smtp:fire.wall.com) 550*63761Seric LOCAL_NET_CONFIG 551*63761Seric R$* < @ $* . > $* $#smtp $@ $2. $: $1 < @ $2. > $3 55258071Seric 553*63761SericThat is, send directly only to things you found in your DNS lookup; 554*63761Sericanything else goes through SMART_HOST. 555*63761Seric 556*63761Seric 55758363Seric+------------------+ 55858363Seric| FlexFAX SOFTWARE | 55958363Seric+------------------+ 56058363Seric 56158363SericSam Leffler's FlexFAX software is still in beta test -- but he expects a 56258363Sericpublic version out "later this week" [as of 3/1/93]. The following 56358363Sericblurb is direct from Sam: 56458363Seric 56558363Seric $Header: /usr/people/sam/fax/RCS/HOWTO,v 1.7 93/02/08 09:00:55 sam Exp $ 56658363Seric 56758363Seric How To Obtain This Software (in case all you get is this file) 56858363Seric 56958363Seric The source code is available for public ftp on 57058363Seric sgi.com sgi/fax/v2.1beta.tar.Z 57158363Seric (192.48.153.1) 57258363Seric 57358363Seric You can also obtain inst'able images for Silicon Graphics machines from 57458363Seric sgi.com sgi/fax/v2.1beta.inst.tar 57558363Seric (192.48.153.1) 57658363Seric 57758363Seric For example, 57858363Seric % ftp -n sgi.com 57958363Seric .... 58058363Seric ftp> user anonymous 58158363Seric ... <type in password> 58258363Seric ftp> cd sgi/fax 58358363Seric ftp> binary 58458363Seric ftp> get v2.1beta.tar.Z 58558363Seric 58658363Seric If you cannot use FTP at all, there is a service called "ftpmail" 58758363Seric available from gateekeeper.dec.com: you can send e-mail to this 58858363Seric machine and it will use FTP to retrieve files for you and send you the 58958363Seric files back again via e-mail. To find out more about the ftpmail 59058363Seric service, send a message to "ftpmail@gatekeeper.dec.com" whose body 59158363Seric consists of the single line "help". 59258363Seric 59358363Seric Internal to Silicon Graphics there are inst'able images on the host 59458363Seric flake.asd in the directory /d/dist. Thus you can do something like: 59558363Seric 59658363Seric % inst -f flake.asd.sgi.com:/d/dist/flexfax 59758363Seric 59858363Seric to install the software on your machine. 59958363Seric 60058363Seric The external distributions come in a compressed or uncompressed tar 60158363Seric file. To extract the source distribution: 60258363Seric 60358363Seric % zcat v2.1beta.tar.Z | tar xf - 60458363Seric 60558363Seric (uncompress and extract individual files in current directory). To 60658363Seric unpack and install the client portion of the inst'able distribution: 60758363Seric 60858363Seric % mkdir dist 60958363Seric % cd dist; tar xf ../v2.1beta.inst.tar; cd .. 61058363Seric % inst -f dist/flexfax 61158363Seric ... 61258363Seric inst> go 61358363Seric 61458363Seric (Note, the dist subdirectory is because some versions of inst fail if 61558363Seric the files are in the current directory.) Server binaries is also 61658363Seric included in the inst'able images as flexfax.server.*. It is not 61758363Seric installed by default, so to get it also you need to extract the do: 61858363Seric 61958363Seric % inst -f flexfax 62058363Seric ... 62158363Seric inst> install flexfax.server.* 62258363Seric inst> go 62358363Seric 62458363Seric The SGI binaries were built for Version 4.0.5 of the IRIX operating 62558363Seric system. They should work w/o problem on earlier versions of the 62658363Seric system, but I have not fully tested this. Also, note that to install a 62758363Seric server on an SGI machine, you need to have installed the Display 62858363Seric PostScript execution environment product (dps_eoe). Otherwise, the fax 62958363Seric server will not be able to convert PostScript to facsimile for 63058363Seric transmission. 63158363Seric 63258363Seric If you are working from the source distribution, look at the file README 63358363Seric in the top of the source tree. If you are working from the inst images, 63458363Seric you need to run faxaddmodem to setup and configure your fax modem. Do 63558363Seric man faxaddmodem for more information. 63658363Seric 63758363SericAlso from Sam: 63858363Seric 63958363Seric A mailing list for users of this software is located on sgi.com. 64058363Seric If you want to join this mailing list or have a list-related request 64158363Seric such as getting your name removed from it, send a request to 64258363Seric 64358363Seric flexfax-request@sgi.com 64458363Seric 64558363Seric Submissions (including bug reports) should be directed to: 64658363Seric 64758363Seric flexfax@sgi.com 64858363Seric 64958363Seric 65057945Seric+--------------------------------+ 65157945Seric| TWEAKING CONFIGURATION OPTIONS | 65257945Seric+--------------------------------+ 65357945Seric 65457945SericThere are a large number of configuration options that don't normally 65557945Sericneed to be changed. However, if you feel you need to tweak them, you 65657945Sericcan define the following M4 variables. This list is shown in four 65757945Sericcolumns: the name you define, the default value for that definition, 65857945Sericthe option or macro that is affected (either Ox for an option or Dx 65957945Sericfor a macro), and a brief description. Greater detail of the semantics 66057945Sericcan be found in the Installation and Operations Guide. 66157945Seric 66263582SericSome options are likely to be deprecated in future versions -- that is, 66363582Sericthe option is only included to provide back-compatibility. These are 66463582Sericmarked with "*". 66563582Seric 66657945SericM4 Variable Name Default Mac/Opt Description 66757945SericconfMAILER_NAME MAILER-DAEMON Dn The sender name used for 66857945Seric internally generated 66957945Seric outgoing messages. 67058681SericconfFROM_LINE From $g $d Dl The From_ line used when 67158681Seric sending to files or programs. 67257945SericconfFROM_HEADER $?x$x <$g>$|$g$. The format of an internally 67357945Seric Dq generated From: address. 67457945SericconfOPERATORS .:%@!^/[] Do Address operator characters. 67557945SericconfSTMP_LOGIN_MSG $j Sendmail $v/$Z ready at $b 67657945Seric De The initial (spontaneous) 67757945Seric SMTP greeting message. 67859743SericconfSEVEN_BIT_INPUT False O7 Force input to seven bits? 67957945SericconfALIAS_WAIT 10 Oa Wait (in minutes) for alias 68057945Seric file rebuild. 68158087SericconfMIN_FREE_BLOCKS 4 Ob Minimum number of free blocks 68258087Seric on queue filesystem to accept 68358087Seric SMTP mail. 68457945SericconfBLANK_SUB . OB Blank (space) substitution 68557945Seric character. 68657945SericconfCON_EXPENSIVE False Oc Connect immediately to 68757945Seric mailers marked expensive? 68857945SericconfCHECKPOINT_INTERVAL 10 OC Checkpoint queue files 68957945Seric every N recipients. 69057945SericconfDELIVERY_MODE background Od Default delivery mode. 69157945SericconfAUTO_REBUILD False OD Automatically rebuild 69257945Seric alias file if needed. 69357945SericconfERROR_MODE (undefined) Oe Error message mode. 69457945SericconfERROR_MESSAGE (undefined) OE Error message header/file. 69557945SericconfSAVE_FROM_LINES False Of Save extra leading 69657945Seric From_ lines. 69757945SericconfTEMP_FILE_MODE 0600 OF Temporary file mode. 69857945SericconfDEF_GROUP_ID 1 Og Default group id. 69957945SericconfMATCH_GECOS False OG Match GECOS field. 70057945SericconfMAX_HOP 17 Oh Maximum hop count. 70163582SericconfIGNORE_DOTS False Oi * Ignore dot as terminator 70257945Seric for incoming messages? 70357945SericconfBIND_OPTS (empty) OI Default options for BIND. 70463582SericconfMIME_FORMAT_ERRORS True Oj * Send error messages as MIME- 70559743Seric encapsulated messages per 70659743Seric RFC 1344. 70757945SericconfMCI_CACHE_SIZE 2 Ok Size of open connection cache. 70857945SericconfMCI_CACHE_TIMEOUT 5m OK Open connection cache timeout. 70963582SericconfUSE_ERRORS_TO False Ol * Use the Errors-To: header to 71063582Seric deliver error messages. This 71163582Seric should not be necessary because 71263582Seric of general acceptance of the 71363582Seric envelope/header distinction. 71457945SericconfLOG_LEVEL 9 OL Log level. 71557945SericconfME_TOO False Om Include sender in group 71657945Seric expansions. 71757945SericconfCHECK_ALIASES True On Check RHS of aliases when 71857945Seric running newaliases. 71963582SericconfOLD_STYLE_HEADERS True Oo * Assume that headers without 72057945Seric special chars are old style. 72158859SericconfDAEMON_OPTIONS (undefined) OO SMTP daemon options. 72258806SericconfPRIVACY_FLAGS authwarnings Op Privacy flags. 72357945SericconfCOPY_ERRORS_TO (undefined) OP Address for additional copies 72457945Seric of all error messages. 72557945SericconfQUEUE_FACTOR (undefined) Oq Slope of queue-only function 72658116SericconfREAD_TIMEOUT (undefined) Or SMTP read timeouts. 72763582SericconfSAFE_QUEUE True Os * Commit all messages to disk 72857945Seric before forking. 72958806SericconfMESSAGE_TIMEOUT 5d/4h OT Timeout for messages before 73058806Seric sending error/warning message. 73159317SericconfTIME_ZONE USE_SYSTEM Ot Time zone info -- can be 73257945Seric USE_SYSTEM to use the system's 73357945Seric idea, USE_TZ to use the user's 73457945Seric TZ envariable, or something 73557945Seric else to force that value. 73657945SericconfDEF_USER_ID 1 Ou Default user id. 73758718SericconfUSERDB_SPEC (undefined) OU User database specification. 73858859SericconfFALLBACK_MX (undefined) OV Fallback MX host. 73957945SericconfQUEUE_LA 8 Ox Load average at which queue-only 74057945Seric function kicks in. 74157945SericconfREFUSE_LA 12 OX Load average at which incoming 74257945Seric SMTP connections are refused. 74363582SericconfWORK_RECIPIENT_FACTOR 74463582Seric (undefined) Oy Cost of each recipient. 74563582SericconfSEPARATE_PROC False OY Run all deliveries in a 74657945Seric separate process. 74757945SericconfWORK_CLASS_FACTOR (undefined) Oz Priority multiplier for class. 74857945SericconfWORK_TIME_FACTOR (undefined) OZ Cost of each delivery attempt. 74958408SericconfCW_FILE /etc/sendmail.cw Name of file used to get the 75058408Seric Fw local additions to the $=w 75158408Seric class. 75257945Seric 75358087Seric 75457246Seric+-----------+ 75557246Seric| HIERARCHY | 75657246Seric+-----------+ 75757246Seric 75851220SericWithin this directory are several subdirectories, to wit: 75951220Seric 76051220Sericm4 General support routines. These are typically 76151220Seric very important and should not be changed without 76257247Seric very careful consideration. 76351220Seric 76451220Sericcf The configuration files themselves. They have 76551220Seric ".mc" suffixes, and must be run through m4 to 76651220Seric become complete. The resulting output should 76751220Seric have a ".cf" suffix. 76851220Seric 76951220Sericostype Definitions describing a particular operating 77051220Seric system type. These should always be referenced 77151220Seric using the OSTYPE macro in the .mc file. Examples 77251220Seric include "bsd4.3", "bsd4.4", "sunos3.5", and 77351220Seric "sunos4.1". 77451220Seric 77551220Sericdomain Definitions describing a particular domain, referenced 77651220Seric using the DOMAIN macro in the .mc file. These are 77751220Seric site dependent; for example, we contribute "cs.exposed.m4" 77851220Seric and "cs.hidden.m4" which both describe hosts in the 77951220Seric CS.Berkeley.EDU subdomain; the former displays the local 78051220Seric hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the 78151220Seric latter does its best to hide the identity of the local 78251220Seric workstation inside the CS subdomain. 78351220Seric 78451220Sericmailer Descriptions of mailers. These are referenced using 78551220Seric the MAILER macro in the .mc file. 78651220Seric 78751220Sericsh Shell files used when building the .cf file from the 78851220Seric .mc file in the cf subdirectory. 78951220Seric 79051220Sericfeature These hold special orthogonal features that you might 79151220Seric want to include. They should be referenced using 79251220Seric the FEATURE macro. 79351220Seric 79451220Serichack Local hacks. These can be referenced using the HACK 79551220Seric macro. They shouldn't be of more than voyeuristic 79651220Seric interest outside the .Berkeley.EDU domain, but who knows? 79751220Seric We've all got our own peccadilloes. 79851220Seric 79951268Sericsiteconfig Site configuration -- e.g., tables of locally connected 80051268Seric UUCP sites. 80151220Seric 80251268Seric 80357246Seric+------------------------+ 80457246Seric| ADMINISTRATIVE DETAILS | 80557246Seric+------------------------+ 80651220Seric 80751220SericThe following sections detail usage of certain internal parts of the 80851220Sericsendmail.cf file. Read them carefully if you are trying to modify 80951220Sericthe current model. If you find the above descriptions adequate, these 81051220Sericshould be {boring, confusing, tedious, ridiculous} (pick one or more). 81151220Seric 81251220SericRULESETS (* means built in to sendmail) 81351220Seric 81451220Seric 0 * Parsing 81551220Seric 1 * Sender rewriting 81651220Seric 2 * Recipient rewriting 81751220Seric 3 * Canonicalization 81851220Seric 4 * Post cleanup 81954839Seric 5 * Local address rewrite (after aliasing) 82060539Seric 1x mailer rules (sender qualification) 82160539Seric 2x mailer rules (recipient qualification) 82260539Seric 90 Mailertable host stripping 82360892Seric 96 Bottom half of Ruleset 3 (ruleset 6 in old sendmail) 82460892Seric 97 Hook for recursive ruleset 0 call (ruleset 7 in old sendmail) 82551220Seric 82651220Seric 82751220SericMAILERS 82851220Seric 82951220Seric 0 local, prog local and program mailers 83051220Seric 1 smtp SMTP channel 83158087Seric 2 uucp UNIX-to-UNIX Copy Program 83258087Seric 3 netnews Network News delivery 83358363Seric 4 fax Sam Leffler's FlexFAX software 83451220Seric 83551220Seric 83651220SericMACROS 83751220Seric 83851220Seric A 83951220Seric B Bitnet Relay 84051220Seric C CSNET Relay 84154839Seric D The local domain -- usually not needed 84251220Seric E 84358363Seric F FAX Relay 84451220Seric G 84557591Seric H mail Hub (for mail clusters) 84651220Seric I 84751220Seric J 84851220Seric K 84951220Seric L 85051220Seric M Masquerade (who I claim to be) 85151220Seric N 85251220Seric O 85351220Seric P 85451220Seric Q 85551220Seric R Relay (for unqualified names) 85658071Seric S Smart Host 85751220Seric T 85851309Seric U my UUCP name (if I have a UUCP connection) 85951309Seric V UUCP Relay (class V hosts) 86051220Seric W UUCP Relay (class W hosts) 86151220Seric X UUCP Relay (class X hosts) 86251309Seric Y UUCP Relay (all other hosts) 86351220Seric Z Version number 86451220Seric 86551220Seric 86651220SericCLASSES 86751220Seric 86851220Seric A 86951220Seric B 87051220Seric C 87151220Seric D 87257246Seric E addresses that should not seem to come from $M 87354839Seric F hosts we forward for 87451220Seric G 87551220Seric H 87651220Seric I 87751220Seric J 87851220Seric K 87951220Seric L addresses that should not be forwarded to $R 88051220Seric M 88151220Seric N 88251220Seric O operators that indicate network operations (cannot be in local names) 88360211Seric P top level pseudo-domains: BITNET, FAX, UUCP, etc. 88451220Seric Q 88551220Seric R 88651220Seric S 88751220Seric T 88851220Seric U locally connected UUCP hosts 88951309Seric V UUCP hosts connected to relay $V 89051309Seric W UUCP hosts connected to relay $W 89151309Seric X UUCP hosts connected to relay $X 89251309Seric Y locally connected smart UUCP hosts 89351220Seric Z 89454839Seric . the class containing only a dot 89551220Seric 89651220Seric 89751220SericM4 DIVERSIONS 89851220Seric 89958071Seric 1 Local host detection and resolution 90058071Seric 2 Local Ruleset 3 additions 90158071Seric 3 Local Ruleset 0 additions 90251268Seric 4 UUCP Ruleset 0 additions 90351309Seric 5 locally interpreted names (overrides $R) 90454839Seric 6 local configuration (at top of file) 90551220Seric 7 mailer definitions 90654839Seric 8 special local name recognition (late in ruleset 3) 90758681Seric 9 special local rulesets (1 and 2) 908