xref: /csrg-svn/usr.sbin/sendmail/FAQ (revision 68070)
166282Seric			    Sendmail Version 8
266282Seric			Frequently Asked Questions
3*68070Seric		         Version 8.10 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
1068069Seric======================================================================
1168069SericGENERAL QUESTIONS
1268069Seric======================================================================
1368069Seric
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----------------------------------------------------------------------
3568069Seric  * What books are available describing sendmail?
3668069Seric
3768069Seric	There is one book available devoted to sendmail:
3868069Seric
3968069Seric	    Costales, Allman, and Rickert, _Sendmail_.  O'Reilly &
4068069Seric		Associates.
4168069Seric
4268069Seric	Several books have sendmail chapters, for example:
4368069Seric
4468069Seric	    Nemeth, Snyder, and Seebass, _Unix System Administration
4568069Seric		Handbook_.  Prentice-Hall.
4668069Seric	    Carl-Mitchell and Quarterman, _Practical Internetworking with
4768069Seric		TCP/IP and UNIX_.  Addison-Wesley.
4868069Seric	    Hunt, _TCP/IP Network Administration_.  O'Reilly & Associates.
4968069Seric
5068069Seric	Another book about sendmail is due out "soon":
5168069Seric
5268069Seric	    Avolio & Vixie, _Sendmail Theory and Practice_.  Digital
5368069Seric		Press (release date unknown).
5468069Seric
5568069Seric======================================================================
5668069SericCOMPILING AND INSTALLING SENDMAIL 8
5768069Seric======================================================================
5868069Seric
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.
98*68070Seric----------------------------------------------------------------------
99*68070Seric  * What modes should be used when installing sendmail?
10066282Seric
101*68070Seric	The sendmail binary should be owned by root, mode 4755.
102*68070Seric	The queue directory should be owned by root, with a mode
103*68070Seric		between 700 and 755.  Under no circumstances
104*68070Seric		should it be group or other writable!
105*68070Seric	The sendmail config file should be owned by root, mode 644.
106*68070Seric	The aliases file should generally be owned by one trusted
107*68070Seric		user and writable only by that user, although it
108*68070Seric		is not unreasonable to have it group writable by
109*68070Seric		a "sysadmin" group.  It should not be world writable.
110*68070Seric	The aliases database files (aliases.db or aliases.{pag,dir}
111*68070Seric		depending on what database format you compile with)
112*68070Seric		should be owned by root, mode 644.
113*68070Seric
11468069Seric======================================================================
11568069SericCONFIGURATION QUESTIONS
11668069Seric======================================================================
11766282Seric
11866282Seric  * How do I make all my addresses appear to be from a single host?
11966282Seric
12066282Seric	Using the V8 configuration macros, use:
12166282Seric
12266282Seric		MASQUERADE_AS(my.dom.ain)
12366282Seric
12466282Seric	This will cause all addresses to be sent out as being from
12566282Seric	the indicated domain.
12666282Seric----------------------------------------------------------------------
12766282Seric  * How do I rewrite my From: lines to read ``First_Last@My.Domain''?
12866282Seric
12966282Seric	There are a couple of ways of doing this.  This describes using
13066282Seric	the "user database" code.  This is still experimental, and was
13166282Seric	intended for a different purpose -- however, it does work
13266282Seric	with a bit of care.  It does require that you have the Berkeley
13366282Seric	"db" package installed (it won't work with DBM).
13466282Seric
13566282Seric	First, create your input file.  This should have lines like:
13666282Seric
13766282Seric		loginname:mailname	First_Last
13866282Seric		First_Last:maildrop	loginname
13966282Seric
14066282Seric	Install it in (say) /etc/userdb.  Create the database:
14166282Seric
14266282Seric		makemap btree /etc/userdb.db < /etc/userdb
14366282Seric
14466282Seric	You can then create a config file that uses this.  You will
14566282Seric	have to include the following in your .mc file:
14666282Seric
14766282Seric		define(confUSERDB_SPEC, /etc/userdb.db)
14866282Seric		FEATURE(notsticky)
14966282Seric----------------------------------------------------------------------
15066282Seric  * So what was the user database feature intended for?
15166282Seric
15266282Seric	The intent was to have all information for a given user (where
15366282Seric	the user is the unique login name, not an inherently non-unique
15466282Seric	full name) in one place.  This would include phone numbers,
15566282Seric	addresses, and so forth.  The "maildrop" feature is because
15666282Seric	Berkeley does not use a centralized mail server (there are a
15766282Seric	number of reasons for this that are mostly historic), and so
15866282Seric	we need to know where each user gets his or her mail delivered --
15966282Seric	i.e., the mail drop.
16066282Seric
16166282Seric	We are in the process of setting up our environment so that
16266282Seric	mail sent to an unqualified "name" goes to that person's
16366282Seric	preferred maildrop; mail sent to "name@host" goes to that
16466282Seric	host.  The purpose of "FEATURE(notsticky)" is to cause
16566282Seric	"name@host" to be looked up in the user database for delivery
16666282Seric	to the maildrop.
16766282Seric----------------------------------------------------------------------
16866282Seric  * Why are you so hostile to using full names for e-mail addresses?
16966282Seric
17066282Seric	Because full names are not unique.  For example, the computer
17166282Seric	community has two Andy Tannenbaums and two Peter Deutsches.
17266282Seric	At one time, Bell Labs had two Stephen R. Bournes with offices
17366282Seric	a few doors apart.  You can create alternative addresses
17466282Seric	(e.g., Stephen_R_Bourne_2), but that's even worse -- which
17566282Seric	one of them has to have their name desecrated in this way?
17667892Seric	And you can bet that one of them will get most of the other
17767892Seric	person's e-mail.
17866282Seric
17967892Seric	So called "full names" are just an attempt to create longer
18067892Seric	versions of unique names.  Rather that lulling people into a
18167892Seric	sense of security, I'd rather that it be clear that these
18267892Seric	handles are arbitrary.  People should use good user agents
18367892Seric	that have alias mappings so that they can attach arbitrary
18467892Seric	names for their personal use to those with whom they correspond
18567892Seric	(such as the MH alias file).
18666282Seric
18766282Seric	Even worse is fuzzy matching in e-mail -- this can make good
18866282Seric	addresses turn bad.  For example, I'm currently (to the best
18966282Seric	of my knowledge) the only ``Allman'' at Berkeley, so mail
19066282Seric	sent to "Allman@Berkeley.EDU" should get to me.  But if
19166282Seric	another Allman ever appears, this address could suddenly
19266282Seric	become ambiguous.  I've been the only Allman at Berkeley for
19366282Seric	over fifteen years -- to suddenly have this "good address"
19466282Seric	bounce mail because it is ambiguous would be a heinous wrong.
19566282Seric
19667892Seric	Finger services should be as fuzzy as possible (within
19767892Seric	reason, of course).  Mail services should be unique.
19866282Seric----------------------------------------------------------------------
19968069Seric  * Should I use a wildcard MX for my domain?
20068069Seric
20168069Seric	If at all possible, no.
20268069Seric
20368069Seric	Wildcard MX records have lots of semantic "gotcha"s.  For
20468069Seric	example, they will match a host "unknown.your.domain" -- if
20568069Seric	you don't explicitly test for unknown hosts in your domain,
20668069Seric	you will get "config error: mail loops back to myself"
20768069Seric	errors.
20868069Seric----------------------------------------------------------------------
20968069Seric  * How can I get sendmail to deliver local mail to $HOME/.mail
21068069Seric    instead of into /usr/spool/mail (or /usr/mail)?
21168069Seric
21268069Seric	This is a local mailer issue, not a sendmail issue.  Either
21368069Seric	modify your local mailer (source code will be required) or
21468069Seric	change the program called in the "local" mailer configuration
21568069Seric	description to be a new program that does this local delivery.
21668069Seric	I understand that "procmail" works well, although I haven't
21768069Seric	used it myself.
21868069Seric
21968069Seric	You might be interested in reading the paper ``HLFSD: Delivering
22068069Seric	Email to your $HOME'' available in the Proceedings of the
22168069Seric	USENIX System Administration (LISA VII) Conference (November
22268069Seric	1993).  This is also available via public FTP from
22368069Seric	ftp.cs.columbia.edu:/pub/hlfsd/{README.hlfsd,hlfsd.ps}.
22468069Seric----------------------------------------------------------------------
22568069Seric  * I'm trying to to get my mail to go into queue only mode, and it
22668069Seric    delivers the mail interactively anyway.  (Or, I'm trying to use
22768069Seric    the "don't deliver to expensive mailer" flag, and it doesn't
22868069Seric    delivers the mail interactively anyway.)  I can see it does it:
22968069Seric    here's the output of "sendmail -v foo@somehost" (or Mail -v or
23068069Seric    equivalent).
23168069Seric
23268069Seric	The -v flag to sendmail (which is implied by the -v flag to
23368069Seric	Mail and other programs in that family) tells sendmail to
23468069Seric	watch the transaction.  Since you have explicitly asked to
23568069Seric	see what's going on, it assumes that you do not want to to
23668069Seric	auto-queue, and turns that feature off.  Remove the -v flag
23768069Seric	and use a "tail -f" of the log instead to see what's going on.
23868069Seric
23968069Seric	If you are trying to use the "don't deliver to expensive mailer"
24068069Seric	flag (mailer flag "e"), be sure you also turn on global option
24168069Seric	"c" -- otherwise it ignores the mailer flag.
24268069Seric----------------------------------------------------------------------
24368069Seric  * There are four UUCP mailers listed in the configuration files.
24468069Seric    Which one should I use?
24568069Seric
24668069Seric	The choice is partly a matter of local preferences and what is
24768069Seric	running at the other end of your UUCP connection.  Unlike good
24868069Seric	protocols that define what will go over the wire, UUCP uses
24968069Seric	the policy that you should do what is right for the other end;
25068069Seric	if they change, you have to change.  This makes it hard to
25168069Seric	do the right thing, and discourages people from updating their
25268069Seric	software.  In general, if you can avoid UUCP, please do.
25368069Seric
25468069Seric	If you can't avoid it, you'll have to find the version that is
25568069Seric	closest to what the other end accepts.  Following is a summary
25668069Seric	of the UUCP mailers available.
25768069Seric
25868069Seric	uucp-old (obsolete name: "uucp")
25968069Seric	  This is the oldest, the worst (but the closest to UUCP) way of
26068069Seric	  sending messages accros UUCP connections.  It does bangify
26168069Seric	  everything and prepends $U (your UUCP name) to the sender's
26268069Seric	  address (which can already be a bang path itself).  It can
26368069Seric	  only send to one address at a time, so it spends a lot of
26468069Seric	  time copying duplicates of messages.  Avoid this if at all
26568069Seric	  possible.
26668069Seric
26768069Seric	uucp-new (obsolete name: "suucp")
26868069Seric	  The same as above, except that it assumes that in one rmail
26968069Seric	  command you can specify several recipients.  It still has a
27068069Seric	  lot of other problems.
27168069Seric
27268069Seric	uucp-dom
27368069Seric	  This UUCP mailer keeps everything as domain addresses.
27468069Seric	  Basically, it uses the SMTP mailer rewriting rules.
27568069Seric
27668069Seric	  Unfortunately, a lot of UUCP mailer transport agents require
27768069Seric	  bangified addresses in the envelope, although you can use
27868069Seric	  domain-based addresses in the message header.  (The envelope
27968069Seric	  shows up as the From_ line on UNIX mail.)  So....
28068069Seric
28168069Seric	uucp-uudom
28268069Seric	  This is a cross between uucp-new (for the envelope addresses)
28368069Seric	  and uucp-dom (for the header addresses).  It bangifies the
28468069Seric	  envelope sender (From_ line in messages) without adding the
28568069Seric	  local hostname, unless there is no host name on the address
28668069Seric	  at all (e.g., "wolf") or the host component is a UUCP host name
28768069Seric	  instead of a domain name ("somehost!wolf" instead of
28868069Seric	  "some.dom.ain!wolf").
28968069Seric
29068069Seric	Examples:
29168069Seric
29268069Seric	We are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
29368069Seric	following summarizes the sender rewriting for various mailers.
29468069Seric
29568069Seric	Mailer          sender		rewriting in the envelope
29668069Seric	------		------		-------------------------
29768069Seric	uucp-{old,new}	wolf		grasp!wolf
29868069Seric	uucp-dom	wolf		wolf@grasp.insa-lyon.fr
29968069Seric	uucp-uudom	wolf		grasp.insa-lyon.fr!wolf
30068069Seric
30168069Seric	uucp-{old,new}	wolf@fr.net	grasp!fr.net!wolf
30268069Seric	uucp-dom	wolf@fr.net	wolf@fr.net
30368069Seric	uucp-uudom	wolf@fr.net	fr.net!wolf
30468069Seric
30568069Seric	uucp-{old,new}	somehost!wolf	grasp!somehost!wolf
30668069Seric	uucp-dom	somehost!wolf	somehost!wolf@grasp.insa-lyon.fr
30768069Seric	uucp-uudom	somehost!wolf	grasp.insa-lyon.fr!somehost!wolf
30868069Seric
30968069Seric======================================================================
31068069SericRESOLVING PROBLEMS
31168069Seric======================================================================
31268069Seric
31368069Seric  * When I compile, I get "undefined symbol inet_aton" messages.
31468069Seric
31568069Seric	You've probably replaced your resolver with the version from
31668069Seric	BIND 4.9.3.  You need to cmpile with -l44bsd in order to get
31768069Seric	the additional routines.
31868069Seric----------------------------------------------------------------------
31967892Seric  * I'm getting "Local configuration error" messages, such as:
32067892Seric
32167892Seric	553 relay.domain.net config error: mail loops back to myself
32267892Seric	554 <user@domain.net>... Local configuration error
32367892Seric
32467892Seric    How can I solve this problem?
32567892Seric
32667892Seric	You have asked mail to the domain (e.g., domain.net) to be
32767892Seric	forwarded to a specific host (in this case, relay.domain.net)
32867892Seric	by using an MX record, but the relay machine doesn't recognize
32967892Seric	itself as domain.net.  Add domain.net to /etc/sendmail.cw
33067892Seric	(if you are using FEATURE(use_cw_file)) or add "Cw domain.net"
33167892Seric	to your configuration file.
33267898Seric
33367898Seric	IMPORTANT:  Be sure you kill and restart the sendmail daemon
33467898Seric	after you change the configuration file (for ANY change in
33567898Seric	the configuration, not just this one):
33667898Seric
33767898Seric		kill `head -1 /etc/sendmail.pid`
33867898Seric		sh -c "`tail -1 /etc/sendmail.pid`"
33967898Seric
34067898Seric	NOTA BENE:  kill -1 does not work!
34167892Seric----------------------------------------------------------------------
34266282Seric  * When I use sendmail V8 with a Sun config file I get lines like:
34366282Seric
34466282Seric	/etc/sendmail.cf: line 273: replacement $3 out of bounds
34566282Seric
34666282Seric    the line in question reads:
34766282Seric
34866282Seric	R$*<@$%y>$*		$1<@$2.LOCAL>$3			user@ether
34966282Seric
35066282Seric    what does this mean?  How do I fix it?
35166282Seric
35266282Seric	V8 doesn't recognize the Sun "$%y" syntax, so as far as it
35366282Seric	is concerned, there is only a $1 and a $2 (but no $3) in this
35466282Seric	line.  Read Rick McCarty's paper on "Converting Standard Sun
35566282Seric	Config Files to Sendmail Version 8", in the contrib directory
35666282Seric	(file "converting.sun.configs") on the sendmail distribution
35766282Seric	for a full discussion of how to do this.
35866282Seric----------------------------------------------------------------------
35966282Seric  * I'm connected to the network via a SLIP link.  Sometimes my sendmail
36066282Seric    process hangs (although it looks like part of the message has been
36166282Seric    transfered).  Everything else works.  What's wrong?
36266282Seric
36366282Seric	Most likely, the problem isn't sendmail at all, but the low
36466282Seric	level network connection.  It's important that the MTU (Maximum
36566282Seric	Transfer Unit) for the SLIP connection be set properly at both
36666282Seric	ends.  If they disagree, large packets will be trashed and
36766282Seric	the connection will hang.
36866282Seric----------------------------------------------------------------------
36966282Seric  * I just upgraded to 8.x and suddenly I'm getting messages in my
37066282Seric    syslog of the form "collect: I/O error on connection".  What is
37166282Seric    going wrong?
37266282Seric
37366282Seric    	Nothing.  This is just a diagnosis of a condition that had
37466282Seric    	not been diagnosed before.  If you are getting a lot of these
37566282Seric    	from a single host, there is probably some incompatibility
37666282Seric    	between 8.x and that host.  If you get a lot of them in general,
37766282Seric    	you may have network problems that are causing connections to
37866282Seric    	get reset.
37966282Seric----------------------------------------------------------------------
38067892Seric  * I just upgraded to 8.x and suddenly connections to the SMTP port
38167892Seric    take a long time.  What is going wrong?
38267892Seric
38367892Seric	It's probably something wierd in your TCP implementation that
38467892Seric	makes the IDENT code act oddly.  On most systems V8 tries to
38567892Seric	do a ``callback'' to the connecting host to get a validated
38667892Seric	user name (see RFC 1413 for details).  If the connecting
38767892Seric	host does not support such a service it will normally fail
38867892Seric	quickly with "Connection refused", but certain kinds of
38967892Seric	packet filters and certain TCP implementations just time out.
39067892Seric
39167892Seric	To test this, set the IDENT timeout to zero using
39267892Seric	``OrIdent=0'' in the configuration file.  This will
39367892Seric	completely disable all use of the IDENT protocol.
39467892Seric
39567892Seric	Another possible problem is that you have your name server
39667892Seric	and/or resolver configured improperly.  Make sure that
39767892Seric	all "nameserver" entries in /etc/resolv.conf point to functional
39867892Seric	servers.  If you are running your own server make certain that
39967892Seric	all the servers listed in your root cache (usually called
40067892Seric	something like "/var/namedb/root.cache"; see your
40167892Seric	/etc/named.boot file to get your value) are up to date.
40267892Seric	Either of these can cause long delays.
40367892Seric----------------------------------------------------------------------
40467892Seric  * I just upgraded to 8.x and suddenly I get errors such as ``mail:
40567892Seric    options must follow recipients.''  What is going wrong?
40667892Seric
40767892Seric	You need OSTYPE(systype) in your .mc file -- otherwise the
40867892Seric	configurations use a default that probably disagrees with
40967892Seric	your local mail system.  See cf/README for details.
41067892Seric----------------------------------------------------------------------
41166282Seric  * Under V8, the "From " header gets mysteriously munged when I send
41266282Seric    to an alias.
41366282Seric
41466282Seric	``It's not a bug, it's a feature.''  This happens when you have
41566282Seric	a "owner-list" alias and you send to "list".  V8 propogates the
41666282Seric	owner information into the envelope sender field (which appears
41766282Seric	as the "From " header on UNIX mail or as the Return-Path: header)
41866282Seric	so that downstream errors are properly returned to the mailing
41966282Seric	list owner instead of to the sender.  In order to make this
42066282Seric	appear as sensible as possible to end users, I recommend making
42166282Seric	the owner point to a "request" address -- for example:
42266282Seric
42366282Seric		list:		:include:/path/name/list.list
42466282Seric		owner-list:	list-request
42566282Seric		list-request:	eric
42666282Seric
42766282Seric	This will make message sent to "list" come out as being
42866282Seric	"From list-request" instead of "From eric".
42966282Seric----------------------------------------------------------------------
43066285Seric  * I want to run Sendmail version 8 on my DEC system, but you don't
43166285Seric    have MAIL11V3 support in sendmail.  How do I handle this?
43266285Seric
43366285Seric	Get Paul Vixie's reimplementation of the mail11 protocol
43466285Seric	from gatekeeper.dec.com in /pub/DEC/gwtools.
43566285Seric----------------------------------------------------------------------
43668069Seric  * Messages seem to disappear from my queue unsent.  When I look in
43768069Seric    the queue directory I see that they have been renamed from qf*
43868069Seric    to Qf*, and sendmail doesn't see these.
43968069Seric
44068069Seric	If you look closely you should find that the Qf files are
44168069Seric	owned by users other than root.  Since sendmail runs as root
44268069Seric	it refuses to believe information in non-root-owned qf files,
44368069Seric	and it renames them to Qf to get them out of the way and
44468069Seric	make it easy for you to find.  The usual cause of this is
44568069Seric	twofold:  first, you have the queue directory world writable
44668069Seric	(which is probably a mistake -- this opens up other security
44768069Seric	problems) and someone is calling sendmail with an "unsafe"
44868069Seric	flag, usually a -o flag that sets an option that could
44968069Seric	compromise security.  When sendmail sees this it gives up
45068069Seric	setuid root permissions.
45168069Seric
45268069Seric	The usual solution is to not use the problematic flags.
45368069Seric	If you must use them, you have to write a special queue
45468069Seric	directory and have them processed by the same uid that
45568069Seric	submitted the job in the first place.
45668069Seric----------------------------------------------------------------------
457