1@(#)README 2.4 (Berkeley) 07/09/92 2 3This document describes the sendmail configuration files being used 4at Berkeley. There have been several previous versions. This file 5is being written on 24 July 1991, and will probably not be generally 6available for several months. 7 8INSTALLING A NEW SITE CONFIGURATION 9 10Configuration files are contained in the subdirectory "cf", with a 11suffix ".mc". They must be run through "m4" to produce a ".cf" file. 12 13Every .mc file SHOULD begin with: 14 15 divert(-1) 16 COPYRIGHT NOTICE 17 divert(0) 18 19If you don't care about copyrights, you can omit this. If you try 20to patent this, I'll be very, very pissed. I haven't patented a lot 21of hot ideas so that you can use them; I expect reciprocal courtesy. 22A copyleft is a copyright by another name. 23 24The copyright, if any, MUST be followed by: 25 26 include(../m4/cf.m4) 27 28This will pull in the M4 macros you will need to make sense of 29everything else. As the saying goes, don't think about it, just 30do it. If you don't do it, don't bother reading the rest of this 31file. 32 33At this point, let me make one thing perfectly clear. I am a rope 34salesman. I sell you rope. I haven't produced a new M4 system 35that detects latent bugs, nor have I tried to fix the old one. 36(However, I have decided to rely on a post-V7 version; if you 37are running the 4.2bsd, SysV.2, or 7th Edition version, I suggest 38finding a friend with a newer version. You can m4-expand on 39their system, then run locally.) 40 41Let's examine a typical .mc file (cf/cs-exposed.mc): 42 43 divert(-1) 44 # 45 # Copyright (c) 1983 Eric P. Allman 46 # Copyright (c) 1988 The Regents of the University of California. 47 # All rights reserved. 48 # 49 # Redistribution and use in source and binary forms are permitted 50 # provided that the above copyright notice and this paragraph are 51 # duplicated in all such forms and that any documentation, 52 # advertising materials, and other materials related to such 53 # distribution and use acknowledge that the software was developed 54 # by the University of California, Berkeley. The name of the 55 # University may not be used to endorse or promote products derived 56 # from this software without specific prior written permission. 57 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 58 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 59 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 60 # 61 62If you copy this file and modify it, you should maintain this copyright 63notice. If you actually start from scratch you can delete it -- but be 64honest! 65 66 include(`../m4/cf.m4') 67 68You need this line! 69 70 VERSIONID(<SCCS or RCS version id>) 71 72VERSIONID is a macro that stuffs the version information into the 73resulting file. We use SCCS; you could use RCS, something else, or 74omit it completely. 75 76 DOMAIN(cs.exposed) 77 78This example exposes the host inside of the CS subdomain -- that is, 79it doesn't try to hide the name of the workstation to the outside 80world. Changing this to DOMAIN(cs.hidden) would have made outgoing 81messages refer to "<username>@CS.Berkeley.EDU" instead of using the 82local hostname. This can also be effected by using: 83 84 define(`MASQUERADE_AS', `masquerade.host.name.domain.name')dnl 85 86in the ".mc" file. 87 88 MAILER(smtp) 89 90These describe the mailers used at the default CS site site. The 91local mailer is always included automatically. 92 93Note that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes 94default Computer Science Division environment. There are several 95environments available: bsd4.3, bsd4.4, riscos4.5, sunos3.5, 96sunos4.1, and ultrix4.1. These change things like the location 97of the alias file and queue directory. 98 99MAILERS 100 101There are fewer mailers supported in this version than the previous 102version, owing mostly to a simpler world. 103 104local The local and prog mailers. You will almost always 105 need these; the only exception is if you relay ALL 106 your mail to another site. 107 108smtp The Simple Mail Transport Protocol mailer. This does 109 not hide hosts behind a gateway or another other 110 such hack; it assumes a world where everyone is 111 running the name server. 112 113uucp The Unix-to-Unix Copy Program mailer. Actually, this 114 defines two mailers, "uucp" and "suucp". The latter 115 is for when you know that the UUCP mailer at the other 116 end can handle multiple recipients in one transfer. 117 118EXTENSIONS 119 120For more complex configurations, you can define special rules. 121The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing 122the names. Any modifications made here are reflected in the header. 123 124A common use is to convert old UUCP addreses to SMTP addresses using 125the UUCPSMTP macro. For example: 126 127 LOCAL_RULE_3 128 UUCPSMTP(decvax, decvax.dec.com) 129 UUCPSMTP(research, research.att.com) 130 131will cause addresses of the form "decvax!user" and "research!user" 132to be converted to "user@decvax.dec.com" and "user@research.att.com" 133respectively. 134 135Similarly, LOCAL_RULE_0 can be used to introduce new parsing rules. 136For example, new rules are needed to parse hostnames that you accept 137via MX records. For example, you might have: 138 139 LOCAL_RULE_0 140 R$+ < @ cnmat.Berkeley.EDU > $#uucp $@ cnmat $: $1 141 142You would use this if you had installed an MX record for cnmat.Berkeley.EDU 143pointing at this host; this rule catches the message and forwards it on 144using UUCP. 145 146???? 147 148HIERARCHY 149 150Within this directory are several subdirectories, to wit: 151 152m4 General support routines. These are typically 153 very important and should not be changed without 154 contacting your lawyer. 155 156cf The configuration files themselves. They have 157 ".mc" suffixes, and must be run through m4 to 158 become complete. The resulting output should 159 have a ".cf" suffix. 160 161ostype Definitions describing a particular operating 162 system type. These should always be referenced 163 using the OSTYPE macro in the .mc file. Examples 164 include "bsd4.3", "bsd4.4", "sunos3.5", and 165 "sunos4.1". 166 167domain Definitions describing a particular domain, referenced 168 using the DOMAIN macro in the .mc file. These are 169 site dependent; for example, we contribute "cs.exposed.m4" 170 and "cs.hidden.m4" which both describe hosts in the 171 CS.Berkeley.EDU subdomain; the former displays the local 172 hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the 173 latter does its best to hide the identity of the local 174 workstation inside the CS subdomain. 175 176mailer Descriptions of mailers. These are referenced using 177 the MAILER macro in the .mc file. 178 179sh Shell files used when building the .cf file from the 180 .mc file in the cf subdirectory. 181 182feature These hold special orthogonal features that you might 183 want to include. They should be referenced using 184 the FEATURE macro. 185 186hack Local hacks. These can be referenced using the HACK 187 macro. They shouldn't be of more than voyeuristic 188 interest outside the .Berkeley.EDU domain, but who knows? 189 We've all got our own peccadilloes. 190 191siteconfig Site configuration -- e.g., tables of locally connected 192 UUCP sites. 193 194 195ADMINISTRATIVE DETAILS 196 197The following sections detail usage of certain internal parts of the 198sendmail.cf file. Read them carefully if you are trying to modify 199the current model. If you find the above descriptions adequate, these 200should be {boring, confusing, tedious, ridiculous} (pick one or more). 201 202RULESETS (* means built in to sendmail) 203 204 0 * Parsing 205 1 * Sender rewriting 206 2 * Recipient rewriting 207 3 * Canonicalization 208 4 * Post cleanup 209 5 * Local address rewrite (after aliasing) 210 6 Bottom half of Ruleset 3 211 7 Back compatibility for UUCP 212 8 "host dependent cleanup" -- unused? 213 9 change rightmost % to @ -- needed? 214 215 216MAILERS 217 218 0 local, prog local and program mailers 219 1 smtp SMTP channel 220 2 uucp 221 222 223MACROS 224 225 A 226 B Bitnet Relay 227 C CSNET Relay 228 D The local domain -- usually not needed 229 E 230 F 231 G 232 H 233 I 234 J 235 K 236 L 237 M Masquerade (who I claim to be) 238 N 239 O 240 P 241 Q 242 R Relay (for unqualified names) 243 S 244 T 245 U my UUCP name (if I have a UUCP connection) 246 V UUCP Relay (class V hosts) 247 W UUCP Relay (class W hosts) 248 X UUCP Relay (class X hosts) 249 Y UUCP Relay (all other hosts) 250 Z Version number 251 252 253CLASSES 254 255 A 256 B 257 C 258 D 259 E 260 F hosts we forward for 261 G 262 H 263 I 264 J 265 K 266 L addresses that should not be forwarded to $R 267 M 268 N 269 O operators that indicate network operations (cannot be in local names) 270 P 271 Q 272 R 273 S 274 T 275 U locally connected UUCP hosts 276 V UUCP hosts connected to relay $V 277 W UUCP hosts connected to relay $W 278 X UUCP hosts connected to relay $X 279 Y locally connected smart UUCP hosts 280 Z 281 . the class containing only a dot 282 283 284M4 DIVERSIONS 285 286 1 Versions 287 2 Local Ruleset 0 additions 288 3 Local Ruleset 3 additions 289 4 UUCP Ruleset 0 additions 290 5 locally interpreted names (overrides $R) 291 6 local configuration (at top of file) 292 7 mailer definitions 293 8 special local name recognition (late in ruleset 3) 294 9 295