xref: /csrg-svn/usr.sbin/sendmail/FAQ (revision 66282)
1*66282Seric			    Sendmail Version 8
2*66282Seric			Frequently Asked Questions
3*66282Seric		       Last Update: January 26, 1994
4*66282Seric
5*66282Seric
6*66282SericThis FAQ is specific to Version 8 of sendmail.
7*66282Seric
8*66282Seric----------------------------------------------------------------------
9*66282Seric  * What are the differences between Version 8 and other versions?
10*66282Seric
11*66282Seric	See CHANGES-R5-R8 in the anonymous FTP directory.
12*66282Seric----------------------------------------------------------------------
13*66282Seric  * What happened to sendmail 6.x and 7.x?
14*66282Seric
15*66282Seric	When I released a new version of sendmail, I changed it to
16*66282Seric	Release 6.  Development continued in that tree until 4.4BSD
17*66282Seric	was released, when everything on the 4.4 tape was set to be
18*66282Seric	version 8.1.  Version 7.x never existed.
19*66282Seric----------------------------------------------------------------------
20*66282Seric  * Where can I get Version 8?
21*66282Seric
22*66282Seric	Via anonymous FTP from FTP.CS.Berkeley.EDU in /ucb/sendmail.
23*66282Seric----------------------------------------------------------------------
24*66282Seric  * Version 8 requires a new version of "make".  Where can I get this?
25*66282Seric
26*66282Seric	Actually, Version 8 does not require a new version of "make".
27*66282Seric	It includes a collection of Makefiles for different architectures,
28*66282Seric	only one or two of which require the new "make".  If you are
29*66282Seric	porting to a new architecture, start with Makefile.dist.
30*66282Seric
31*66282Seric	If you really do want the new make, it is available on any of
32*66282Seric	the BSD Net2 distribution sites.  These include:
33*66282Seric
34*66282Seric		ftp.uu.net		/systems/unix/bsd-sources
35*66282Seric		gatekeeper.dec.com	/.0/BSD/net2
36*66282Seric		ucquais.cba.uc.edu	/pub/net2
37*66282Seric		ftp.luth.se		/pub/unix/4.3bsd/net2
38*66282Seric
39*66282Seric	Diffs and instructions for building this version of make under
40*66282Seric	SunOS 4.1.x are available on ftp.css.itd.umich.edu in
41*66282Seric	/pub/systems/sun/Net2-make.sun4.diff.Z.
42*66282Seric----------------------------------------------------------------------
43*66282Seric  * What macro package do I use to format the V8 man pages?
44*66282Seric
45*66282Seric	The BSD group switched over the the ``mandoc'' macros for
46*66282Seric	the 4.4 release.  These include more hooks designed for
47*66282Seric	hypertext handling.  However, new man pages won't format
48*66282Seric	under the old man macros.  Fortunately, old man pages will
49*66282Seric	format under the new mandoc macros.
50*66282Seric
51*66282Seric	Get the new macros with the BSD Net2 release.
52*66282Seric
53*66282Seric	This macro set is also available with newer versions of groff.
54*66282Seric----------------------------------------------------------------------
55*66282Seric  * What books are available describing sendmail?
56*66282Seric
57*66282Seric	There is one book available devoted to sendmail, and
58*66282Seric	several books that have sendmail chapters.
59*66282Seric
60*66282Seric	Nemeth, Snyder, and Seebass, _Unix System Administration
61*66282Seric		Handbook_.  Prentice-Hall.
62*66282Seric	Carl-Mitchell and Quarterman, _Practical Internetworking with
63*66282Seric		TCP/IP and UNIX_.  Addison-Wesley.
64*66282Seric	Hunt, _TCP/IP Network Administration_.  O'Reilly & Associates.
65*66282Seric	Costales, Allman, and Rickert, _Sendmail_.  O'Reilly &
66*66282Seric		Associates.
67*66282Seric
68*66282Seric	Another book is due out "soon":
69*66282Seric
70*66282Seric	Avolio & Vixie, _Sendmail Theory and Practice_.  Digital
71*66282Seric		Press (release date unknown).
72*66282Seric----------------------------------------------------------------------
73*66282Seric  * How do I make all my addresses appear to be from a single host?
74*66282Seric
75*66282Seric	Using the V8 configuration macros, use:
76*66282Seric
77*66282Seric		MASQUERADE_AS(my.dom.ain)
78*66282Seric
79*66282Seric	This will cause all addresses to be sent out as being from
80*66282Seric	the indicated domain.
81*66282Seric----------------------------------------------------------------------
82*66282Seric  * How do I rewrite my From: lines to read ``First_Last@My.Domain''?
83*66282Seric
84*66282Seric	There are a couple of ways of doing this.  This describes using
85*66282Seric	the "user database" code.  This is still experimental, and was
86*66282Seric	intended for a different purpose -- however, it does work
87*66282Seric	with a bit of care.  It does require that you have the Berkeley
88*66282Seric	"db" package installed (it won't work with DBM).
89*66282Seric
90*66282Seric	First, create your input file.  This should have lines like:
91*66282Seric
92*66282Seric		loginname:mailname	First_Last
93*66282Seric		First_Last:maildrop	loginname
94*66282Seric
95*66282Seric	Install it in (say) /etc/userdb.  Create the database:
96*66282Seric
97*66282Seric		makemap btree /etc/userdb.db < /etc/userdb
98*66282Seric
99*66282Seric	You can then create a config file that uses this.  You will
100*66282Seric	have to include the following in your .mc file:
101*66282Seric
102*66282Seric		define(confUSERDB_SPEC, /etc/userdb.db)
103*66282Seric		FEATURE(notsticky)
104*66282Seric----------------------------------------------------------------------
105*66282Seric  * So what was the user database feature intended for?
106*66282Seric
107*66282Seric	The intent was to have all information for a given user (where
108*66282Seric	the user is the unique login name, not an inherently non-unique
109*66282Seric	full name) in one place.  This would include phone numbers,
110*66282Seric	addresses, and so forth.  The "maildrop" feature is because
111*66282Seric	Berkeley does not use a centralized mail server (there are a
112*66282Seric	number of reasons for this that are mostly historic), and so
113*66282Seric	we need to know where each user gets his or her mail delivered --
114*66282Seric	i.e., the mail drop.
115*66282Seric
116*66282Seric	We are in the process of setting up our environment so that
117*66282Seric	mail sent to an unqualified "name" goes to that person's
118*66282Seric	preferred maildrop; mail sent to "name@host" goes to that
119*66282Seric	host.  The purpose of "FEATURE(notsticky)" is to cause
120*66282Seric	"name@host" to be looked up in the user database for delivery
121*66282Seric	to the maildrop.
122*66282Seric----------------------------------------------------------------------
123*66282Seric  * Why are you so hostile to using full names for e-mail addresses?
124*66282Seric
125*66282Seric	Because full names are not unique.  For example, the computer
126*66282Seric	community has two Andy Tannenbaums and two Peter Deutsches.
127*66282Seric	At one time, Bell Labs had two Stephen R. Bournes with offices
128*66282Seric	a few doors apart.  You can create alternative addresses
129*66282Seric	(e.g., Stephen_R_Bourne_2), but that's even worse -- which
130*66282Seric	one of them has to have their name desecrated in this way?
131*66282Seric	And you can bet that they will get most of the other person's
132*66282Seric	email.
133*66282Seric
134*66282Seric	So called "full names" are just longer versions of unique
135*66282Seric	names.  Rather that lulling people into a sense of security,
136*66282Seric	I'd rather that it be clear that these handles are arbitrary.
137*66282Seric	People should use good user agents that have alias mappings
138*66282Seric	so that they can attach arbitrary names for their personal
139*66282Seric	use to those with whom they correspond.
140*66282Seric
141*66282Seric	Even worse is fuzzy matching in e-mail -- this can make good
142*66282Seric	addresses turn bad.  For example, I'm currently (to the best
143*66282Seric	of my knowledge) the only ``Allman'' at Berkeley, so mail
144*66282Seric	sent to "Allman@Berkeley.EDU" should get to me.  But if
145*66282Seric	another Allman ever appears, this address could suddenly
146*66282Seric	become ambiguous.  I've been the only Allman at Berkeley for
147*66282Seric	over fifteen years -- to suddenly have this "good address"
148*66282Seric	bounce mail because it is ambiguous would be a heinous wrong.
149*66282Seric
150*66282Seric	Finger services should be as fuzzy as possible.  Mail services
151*66282Seric	should be unique.
152*66282Seric----------------------------------------------------------------------
153*66282Seric  * When I use sendmail V8 with a Sun config file I get lines like:
154*66282Seric
155*66282Seric	/etc/sendmail.cf: line 273: replacement $3 out of bounds
156*66282Seric
157*66282Seric    the line in question reads:
158*66282Seric
159*66282Seric	R$*<@$%y>$*		$1<@$2.LOCAL>$3			user@ether
160*66282Seric
161*66282Seric    what does this mean?  How do I fix it?
162*66282Seric
163*66282Seric	V8 doesn't recognize the Sun "$%y" syntax, so as far as it
164*66282Seric	is concerned, there is only a $1 and a $2 (but no $3) in this
165*66282Seric	line.  Read Rick McCarty's paper on "Converting Standard Sun
166*66282Seric	Config Files to Sendmail Version 8", in the contrib directory
167*66282Seric	(file "converting.sun.configs") on the sendmail distribution
168*66282Seric	for a full discussion of how to do this.
169*66282Seric----------------------------------------------------------------------
170*66282Seric  * Should I use a wildcard MX for my domain?
171*66282Seric
172*66282Seric	If at all possible, no.
173*66282Seric
174*66282Seric	Wildcard MX records have lots of semantic "gotcha"s.  For
175*66282Seric	example, they will match a host "unknown.your.domain" -- if
176*66282Seric	you don't explicitly test for unknown hosts in your domain,
177*66282Seric	you will get "config error: mail loops back to myself"
178*66282Seric	errors.
179*66282Seric----------------------------------------------------------------------
180*66282Seric  * I'm connected to the network via a SLIP link.  Sometimes my sendmail
181*66282Seric    process hangs (although it looks like part of the message has been
182*66282Seric    transfered).  Everything else works.  What's wrong?
183*66282Seric
184*66282Seric	Most likely, the problem isn't sendmail at all, but the low
185*66282Seric	level network connection.  It's important that the MTU (Maximum
186*66282Seric	Transfer Unit) for the SLIP connection be set properly at both
187*66282Seric	ends.  If they disagree, large packets will be trashed and
188*66282Seric	the connection will hang.
189*66282Seric----------------------------------------------------------------------
190*66282Seric  * I just upgraded to 8.x and suddenly I'm getting messages in my
191*66282Seric    syslog of the form "collect: I/O error on connection".  What is
192*66282Seric    going wrong?
193*66282Seric
194*66282Seric    	Nothing.  This is just a diagnosis of a condition that had
195*66282Seric    	not been diagnosed before.  If you are getting a lot of these
196*66282Seric    	from a single host, there is probably some incompatibility
197*66282Seric    	between 8.x and that host.  If you get a lot of them in general,
198*66282Seric    	you may have network problems that are causing connections to
199*66282Seric    	get reset.
200*66282Seric----------------------------------------------------------------------
201*66282Seric  * How can I get sendmail to deliver local mail to $HOME/.mail
202*66282Seric    instead of into /usr/spool/mail (or /usr/mail)?
203*66282Seric
204*66282Seric	This is a local mailer issue, not a sendmail issue.  Either
205*66282Seric	modify your local mailer (source code will be required) or
206*66282Seric	change the program called in the "local" mailer configuration
207*66282Seric	description to be a new program that does this local delivery.
208*66282Seric	I understand that "procmail" works well, although I haven't
209*66282Seric	used it myself.
210*66282Seric----------------------------------------------------------------------
211*66282Seric  * Under V8, the "From " header gets mysteriously munged when I send
212*66282Seric    to an alias.
213*66282Seric
214*66282Seric	``It's not a bug, it's a feature.''  This happens when you have
215*66282Seric	a "owner-list" alias and you send to "list".  V8 propogates the
216*66282Seric	owner information into the envelope sender field (which appears
217*66282Seric	as the "From " header on UNIX mail or as the Return-Path: header)
218*66282Seric	so that downstream errors are properly returned to the mailing
219*66282Seric	list owner instead of to the sender.  In order to make this
220*66282Seric	appear as sensible as possible to end users, I recommend making
221*66282Seric	the owner point to a "request" address -- for example:
222*66282Seric
223*66282Seric		list:		:include:/path/name/list.list
224*66282Seric		owner-list:	list-request
225*66282Seric		list-request:	eric
226*66282Seric
227*66282Seric	This will make message sent to "list" come out as being
228*66282Seric	"From list-request" instead of "From eric".
229*66282Seric----------------------------------------------------------------------
230*66282Seric  * There are four UUCP mailers listed in the configuration files.
231*66282Seric    Which one should I use?
232*66282Seric
233*66282Seric	The choice is partly a matter of local preferences and what is
234*66282Seric	running at the other end of your UUCP connection.  Unlike good
235*66282Seric	protocols that define what will go over the wire, UUCP uses
236*66282Seric	the policy that you should do what is right for the other end;
237*66282Seric	if they change, you have to change.  This makes it hard to
238*66282Seric	do the right thing, and discourages people from updating their
239*66282Seric	software.  In general, if you can avoid UUCP, please do.
240*66282Seric
241*66282Seric	If you can't avoid it, you'll have to find the version that is
242*66282Seric	closest to what the other end accepts.  Following is a summary
243*66282Seric	of the UUCP mailers available.
244*66282Seric
245*66282Seric	uucp-old (obsolete name: "uucp")
246*66282Seric	  This is the oldest, the worst (but the closest to UUCP) way of
247*66282Seric	  sending messages accros UUCP connections.  It does bangify
248*66282Seric	  everything and prepends $U (your UUCP name) to the sender's
249*66282Seric	  address (which can already be a bang path itself).  It can
250*66282Seric	  only send to one address at a time, so it spends a lot of
251*66282Seric	  time copying duplicates of messages.  Avoid this if at all
252*66282Seric	  possible.
253*66282Seric
254*66282Seric	uucp-new (obsolete name: "suucp")
255*66282Seric	  The same as above, except that it assumes that in one rmail
256*66282Seric	  command you can specify several recipients.  It still has a
257*66282Seric	  lot of other problems.
258*66282Seric
259*66282Seric	uucp-dom
260*66282Seric	  This UUCP mailer keeps everything as domain addresses.
261*66282Seric	  Basically, it uses the SMTP mailer rewriting rules.
262*66282Seric
263*66282Seric	  Unfortunately, a lot of UUCP mailer transport agents require
264*66282Seric	  bangified addresses in the envelope, although you can use
265*66282Seric	  domain-based addresses in the message header.  (The envelope
266*66282Seric	  shows up as the From_ line on UNIX mail.)  So....
267*66282Seric
268*66282Seric	uucp-uudom
269*66282Seric	  This is a cross between uucp-new (for the envelope addresses)
270*66282Seric	  and uucp-dom (for the header addresses).  It bangifies the
271*66282Seric	  envelope sender (From_ line in messages) without adding the
272*66282Seric	  local hostname, unless there is no host name on the address
273*66282Seric	  at all (e.g., "wolf") or the host component is a UUCP host name
274*66282Seric	  instead of a domain name ("somehost!wolf" instead of
275*66282Seric	  "some.dom.ain!wolf").
276*66282Seric
277*66282Seric	Examples:
278*66282Seric
279*66282Seric	We are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
280*66282Seric	following summarizes the sender rewriting for various mailers.
281*66282Seric
282*66282Seric	Mailer          sender		rewriting in the envelope
283*66282Seric	------		------		-------------------------
284*66282Seric	uucp-{old,new}	wolf		grasp!wolf
285*66282Seric	uucp-dom	wolf		wolf@grasp.insa-lyon.fr
286*66282Seric	uucp-uudom	wolf		grasp.insa-lyon.fr!wolf
287*66282Seric
288*66282Seric	uucp-{old,new}	wolf@fr.net	grasp!fr.net!wolf
289*66282Seric	uucp-dom	wolf@fr.net	wolf@fr.net
290*66282Seric	uucp-uudom	wolf@fr.net	fr.net!wolf
291*66282Seric
292*66282Seric	uucp-{old,new}	somehost!wolf	grasp!somehost!wolf
293*66282Seric	uucp-dom	somehost!wolf	somehost!wolf@grasp.insa-lyon.fr
294*66282Seric	uucp-uudom	somehost!wolf	grasp.insa-lyon.fr!somehost!wolf
295*66282Seric----------------------------------------------------------------------
296*66282Seric  * I'm trying to to get my mail to go into queue only mode, and it
297*66282Seric    delivers the mail interactively anyway.  (Or, I'm trying to use
298*66282Seric    the "don't deliver to expensive mailer" flag, and it doesn't
299*66282Seric    delivers the mail interactively anyway.)  I can see it does it:
300*66282Seric    here's the output of "sendmail -v foo@somehost" (or Mail -v or
301*66282Seric    equivalent).
302*66282Seric
303*66282Seric	The -v flag to sendmail (which is implied by the -v flag to
304*66282Seric	Mail and other programs in that family) tells sendmail to
305*66282Seric	watch the transaction.  Since you have explicitly asked to
306*66282Seric	see what's going on, it assumes that you do not want to to
307*66282Seric	auto-queue, and turns that feature off.  Remove the -v flag
308*66282Seric	and use a "tail -f" of the log instead to see what's going on.
309*66282Seric
310*66282Seric	If you are trying to use the "don't deliver to expensive mailer"
311*66282Seric	flag (mailer flag "e"), be sure you also turn on global option
312*66282Seric	"c" -- otherwise it ignores the mailer flag.
313*66282Seric----------------------------------------------------------------------
314*66282Seric+ * I'm getting "Local configuration error" messages, such as:
315*66282Seric+
316*66282Seric+	553 relay.domain.net config error: mail loops back to myself
317*66282Seric+	554 <user@domain.net>... Local configuration error
318*66282Seric+
319*66282Seric+   How can I solve this problem?
320*66282Seric+
321*66282Seric+	You have asked mail to the domain (e.g., domain.net) to be
322*66282Seric+	forwarded to a specific host (in this case, relay.domain.net)
323*66282Seric+	by using an MX record, but the relay machine doesn't recognize
324*66282Seric+	itself as domain.net.  Add domain.net to /etc/sendmail.cw
325*66282Seric+	(if you are using FEATURE(use_cw_file)) or add "Cw domain.net"
326*66282Seric+	to your configuration file.
327*66282Seric----------------------------------------------------------------------
328