4 This directory has the latest sendmail(TM) software from Sendmail, Inc.
6 Report any bugs to sendmail-bugs-YYYY@support.sendmail.org
7 where YYYY is the current year, e.g., 2005.
9 There is a web site at http://www.sendmail.org/ -- see that site for
16 0. The vast majority of queries about sendmail are answered in the
17 README files noted below.
19 1. Read this README file, especially this introduction, and the DIRECTORY
22 2. Read the INSTALL file in this directory.
24 3. Read sendmail/README, especially:
26 b. the BUILDING SENDMAIL section
27 c. the relevant part(s) of the OPERATING SYSTEM AND COMPILE QUIRKS section
29 You may also find these useful:
33 f. devtools/Site/README
40 Sendmail is a trademark of Sendmail, Inc.
41 US Patent Numbers 6865671, 6986037.
43 +-----------------------+
44 | DIRECTORY PERMISSIONS |
45 +-----------------------+
47 Sendmail often gets blamed for many problems that are actually the
48 result of other problems, such as overly permissive modes on directories.
49 For this reason, sendmail checks the modes on system directories and
50 files to determine if they can be trusted. For sendmail to run without
51 complaining, you MUST execute the following command:
53 chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
54 chown root / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
56 You will probably have to tweak this for your environment (for example,
57 some systems put the spool directory into /usr/spool instead of
58 /var/spool). If you set the RunAsUser option in your sendmail.cf, the
59 /var/spool/mqueue directory will have to be owned by the RunAsUser user.
60 As a general rule, after you have compiled sendmail, run the command
64 to initialize the alias database. If it gives messages such as
66 WARNING: writable directory /etc
67 WARNING: writable directory /var/spool/mqueue
69 then the directories listed have inappropriate write permissions and
70 should be secured to avoid various possible security attacks.
72 Beginning with sendmail 8.9, these checks have become more strict to
73 prevent users from being able to access files they would normally not
74 be able to read. In particular, .forward and :include: files in unsafe
75 directory paths (directory paths which are group or world writable) will
76 no longer be allowed. This would mean that if user joe's home directory
77 was writable by group staff, sendmail would not use his .forward file.
78 This behavior can be altered, at the expense of system security, by
79 setting the DontBlameSendmail option. For example, to allow .forward
80 files in group writable directories:
82 O DontBlameSendmail=forwardfileingroupwritabledirpath
84 Or to allow them in both group and world writable directories:
86 O DontBlameSendmail=forwardfileinunsafedirpath
88 Items from these unsafe .forward and :include: files will be marked
89 as unsafe addresses -- the items can not be deliveries to files or
90 programs. This behavior can also be altered via DontBlameSendmail:
92 O DontBlameSendmail=forwardfileinunsafedirpath,
93 forwardfileinunsafedirpathsafe
95 The first flag allows the .forward file to be read, the second allows
96 the items in the file to be marked as safe for file and program
99 Other files affected by this strengthened security include class
100 files (i.e., Fw /etc/mail/local-host-names), persistent host status files,
101 and the files specified by the ErrorHeader and HelpFile options. Similar
102 DontBlameSendmail flags are available for the class, ErrorHeader, and
105 If you have an unsafe configuration of .forward and :include:
106 files, you can make it safe by finding all such files, and doing
107 a "chmod go-w $FILE" on each. Also, do a "chmod go-w $DIR" for
108 each directory in the file's path.
111 +--------------------------+
112 | FILE AND MAP PERMISSIONS |
113 +--------------------------+
115 Any application which uses either flock() or fcntl() style locking or
116 other APIs that use one of these locking methods (such as open() with
117 O_EXLOCK and O_SHLOCK) on files readable by other local untrusted users
118 may be susceptible to local denial of service attacks.
120 File locking is used throughout sendmail for a variety of files
121 including aliases, maps, statistics, and the pid file. Any user who
122 can open one of these files can prevent sendmail or it's associated
123 utilities, e.g., makemap or newaliases, from operating properly. This
124 can also affect sendmail's ability to update status files such as
125 statistics files. For system which use flock() for file locking, a
126 user's ability to obtain an exclusive lock prevents other sendmail
127 processes from reading certain files such as alias or map databases.
129 A workaround for this problem is to protect all sendmail files such
130 that they can't be opened by untrusted users. As long as users can
131 not open a file, they can not lock it. Since queue files should
132 already have restricted permissions, the only files that need
133 adjustment are alias, map, statistics, and pid files. These files
134 should be owned by root or the trusted user specified in the
135 TrustedUser option. Changing the permissions to be only readable and
136 writable by that user is sufficient to avoid the denial of service.
137 For example, depending on the paths you use, these commands would be
140 chmod 0640 /etc/mail/aliases /etc/mail/aliases.{db,pag,dir}
141 chmod 0640 /etc/mail/*.{db,pag,dir}
142 chmod 0640 /etc/mail/statistics /var/log/sendmail.st
143 chmod 0600 /var/run/sendmail.pid /etc/mail/sendmail.pid
145 If the permissions 0640 are used, be sure that only trusted users belong
146 to the group assigned to those files. Otherwise, files should not even
147 be group readable. As of sendmail 8.12.4, the permissions shown above
148 are the default permissions for newly created files.
150 Note that the denial of service on the plain text aliases file
151 (/etc/mail/aliases) only prevents newaliases from rebuilding the
152 aliases file. The same is true for the database files on systems which
153 use fcntl() style locking. Since it does not interfere with normal
154 operations, sites may chose to leave these files readable. Also, it is
155 not necessary to protect the text files associated with map databases
156 as makemap does not lock those files.
159 +-----------------------+
160 | RELATED DOCUMENTATION |
161 +-----------------------+
163 There are other files you should read. Rooted in this directory are:
166 The FAQ (frequently answered questions) is no longer maintained
167 with the sendmail release. It is available at
168 http://www.sendmail.org/faq/ . The file FAQ is a reminder of
169 this and a pointer to the web page.
171 Installation instructions for building and installing sendmail.
173 Known bugs in the current release.
175 A detailed description of the changes in each version. This
176 is quite long, but informative.
178 Details on compiling and installing sendmail.
180 Details on configuring sendmail.
182 The sendmail Installation & Operations Guide. In addition
183 to the shipped PostScript version, plain text and PDF versions
184 can be generating using (assuming the required conversion software
185 is installed on your system, see doc/op/Makefile):
187 cd doc/op && make op.txt op.pdf
189 Be warned: on some systems calling make in doc/op/ will cause
190 errors due to nroff/groff problems. Known problems are:
191 - running this off on systems with an old version of -me, you
192 need to add the following macro to the macros:
198 This sets a word in a smaller pointsize.
200 - with new groff versions (1.18 seems affected)
204 needs to be set, e.g., in doc/op/Makefile:
206 ROFF_CMD= GROFF_NO_SGR=1 groff
213 There are several related RFCs that you may wish to read -- they are
214 available via anonymous FTP to several sites. For a list of the
215 primary repositories see:
217 http://www.isi.edu/in-notes/rfc-retrieval.txt
219 They are also online at:
223 They can also be retrieved via electronic mail by sending
226 mail-server@nisc.sri.com
227 Put "send rfcNNN" in message body
229 Put "send RFCnnn.TXT-1" in message body
231 Put "RFCnnn" as Subject: line
233 For further instructions see:
235 http://www.isi.edu/in-notes/rfc-editor/rfc-info
237 Important RFCs for electronic mail are:
240 RFC822 Mail header format
242 RFC976 UUCP mail format
243 RFC1123 Host requirements (modifies 821, 822, and 974)
244 RFC1344 Implications of MIME for Internet Mail Gateways
245 RFC1413 Identification server
246 RFC1428 Transition of Internet Mail from Just-Send-8 to
248 RFC1652 SMTP Service Extension for 8bit-MIMEtransport
249 RFC1869 SMTP Service Extensions (ESMTP spec)
250 RFC1870 SMTP Service Extension for Message Size Declaration
251 RFC1891 SMTP Service Extension for Delivery Status Notifications
252 RFC1892 Multipart/Report Content Type for the Reporting of
253 Mail System Administrative Messages
254 RFC1893 Enhanced Mail System Status Codes
255 RFC1894 An Extensible Message Format for Delivery Status
257 RFC1985 SMTP Service Extension for Remote Message Queue Starting
258 RFC2033 Local Mail Transfer Protocol (LMTP)
259 RFC2034 SMTP Service Extension for Returning Enhanced Error Codes
260 RFC2045 Multipurpose Internet Mail Extensions (MIME) Part One:
261 Format of Internet Message Bodies
262 RFC2476 Message Submission
263 RFC2487 SMTP Service Extension for Secure SMTP over TLS
264 RFC2554 SMTP Service Extension for Authentication
265 RFC2821 Simple Mail Transfer Protocol
266 RFC2822 Internet Message Format
267 RFC2852 Deliver By SMTP Service Extension
268 RFC2920 SMTP Service Extension for Command Pipelining
270 Other standards that may be of interest (but which are less directly
271 relevant to sendmail) are:
273 RFC987 Mapping between RFC822 and X.400
274 RFC1049 Content-Type header field (extension to RFC822)
276 Warning to AIX users: this version of sendmail does not implement
277 MB, MR, or MG DNS resource records, as defined (as experiments) in
285 Since sendmail 8.11 and later includes hooks to cryptography, the
286 following information from OpenSSL applies to sendmail as well.
288 PLEASE REMEMBER THAT EXPORT/IMPORT AND/OR USE OF STRONG CRYPTOGRAPHY
289 SOFTWARE, PROVIDING CRYPTOGRAPHY HOOKS OR EVEN JUST COMMUNICATING
290 TECHNICAL DETAILS ABOUT CRYPTOGRAPHY SOFTWARE IS ILLEGAL IN SOME
291 PARTS OF THE WORLD. SO, WHEN YOU IMPORT THIS PACKAGE TO YOUR
292 COUNTRY, RE-DISTRIBUTE IT FROM THERE OR EVEN JUST EMAIL TECHNICAL
293 SUGGESTIONS OR EVEN SOURCE PATCHES TO THE AUTHOR OR OTHER PEOPLE
294 YOU ARE STRONGLY ADVISED TO PAY CLOSE ATTENTION TO ANY EXPORT/IMPORT
295 AND/OR USE LAWS WHICH APPLY TO YOU. THE AUTHORS ARE NOT LIABLE FOR
296 ANY VIOLATIONS YOU MAKE HERE. SO BE CAREFUL, IT IS YOUR RESPONSIBILITY.
298 If you use OpenSSL then make sure you read their README file which
299 contains information about patents etc.
302 +-------------------+
303 | DATABASE ROUTINES |
304 +-------------------+
306 IF YOU WANT TO RUN THE NEW BERKELEY DB SOFTWARE: **** DO NOT ****
307 use the version that was on the Net2 tape -- it has a number of
308 nefarious bugs that were bad enough when I got them; you shouldn't have
309 to go through the same thing. Instead, get a new version via the web at
310 http://www.sleepycat.com/. This software is highly recommended; it gets
311 rid of several stupid limits, it's much faster, and the interface is
312 nicer to animals and plants. If the Berkeley DB include files
313 are installed in a location other than those which your compiler searches,
314 you will need to provide that directory when building:
316 ./Build -I/path/to/include/directory
318 If you are using Berkeley DB versions 1.85 or 1.86, you are *strongly*
319 urged to upgrade to DB version 2 or later, available from
320 http://www.sleepycat.com/. Berkeley DB versions 1.85 and 1.86 are known to
321 be broken in various nasty ways (see http://www.sleepycat.com/db.185.html),
322 and can cause sendmail to dump core. In addition, the newest versions of
323 gcc and the Solaris compilers perform optimizations in those versions that
324 may cause fairly random core dumps.
326 If you have no choice but to use Berkeley DB 1.85 or 1.86, and you are
327 using both Berkeley DB and files in the UNIX ndbm format, remove ndbm.h
328 and ndbm.o from the DB library after building it. You should also apply
329 all of the patches for DB 1.85 and 1.86 found at the Sleepycat web site
330 (see http://www.sleepycat.com/db.185.html), as they fix some of the known
333 If you are using a version of Berkeley DB 2 previous to 2.3.15, and you
334 are using both Berkeley DB and files in the UNIX ndbm format, remove dbm.o
335 from the DB library after building it. No other changes are necessary.
337 If you are using Berkeley DB version 2.3.15 or greater, no changes are
340 The underlying database file formats changed between Berkeley DB versions
341 1.85 and 1.86, again between DB 1.86 and version 2.0, and finally between
342 DB 2.X and 3.X. If you are upgrading from one of those versions, you must
343 recreate your database file(s). Do this by rebuilding all maps with
344 makemap and rebuilding the alias file with newaliases.
347 +--------------------+
348 | HOST NAME SERVICES |
349 +--------------------+
351 If you are using NIS or /etc/hosts, it is critical that you
352 list the long (fully qualified) name somewhere (preferably first) in
353 the /etc/hosts file used to build the NIS database. For example, the
356 128.32.149.68 mastodon.CS.Berkeley.EDU mastodon
360 128.32.149.68 mastodon
362 If you do not include the long name, sendmail will complain loudly
363 about ``unable to qualify my own domain name (mastodon) -- using
364 short name'' and conclude that your canonical name is the short
365 version and use that in messages. The name "mastodon" doesn't mean
366 much outside of Berkeley, and so this creates incorrect and unreplyable
374 This version of sendmail notices and reports certain kinds of SMTP
375 protocol violations that were ignored by older versions. If you
376 are running MH you may wish to install the patch in contrib/mh.patch
377 that will prevent these warning reports. This patch also works
378 with the old version of sendmail, so it's safe to go ahead and
386 Sendmail 8 supports the IDENT protocol, as defined by RFC 1413.
387 Note that the RFC states a client should wait at least 30 seconds
388 for a response. As of 8.10.0, the default Timeout.ident is 5 seconds
389 as many sites have adopted the practice of dropping IDENT queries.
390 This has lead to delays processing mail.
392 No ident server is included with this distribution. It is available
395 ftp://ftp.lysator.liu.se/pub/ident/servers/
396 http://sf.www.lysator.liu.se/~pen/pidentd/
398 +-------------------------+
399 | INTEROPERATION PROBLEMS |
400 +-------------------------+
402 Microsoft Exchange Server 5.0
403 We have had a report that ``about 7% of messages from Sendmail
404 to Exchange were not being delivered with status messages of
405 "connection reset" and "I/O error".'' Upgrading Exchange from
406 Version 5.0 to Version 5.5 Service Pack 2 solved this problem.
409 CommuniGate Pro 3.2.4 does not accept the AUTH= -parameter on
410 the MAIL FROM command if the client is not authenticated. Use
412 define(`confAUTH_OPTIONS', `A')
414 in .mc file if you have compiled sendmail with Cyrus SASL
415 and you communicate with CommuniGate Pro servers.
417 +---------------------+
418 | DIRECTORY STRUCTURE |
419 +---------------------+
421 The structure of this directory tree is:
423 cf Source for sendmail configuration files. These are
424 different than what you've seen before. They are a
425 fairly dramatic rewrite, requiring the new sendmail
426 (since they use new features).
427 contrib Some contributed tools to help with sendmail. THESE
428 ARE NOT SUPPORTED by sendmail -- contact the original
429 authors if you have problems. (This directory is not
431 devtools Build environment. See devtools/README.
432 doc Documentation. If you are getting source, read
433 op.me -- it's long, but worth it.
434 editmap A program to edit and query maps that have been created
435 with makemap, e.g., adding and deleting entries.
436 include Include files used by multiple programs in the distribution.
437 libsmdb sendmail database library with support for Berkeley DB 1.X,
438 Berkeley DB 2.X, Berkeley DB 3.X, and NDBM.
439 libsmutil sendmail utility library with functions used by different
441 mail.local The source for the local delivery agent used for 4.4BSD.
442 THIS IS NOT PART OF SENDMAIL! and may not compile
443 everywhere, since it depends on some 4.4-isms. Warning:
444 it does mailbox locking differently than other systems.
445 mailstats Statistics printing program.
446 makemap A program that creates the keyed maps used by the $( ... $)
447 construct in sendmail. It is primitive but effective.
448 It takes a very simple input format, so you will probably
449 expect to preprocess must human-convenient formats
450 using sed scripts before this program will like them.
451 But it should be functionally complete.
452 praliases A program to print the DBM or NEWDB version of the
454 rmail Source for rmail(8). This is used as a delivery
455 agent for for UUCP, and could presumably be used by
456 other non-socket oriented mailers. Older versions of
457 rmail are probably deficient. RMAIL IS NOT PART OF
458 SENDMAIL!!! The 4.4BSD source is included for you to
459 look at or try to port to your system. There is no
460 guarantee it will even compile on your operating system.
461 smrsh The "sendmail restricted shell", which can be used as
462 a replacement for /bin/sh in the prog mailer to provide
463 increased security control. NOT PART OF SENDMAIL!
464 sendmail Source for the sendmail program itself.
465 test Some test scripts (currently only for compilation aids).
466 vacation Source for the vacation program. NOT PART OF SENDMAIL!
468 $Revision: 8.95 $, Last updated $Date: 2009/04/10 17:49:18 $