166282Seric Sendmail Version 8 266282Seric Frequently Asked Questions 3*68069Seric Version 8.9 of 12/09/94 466282Seric 566282Seric 667021SericThis FAQ is specific to Version 8 of sendmail. Other questions, 767021Sericparticularly regarding compilation and configuration, are answered 867892Sericin src/READ_ME and cf/README (found in the V8 sendmail distribution). 966282Seric 10*68069Seric====================================================================== 11*68069SericGENERAL QUESTIONS 12*68069Seric====================================================================== 13*68069Seric 1467892Seric * What do you wish everyone would do before sending you mail? 1567892Seric 1667892Seric Read this FAQ completely. Read src/READ_ME and cf/README 1767892Seric completely. Ask themselves if their question hasn't already 1867892Seric been answered. 1967892Seric---------------------------------------------------------------------- 2067021Seric * Where can I get Version 8? 2167021Seric 2267021Seric Via anonymous FTP from FTP.CS.Berkeley.EDU in /ucb/sendmail. 2367021Seric---------------------------------------------------------------------- 2466282Seric * What are the differences between Version 8 and other versions? 2566282Seric 2667021Seric See doc/changes/changes.me in the sendmail distribution. 2766282Seric---------------------------------------------------------------------- 2866282Seric * What happened to sendmail 6.x and 7.x? 2966282Seric 3067892Seric When I released a new (Alpha/Beta) version of sendmail, I changed 3167892Seric it to Release 6. Development continued in that tree until 4.4BSD 3266282Seric was released, when everything on the 4.4 tape was set to be 3366282Seric version 8.1. Version 7.x never existed. 3466282Seric---------------------------------------------------------------------- 35*68069Seric * What books are available describing sendmail? 36*68069Seric 37*68069Seric There is one book available devoted to sendmail: 38*68069Seric 39*68069Seric Costales, Allman, and Rickert, _Sendmail_. O'Reilly & 40*68069Seric Associates. 41*68069Seric 42*68069Seric Several books have sendmail chapters, for example: 43*68069Seric 44*68069Seric Nemeth, Snyder, and Seebass, _Unix System Administration 45*68069Seric Handbook_. Prentice-Hall. 46*68069Seric Carl-Mitchell and Quarterman, _Practical Internetworking with 47*68069Seric TCP/IP and UNIX_. Addison-Wesley. 48*68069Seric Hunt, _TCP/IP Network Administration_. O'Reilly & Associates. 49*68069Seric 50*68069Seric Another book about sendmail is due out "soon": 51*68069Seric 52*68069Seric Avolio & Vixie, _Sendmail Theory and Practice_. Digital 53*68069Seric Press (release date unknown). 54*68069Seric 55*68069Seric====================================================================== 56*68069SericCOMPILING AND INSTALLING SENDMAIL 8 57*68069Seric====================================================================== 58*68069Seric 5966282Seric * Version 8 requires a new version of "make". Where can I get this? 6066282Seric 6166282Seric Actually, Version 8 does not require a new version of "make". 6266282Seric It includes a collection of Makefiles for different architectures, 6367892Seric only one or two of which require the new "make". For a supported 6467892Seric architecture, use ``sh makesendmail''. If you are porting to a 6567892Seric new architecture, start with Makefile.dist. 6666282Seric 6766282Seric If you really do want the new make, it is available on any of 6867021Seric the BSD Net2 or 4.4-Lite distribution sites. These include: 6966282Seric 7066282Seric ftp.uu.net /systems/unix/bsd-sources 7166282Seric gatekeeper.dec.com /.0/BSD/net2 7266282Seric ucquais.cba.uc.edu /pub/net2 7366282Seric ftp.luth.se /pub/unix/4.3bsd/net2 7466282Seric 7566282Seric Diffs and instructions for building this version of make under 7666282Seric SunOS 4.1.x are available on ftp.css.itd.umich.edu in 7767556Seric /pub/systems/sun/Net2-make.sun4.diff.Z. A patchkit for Ultrix 7867556Seric is on ftp.vix.com in /pub/patches/pmake-for-ultrix.Z. Patches 7967556Seric for AIX 3.2.4 are available on ftp.uni-stuttgart.de in 8067556Seric /sw/src/patches/bsd-make-rus-patches. 8167489Seric 8267489Seric There is also a Linux version available on the main Linux 8367489Seric distribution sites as pmake; this version is included as 8467489Seric standard with the current Slackware distributions. 8566282Seric---------------------------------------------------------------------- 8666282Seric * What macro package do I use to format the V8 man pages? 8766282Seric 8866282Seric The BSD group switched over the the ``mandoc'' macros for 8966282Seric the 4.4 release. These include more hooks designed for 9066282Seric hypertext handling. However, new man pages won't format 9166282Seric under the old man macros. Fortunately, old man pages will 9266282Seric format under the new mandoc macros. 9366282Seric 9467892Seric Get the new macros with the BSD Net2 or 4.4-Lite release 9567892Seric (see above). 9666282Seric 9766282Seric This macro set is also available with newer versions of groff. 9866282Seric 99*68069Seric====================================================================== 100*68069SericCONFIGURATION QUESTIONS 101*68069Seric====================================================================== 10266282Seric 10366282Seric * How do I make all my addresses appear to be from a single host? 10466282Seric 10566282Seric Using the V8 configuration macros, use: 10666282Seric 10766282Seric MASQUERADE_AS(my.dom.ain) 10866282Seric 10966282Seric This will cause all addresses to be sent out as being from 11066282Seric the indicated domain. 11166282Seric---------------------------------------------------------------------- 11266282Seric * How do I rewrite my From: lines to read ``First_Last@My.Domain''? 11366282Seric 11466282Seric There are a couple of ways of doing this. This describes using 11566282Seric the "user database" code. This is still experimental, and was 11666282Seric intended for a different purpose -- however, it does work 11766282Seric with a bit of care. It does require that you have the Berkeley 11866282Seric "db" package installed (it won't work with DBM). 11966282Seric 12066282Seric First, create your input file. This should have lines like: 12166282Seric 12266282Seric loginname:mailname First_Last 12366282Seric First_Last:maildrop loginname 12466282Seric 12566282Seric Install it in (say) /etc/userdb. Create the database: 12666282Seric 12766282Seric makemap btree /etc/userdb.db < /etc/userdb 12866282Seric 12966282Seric You can then create a config file that uses this. You will 13066282Seric have to include the following in your .mc file: 13166282Seric 13266282Seric define(confUSERDB_SPEC, /etc/userdb.db) 13366282Seric FEATURE(notsticky) 13466282Seric---------------------------------------------------------------------- 13566282Seric * So what was the user database feature intended for? 13666282Seric 13766282Seric The intent was to have all information for a given user (where 13866282Seric the user is the unique login name, not an inherently non-unique 13966282Seric full name) in one place. This would include phone numbers, 14066282Seric addresses, and so forth. The "maildrop" feature is because 14166282Seric Berkeley does not use a centralized mail server (there are a 14266282Seric number of reasons for this that are mostly historic), and so 14366282Seric we need to know where each user gets his or her mail delivered -- 14466282Seric i.e., the mail drop. 14566282Seric 14666282Seric We are in the process of setting up our environment so that 14766282Seric mail sent to an unqualified "name" goes to that person's 14866282Seric preferred maildrop; mail sent to "name@host" goes to that 14966282Seric host. The purpose of "FEATURE(notsticky)" is to cause 15066282Seric "name@host" to be looked up in the user database for delivery 15166282Seric to the maildrop. 15266282Seric---------------------------------------------------------------------- 15366282Seric * Why are you so hostile to using full names for e-mail addresses? 15466282Seric 15566282Seric Because full names are not unique. For example, the computer 15666282Seric community has two Andy Tannenbaums and two Peter Deutsches. 15766282Seric At one time, Bell Labs had two Stephen R. Bournes with offices 15866282Seric a few doors apart. You can create alternative addresses 15966282Seric (e.g., Stephen_R_Bourne_2), but that's even worse -- which 16066282Seric one of them has to have their name desecrated in this way? 16167892Seric And you can bet that one of them will get most of the other 16267892Seric person's e-mail. 16366282Seric 16467892Seric So called "full names" are just an attempt to create longer 16567892Seric versions of unique names. Rather that lulling people into a 16667892Seric sense of security, I'd rather that it be clear that these 16767892Seric handles are arbitrary. People should use good user agents 16867892Seric that have alias mappings so that they can attach arbitrary 16967892Seric names for their personal use to those with whom they correspond 17067892Seric (such as the MH alias file). 17166282Seric 17266282Seric Even worse is fuzzy matching in e-mail -- this can make good 17366282Seric addresses turn bad. For example, I'm currently (to the best 17466282Seric of my knowledge) the only ``Allman'' at Berkeley, so mail 17566282Seric sent to "Allman@Berkeley.EDU" should get to me. But if 17666282Seric another Allman ever appears, this address could suddenly 17766282Seric become ambiguous. I've been the only Allman at Berkeley for 17866282Seric over fifteen years -- to suddenly have this "good address" 17966282Seric bounce mail because it is ambiguous would be a heinous wrong. 18066282Seric 18167892Seric Finger services should be as fuzzy as possible (within 18267892Seric reason, of course). Mail services should be unique. 18366282Seric---------------------------------------------------------------------- 184*68069Seric * Should I use a wildcard MX for my domain? 185*68069Seric 186*68069Seric If at all possible, no. 187*68069Seric 188*68069Seric Wildcard MX records have lots of semantic "gotcha"s. For 189*68069Seric example, they will match a host "unknown.your.domain" -- if 190*68069Seric you don't explicitly test for unknown hosts in your domain, 191*68069Seric you will get "config error: mail loops back to myself" 192*68069Seric errors. 193*68069Seric---------------------------------------------------------------------- 194*68069Seric * How can I get sendmail to deliver local mail to $HOME/.mail 195*68069Seric instead of into /usr/spool/mail (or /usr/mail)? 196*68069Seric 197*68069Seric This is a local mailer issue, not a sendmail issue. Either 198*68069Seric modify your local mailer (source code will be required) or 199*68069Seric change the program called in the "local" mailer configuration 200*68069Seric description to be a new program that does this local delivery. 201*68069Seric I understand that "procmail" works well, although I haven't 202*68069Seric used it myself. 203*68069Seric 204*68069Seric You might be interested in reading the paper ``HLFSD: Delivering 205*68069Seric Email to your $HOME'' available in the Proceedings of the 206*68069Seric USENIX System Administration (LISA VII) Conference (November 207*68069Seric 1993). This is also available via public FTP from 208*68069Seric ftp.cs.columbia.edu:/pub/hlfsd/{README.hlfsd,hlfsd.ps}. 209*68069Seric---------------------------------------------------------------------- 210*68069Seric * I'm trying to to get my mail to go into queue only mode, and it 211*68069Seric delivers the mail interactively anyway. (Or, I'm trying to use 212*68069Seric the "don't deliver to expensive mailer" flag, and it doesn't 213*68069Seric delivers the mail interactively anyway.) I can see it does it: 214*68069Seric here's the output of "sendmail -v foo@somehost" (or Mail -v or 215*68069Seric equivalent). 216*68069Seric 217*68069Seric The -v flag to sendmail (which is implied by the -v flag to 218*68069Seric Mail and other programs in that family) tells sendmail to 219*68069Seric watch the transaction. Since you have explicitly asked to 220*68069Seric see what's going on, it assumes that you do not want to to 221*68069Seric auto-queue, and turns that feature off. Remove the -v flag 222*68069Seric and use a "tail -f" of the log instead to see what's going on. 223*68069Seric 224*68069Seric If you are trying to use the "don't deliver to expensive mailer" 225*68069Seric flag (mailer flag "e"), be sure you also turn on global option 226*68069Seric "c" -- otherwise it ignores the mailer flag. 227*68069Seric---------------------------------------------------------------------- 228*68069Seric * There are four UUCP mailers listed in the configuration files. 229*68069Seric Which one should I use? 230*68069Seric 231*68069Seric The choice is partly a matter of local preferences and what is 232*68069Seric running at the other end of your UUCP connection. Unlike good 233*68069Seric protocols that define what will go over the wire, UUCP uses 234*68069Seric the policy that you should do what is right for the other end; 235*68069Seric if they change, you have to change. This makes it hard to 236*68069Seric do the right thing, and discourages people from updating their 237*68069Seric software. In general, if you can avoid UUCP, please do. 238*68069Seric 239*68069Seric If you can't avoid it, you'll have to find the version that is 240*68069Seric closest to what the other end accepts. Following is a summary 241*68069Seric of the UUCP mailers available. 242*68069Seric 243*68069Seric uucp-old (obsolete name: "uucp") 244*68069Seric This is the oldest, the worst (but the closest to UUCP) way of 245*68069Seric sending messages accros UUCP connections. It does bangify 246*68069Seric everything and prepends $U (your UUCP name) to the sender's 247*68069Seric address (which can already be a bang path itself). It can 248*68069Seric only send to one address at a time, so it spends a lot of 249*68069Seric time copying duplicates of messages. Avoid this if at all 250*68069Seric possible. 251*68069Seric 252*68069Seric uucp-new (obsolete name: "suucp") 253*68069Seric The same as above, except that it assumes that in one rmail 254*68069Seric command you can specify several recipients. It still has a 255*68069Seric lot of other problems. 256*68069Seric 257*68069Seric uucp-dom 258*68069Seric This UUCP mailer keeps everything as domain addresses. 259*68069Seric Basically, it uses the SMTP mailer rewriting rules. 260*68069Seric 261*68069Seric Unfortunately, a lot of UUCP mailer transport agents require 262*68069Seric bangified addresses in the envelope, although you can use 263*68069Seric domain-based addresses in the message header. (The envelope 264*68069Seric shows up as the From_ line on UNIX mail.) So.... 265*68069Seric 266*68069Seric uucp-uudom 267*68069Seric This is a cross between uucp-new (for the envelope addresses) 268*68069Seric and uucp-dom (for the header addresses). It bangifies the 269*68069Seric envelope sender (From_ line in messages) without adding the 270*68069Seric local hostname, unless there is no host name on the address 271*68069Seric at all (e.g., "wolf") or the host component is a UUCP host name 272*68069Seric instead of a domain name ("somehost!wolf" instead of 273*68069Seric "some.dom.ain!wolf"). 274*68069Seric 275*68069Seric Examples: 276*68069Seric 277*68069Seric We are on host grasp.insa-lyon.fr (UUCP host name "grasp"). The 278*68069Seric following summarizes the sender rewriting for various mailers. 279*68069Seric 280*68069Seric Mailer sender rewriting in the envelope 281*68069Seric ------ ------ ------------------------- 282*68069Seric uucp-{old,new} wolf grasp!wolf 283*68069Seric uucp-dom wolf wolf@grasp.insa-lyon.fr 284*68069Seric uucp-uudom wolf grasp.insa-lyon.fr!wolf 285*68069Seric 286*68069Seric uucp-{old,new} wolf@fr.net grasp!fr.net!wolf 287*68069Seric uucp-dom wolf@fr.net wolf@fr.net 288*68069Seric uucp-uudom wolf@fr.net fr.net!wolf 289*68069Seric 290*68069Seric uucp-{old,new} somehost!wolf grasp!somehost!wolf 291*68069Seric uucp-dom somehost!wolf somehost!wolf@grasp.insa-lyon.fr 292*68069Seric uucp-uudom somehost!wolf grasp.insa-lyon.fr!somehost!wolf 293*68069Seric 294*68069Seric====================================================================== 295*68069SericRESOLVING PROBLEMS 296*68069Seric====================================================================== 297*68069Seric 298*68069Seric * When I compile, I get "undefined symbol inet_aton" messages. 299*68069Seric 300*68069Seric You've probably replaced your resolver with the version from 301*68069Seric BIND 4.9.3. You need to cmpile with -l44bsd in order to get 302*68069Seric the additional routines. 303*68069Seric---------------------------------------------------------------------- 30467892Seric * I'm getting "Local configuration error" messages, such as: 30567892Seric 30667892Seric 553 relay.domain.net config error: mail loops back to myself 30767892Seric 554 <user@domain.net>... Local configuration error 30867892Seric 30967892Seric How can I solve this problem? 31067892Seric 31167892Seric You have asked mail to the domain (e.g., domain.net) to be 31267892Seric forwarded to a specific host (in this case, relay.domain.net) 31367892Seric by using an MX record, but the relay machine doesn't recognize 31467892Seric itself as domain.net. Add domain.net to /etc/sendmail.cw 31567892Seric (if you are using FEATURE(use_cw_file)) or add "Cw domain.net" 31667892Seric to your configuration file. 31767898Seric 31867898Seric IMPORTANT: Be sure you kill and restart the sendmail daemon 31967898Seric after you change the configuration file (for ANY change in 32067898Seric the configuration, not just this one): 32167898Seric 32267898Seric kill `head -1 /etc/sendmail.pid` 32367898Seric sh -c "`tail -1 /etc/sendmail.pid`" 32467898Seric 32567898Seric NOTA BENE: kill -1 does not work! 32667892Seric---------------------------------------------------------------------- 32766282Seric * When I use sendmail V8 with a Sun config file I get lines like: 32866282Seric 32966282Seric /etc/sendmail.cf: line 273: replacement $3 out of bounds 33066282Seric 33166282Seric the line in question reads: 33266282Seric 33366282Seric R$*<@$%y>$* $1<@$2.LOCAL>$3 user@ether 33466282Seric 33566282Seric what does this mean? How do I fix it? 33666282Seric 33766282Seric V8 doesn't recognize the Sun "$%y" syntax, so as far as it 33866282Seric is concerned, there is only a $1 and a $2 (but no $3) in this 33966282Seric line. Read Rick McCarty's paper on "Converting Standard Sun 34066282Seric Config Files to Sendmail Version 8", in the contrib directory 34166282Seric (file "converting.sun.configs") on the sendmail distribution 34266282Seric for a full discussion of how to do this. 34366282Seric---------------------------------------------------------------------- 34466282Seric * I'm connected to the network via a SLIP link. Sometimes my sendmail 34566282Seric process hangs (although it looks like part of the message has been 34666282Seric transfered). Everything else works. What's wrong? 34766282Seric 34866282Seric Most likely, the problem isn't sendmail at all, but the low 34966282Seric level network connection. It's important that the MTU (Maximum 35066282Seric Transfer Unit) for the SLIP connection be set properly at both 35166282Seric ends. If they disagree, large packets will be trashed and 35266282Seric the connection will hang. 35366282Seric---------------------------------------------------------------------- 35466282Seric * I just upgraded to 8.x and suddenly I'm getting messages in my 35566282Seric syslog of the form "collect: I/O error on connection". What is 35666282Seric going wrong? 35766282Seric 35866282Seric Nothing. This is just a diagnosis of a condition that had 35966282Seric not been diagnosed before. If you are getting a lot of these 36066282Seric from a single host, there is probably some incompatibility 36166282Seric between 8.x and that host. If you get a lot of them in general, 36266282Seric you may have network problems that are causing connections to 36366282Seric get reset. 36466282Seric---------------------------------------------------------------------- 36567892Seric * I just upgraded to 8.x and suddenly connections to the SMTP port 36667892Seric take a long time. What is going wrong? 36767892Seric 36867892Seric It's probably something wierd in your TCP implementation that 36967892Seric makes the IDENT code act oddly. On most systems V8 tries to 37067892Seric do a ``callback'' to the connecting host to get a validated 37167892Seric user name (see RFC 1413 for details). If the connecting 37267892Seric host does not support such a service it will normally fail 37367892Seric quickly with "Connection refused", but certain kinds of 37467892Seric packet filters and certain TCP implementations just time out. 37567892Seric 37667892Seric To test this, set the IDENT timeout to zero using 37767892Seric ``OrIdent=0'' in the configuration file. This will 37867892Seric completely disable all use of the IDENT protocol. 37967892Seric 38067892Seric Another possible problem is that you have your name server 38167892Seric and/or resolver configured improperly. Make sure that 38267892Seric all "nameserver" entries in /etc/resolv.conf point to functional 38367892Seric servers. If you are running your own server make certain that 38467892Seric all the servers listed in your root cache (usually called 38567892Seric something like "/var/namedb/root.cache"; see your 38667892Seric /etc/named.boot file to get your value) are up to date. 38767892Seric Either of these can cause long delays. 38867892Seric---------------------------------------------------------------------- 38967892Seric * I just upgraded to 8.x and suddenly I get errors such as ``mail: 39067892Seric options must follow recipients.'' What is going wrong? 39167892Seric 39267892Seric You need OSTYPE(systype) in your .mc file -- otherwise the 39367892Seric configurations use a default that probably disagrees with 39467892Seric your local mail system. See cf/README for details. 39567892Seric---------------------------------------------------------------------- 39666282Seric * Under V8, the "From " header gets mysteriously munged when I send 39766282Seric to an alias. 39866282Seric 39966282Seric ``It's not a bug, it's a feature.'' This happens when you have 40066282Seric a "owner-list" alias and you send to "list". V8 propogates the 40166282Seric owner information into the envelope sender field (which appears 40266282Seric as the "From " header on UNIX mail or as the Return-Path: header) 40366282Seric so that downstream errors are properly returned to the mailing 40466282Seric list owner instead of to the sender. In order to make this 40566282Seric appear as sensible as possible to end users, I recommend making 40666282Seric the owner point to a "request" address -- for example: 40766282Seric 40866282Seric list: :include:/path/name/list.list 40966282Seric owner-list: list-request 41066282Seric list-request: eric 41166282Seric 41266282Seric This will make message sent to "list" come out as being 41366282Seric "From list-request" instead of "From eric". 41466282Seric---------------------------------------------------------------------- 41566285Seric * I want to run Sendmail version 8 on my DEC system, but you don't 41666285Seric have MAIL11V3 support in sendmail. How do I handle this? 41766285Seric 41866285Seric Get Paul Vixie's reimplementation of the mail11 protocol 41966285Seric from gatekeeper.dec.com in /pub/DEC/gwtools. 42066285Seric---------------------------------------------------------------------- 421*68069Seric * Messages seem to disappear from my queue unsent. When I look in 422*68069Seric the queue directory I see that they have been renamed from qf* 423*68069Seric to Qf*, and sendmail doesn't see these. 424*68069Seric 425*68069Seric If you look closely you should find that the Qf files are 426*68069Seric owned by users other than root. Since sendmail runs as root 427*68069Seric it refuses to believe information in non-root-owned qf files, 428*68069Seric and it renames them to Qf to get them out of the way and 429*68069Seric make it easy for you to find. The usual cause of this is 430*68069Seric twofold: first, you have the queue directory world writable 431*68069Seric (which is probably a mistake -- this opens up other security 432*68069Seric problems) and someone is calling sendmail with an "unsafe" 433*68069Seric flag, usually a -o flag that sets an option that could 434*68069Seric compromise security. When sendmail sees this it gives up 435*68069Seric setuid root permissions. 436*68069Seric 437*68069Seric The usual solution is to not use the problematic flags. 438*68069Seric If you must use them, you have to write a special queue 439*68069Seric directory and have them processed by the same uid that 440*68069Seric submitted the job in the first place. 441*68069Seric---------------------------------------------------------------------- 442