1c2aa98e2SPeter Wemm 2c2aa98e2SPeter Wemm 3c2aa98e2SPeter Wemm K N O W N B U G S I N S E N D M A I L 4c2aa98e2SPeter Wemm 5c2aa98e2SPeter Wemm 640266059SGregory Neil ShapiroThe following are bugs or deficiencies in sendmail that we are aware of 7c2aa98e2SPeter Wemmbut which have not been fixed in the current release. You probably 8c2aa98e2SPeter Wemmwant to get the most up to date version of this from ftp.sendmail.org 9c2aa98e2SPeter Wemmin /pub/sendmail/KNOWNBUGS. For descriptions of bugs that have been 10c2aa98e2SPeter Wemmfixed, see the file RELEASE_NOTES (in the root directory of the sendmail 11c2aa98e2SPeter Wemmdistribution). 12c2aa98e2SPeter Wemm 13c2aa98e2SPeter WemmThis list is not guaranteed to be complete. 14c2aa98e2SPeter Wemm 1542e5d165SGregory Neil Shapiro* Delivery to programs that generate too much output may cause problems 1642e5d165SGregory Neil Shapiro 1742e5d165SGregory Neil Shapiro If e-mail is delivered to a program which generates too much 1842e5d165SGregory Neil Shapiro output, then sendmail may issue an error: 1942e5d165SGregory Neil Shapiro 2042e5d165SGregory Neil Shapiro timeout waiting for input from local during Draining Input 2142e5d165SGregory Neil Shapiro 2242e5d165SGregory Neil Shapiro Make sure that the program does not generate output beyond a 2342e5d165SGregory Neil Shapiro status message (corresponding to the exit status). This may 2442e5d165SGregory Neil Shapiro require a wrapper around the actual program to redirect output 2542e5d165SGregory Neil Shapiro to /dev/null. 2642e5d165SGregory Neil Shapiro 2742e5d165SGregory Neil Shapiro Such a problem has been reported for bulk_mailer. 28c2aa98e2SPeter Wemm 29c2aa98e2SPeter Wemm* Null bytes are not handled properly in headers. 30c2aa98e2SPeter Wemm 31c2aa98e2SPeter Wemm Sendmail should handle full binary data. As it stands, it handles 32c2aa98e2SPeter Wemm all values in the body, but only 0x01-0x80 and 0xA0-0xFF in 33c2aa98e2SPeter Wemm the header. Notably missing is 0x00, which would require a major 34c2aa98e2SPeter Wemm restructuring of the code -- for example, almost no C library support 35c2aa98e2SPeter Wemm could be used to handle strings. 36c2aa98e2SPeter Wemm 3740266059SGregory Neil Shapiro* Header checks are not called if header value is too long or empty. 3813058a91SGregory Neil Shapiro 3913058a91SGregory Neil Shapiro If the value of a header is longer than 1250 (MAXNAME + MAXATOM - 6) 4013058a91SGregory Neil Shapiro characters or it contains a single word longer than 256 (MAXNAME) 4113058a91SGregory Neil Shapiro characters then no header check is done even if one is configured for 4213058a91SGregory Neil Shapiro the header. 4313058a91SGregory Neil Shapiro 44605302a5SGregory Neil Shapiro* Sender addresses whose domain part cause a temporary A record lookup 45605302a5SGregory Neil Shapiro failure but have a valid MX record will be temporarily rejected in 46605302a5SGregory Neil Shapiro the default configuration. Solution: fix the DNS at the sender side. 47605302a5SGregory Neil Shapiro If that's not easy to achieve, possible workarounds are: 48605302a5SGregory Neil Shapiro - add an entry to the access map: 49605302a5SGregory Neil Shapiro dom.ain OK 50605302a5SGregory Neil Shapiro - (only for advanced users) replace 51605302a5SGregory Neil Shapiro 52605302a5SGregory Neil Shapiro# Resolve map (to check if a host exists in check_mail) 53605302a5SGregory Neil ShapiroKresolve host -a<OKR> -T<TEMP> 54605302a5SGregory Neil Shapiro 55605302a5SGregory Neil Shapiro with 56605302a5SGregory Neil Shapiro 57605302a5SGregory Neil Shapiro# Resolve map (to check if a host exists in check_mail) 58605302a5SGregory Neil ShapiroKcanon host -a<OKR> -T<TEMP> 59605302a5SGregory Neil ShapiroKdnsmx dns -R MX -a<OKR> -T<TEMP> 60605302a5SGregory Neil ShapiroKresolve sequence dnsmx canon 61605302a5SGregory Neil Shapiro 62605302a5SGregory Neil Shapiro 63c2aa98e2SPeter Wemm* Duplicate error messages. 64c2aa98e2SPeter Wemm 65c2aa98e2SPeter Wemm Sometimes identical, duplicate error messages can be generated. As 66c2aa98e2SPeter Wemm near as I can tell, this is rare and relatively innocuous. 67c2aa98e2SPeter Wemm 6840266059SGregory Neil Shapiro* Misleading error messages. 69c2aa98e2SPeter Wemm 7040266059SGregory Neil Shapiro If an illegal address is specified on the command line together 7140266059SGregory Neil Shapiro with at least one valid address and PostmasterCopy is set, the 7240266059SGregory Neil Shapiro DSN does not contain the illegal address, but only the valid 7340266059SGregory Neil Shapiro address(es). 74c2aa98e2SPeter Wemm 75c2aa98e2SPeter Wemm* \231 considered harmful. 76c2aa98e2SPeter Wemm 77c2aa98e2SPeter Wemm Header addresses that have the \231 character (and possibly others 78c2aa98e2SPeter Wemm in the range \201 - \237) behave in odd and usually unexpected ways. 79c2aa98e2SPeter Wemm 80c2aa98e2SPeter Wemm* accept() problem on SVR4. 81c2aa98e2SPeter Wemm 82c2aa98e2SPeter Wemm Apparently, the sendmail daemon loop (doing accept()s on the network) 83c2aa98e2SPeter Wemm can get into a weird state on SVR4; it starts logging ``SYSERR: 84c2aa98e2SPeter Wemm getrequests: accept: Protocol Error''. The workaround is to kill 85c2aa98e2SPeter Wemm and restart the sendmail daemon. We don't have an SVR4 system at 86c2aa98e2SPeter Wemm Berkeley that carries more than token mail load, so I can't validate 87c2aa98e2SPeter Wemm this. It is likely to be a glitch in the sockets emulation, since 88c2aa98e2SPeter Wemm "Protocol Error" is not possible error code with Berkeley TCP/IP. 89c2aa98e2SPeter Wemm 90c2aa98e2SPeter Wemm I've also had someone report the message ``sendmail: accept: 91c2aa98e2SPeter Wemm SIOCGPGRP failed errno 22'' on an SVR4 system. This message is 92c2aa98e2SPeter Wemm not in the sendmail source code, so I assume it is also a bug 93c2aa98e2SPeter Wemm in the sockets emulation. (Errno 22 is EINVAL "Invalid Argument" 94c2aa98e2SPeter Wemm on all the systems I have available, including Solaris 2.x.) 95c2aa98e2SPeter Wemm Apparently, this problem is due to linking -lc before -lsocket; 96c2aa98e2SPeter Wemm if you are having this problem, check your Makefile. 97c2aa98e2SPeter Wemm 98c2aa98e2SPeter Wemm* accept() problem on Linux. 99c2aa98e2SPeter Wemm 100065a643dSPeter Wemm The accept() in sendmail daemon loop can return ETIMEDOUT. An 101065a643dSPeter Wemm error is reported to syslog: 102c2aa98e2SPeter Wemm 103c2aa98e2SPeter Wemm Jun 9 17:14:12 hostname sendmail[207]: NOQUEUE: SYSERR(root): 104c2aa98e2SPeter Wemm getrequests: accept: Connection timed out 105c2aa98e2SPeter Wemm 106c2aa98e2SPeter Wemm "Connection timed out" is not documented as a valid return from 107c2aa98e2SPeter Wemm accept(2) and this was believed to be a bug in the Linux kernel. 108c2aa98e2SPeter Wemm Later information from the Linux kernel group states that Linux 109c2aa98e2SPeter Wemm 2.0 kernels follow RFC1122 while sendmail follows the original BSD 110c2aa98e2SPeter Wemm (now POSIX 1003.1g draft) specification. The 2.1.X and later kernels 111c2aa98e2SPeter Wemm will follow the POSIX draft. 112c2aa98e2SPeter Wemm 113c2aa98e2SPeter Wemm* Excessive mailing list nesting can run out of file descriptors. 114c2aa98e2SPeter Wemm 115c2aa98e2SPeter Wemm If you have a mailing list that includes lots of other mailing 116c2aa98e2SPeter Wemm lists, each of which has a separate owner, you can run out of 117c2aa98e2SPeter Wemm file descriptors. Each mailing list with a separate owner uses 118c2aa98e2SPeter Wemm one open file descriptor (prior to 8.6.6 it was three open 119c2aa98e2SPeter Wemm file descriptors per list). This is particularly egregious if 120c2aa98e2SPeter Wemm you have your connection cache set to be large. 121c2aa98e2SPeter Wemm 122c2aa98e2SPeter Wemm* Connection caching breaks if you pass the port number as an argument. 123c2aa98e2SPeter Wemm 124c2aa98e2SPeter Wemm If you have a definition such as: 125c2aa98e2SPeter Wemm 126c2aa98e2SPeter Wemm Mport, P=[IPC], F=kmDFMuX, S=11/31, R=21, 127c2aa98e2SPeter Wemm M=2100000, T=DNS/RFC822/SMTP, 128c2aa98e2SPeter Wemm A=IPC [127.0.0.1] $h 129c2aa98e2SPeter Wemm 130c2aa98e2SPeter Wemm (i.e., where $h is the port number instead of the host name) the 131c2aa98e2SPeter Wemm connection caching code will break because it won't notice that 132c2aa98e2SPeter Wemm two messages addressed to different ports should use different 133c2aa98e2SPeter Wemm connections. 134c2aa98e2SPeter Wemm 135c2aa98e2SPeter Wemm* ESMTP SIZE underestimates the size of a message 136c2aa98e2SPeter Wemm 137c2aa98e2SPeter Wemm Sendmail makes no allowance for headers that it adds, nor does it 138c2aa98e2SPeter Wemm account for the SMTP on-the-wire \r\n expansion. It probably doesn't 139c2aa98e2SPeter Wemm allow for 8->7 bit MIME conversions either. 140c2aa98e2SPeter Wemm 14140266059SGregory Neil Shapiro* Client ignores SIZE parameter. 14240266059SGregory Neil Shapiro 14340266059SGregory Neil Shapiro When sendmail acts as client and the server specifies a limit 14440266059SGregory Neil Shapiro for the mail size, sendmail will ignore this and try to send the 14540266059SGregory Neil Shapiro mail anyway. The server will usually reject the MAIL command 14640266059SGregory Neil Shapiro which specifies the size of the message and hence this problem 14740266059SGregory Neil Shapiro is not significant. 14840266059SGregory Neil Shapiro 149c2aa98e2SPeter Wemm* Paths to programs being executed and the mode of program files are 150c2aa98e2SPeter Wemm not checked. Essentially, the RunProgramInUnsafeDirPath and 151c2aa98e2SPeter Wemm RunWritableProgram bits in the DontBlameSendmail option are always 152c2aa98e2SPeter Wemm set. This is not a problem if your system is well managed (that is, 153c2aa98e2SPeter Wemm if binaries and system directories are mode 755 instead of something 154c2aa98e2SPeter Wemm foolish like 777). 155c2aa98e2SPeter Wemm 156c2aa98e2SPeter Wemm* 8-bit data in GECOS field 157c2aa98e2SPeter Wemm 158c2aa98e2SPeter Wemm If the GECOS (personal name) information in the passwd file contains 159c2aa98e2SPeter Wemm 8-bit characters, those characters can be included in the message 160c2aa98e2SPeter Wemm header, which can cause problems when sending SMTP to hosts that 161c2aa98e2SPeter Wemm only accept 7-bit characters. 162c2aa98e2SPeter Wemm 163c2aa98e2SPeter Wemm* 8->7 bit MIME conversion 164c2aa98e2SPeter Wemm 165c2aa98e2SPeter Wemm When sendmail is doing 8->7 bit MIME conversions, and the message 166c2aa98e2SPeter Wemm contains certain MIME body types that cannot be converted to 7-bit, 167c2aa98e2SPeter Wemm sendmail will strip the message to 7-bit. 168c2aa98e2SPeter Wemm 169c2aa98e2SPeter Wemm* 7->8 bit MIME conversion 170c2aa98e2SPeter Wemm 171c2aa98e2SPeter Wemm If a message that is encoded as 7-bit MIME is converted to 8-bit and 172c2aa98e2SPeter Wemm that message when decoded is illegal (e.g., because of long lines or 173c2aa98e2SPeter Wemm illegal characters), sendmail can produce an illegal message. 174c2aa98e2SPeter Wemm 175c2aa98e2SPeter Wemm* MIME encoded full name phrases in the From: header 176c2aa98e2SPeter Wemm 177c2aa98e2SPeter Wemm If a full name phrase includes characters from MustQuoteChars, sendmail 178c2aa98e2SPeter Wemm will quote the entire full name phrase. If MustQuoteChars includes 179c2aa98e2SPeter Wemm characters which are not special characters according to STD 11 (RFC 180c2aa98e2SPeter Wemm 822), this quotation can interfere with MIME encoded full name phrases. 181c2aa98e2SPeter Wemm By default, sendmail includes the single quote character (') in 182c2aa98e2SPeter Wemm MustQuoteChars even though it is not listed as a special character in 183c2aa98e2SPeter Wemm STD 11. 184c2aa98e2SPeter Wemm 185065a643dSPeter Wemm* bestmx map with -z flag truncates the list of MX hosts 186c2aa98e2SPeter Wemm 187065a643dSPeter Wemm A bestmx map configured with the -z flag will truncate the list 188065a643dSPeter Wemm of MX hosts. This prevents creation of strings which are too 189065a643dSPeter Wemm long for ruleset parsing. This can have an adverse effect on the 190065a643dSPeter Wemm relay_based_on_MX feature. 191065a643dSPeter Wemm 1922e43090eSPeter Wemm* Saving to ~sender/dead.letter fails if su'ed to root 193065a643dSPeter Wemm 1942e43090eSPeter Wemm If ErrorMode is set to print and an error in sending mail occurs, 1952e43090eSPeter Wemm the normal action is to print a message to the screen and append 1962e43090eSPeter Wemm the message to a dead.letter file in the sender's home directory. 1972e43090eSPeter Wemm In the case where the sender is using su to act as root, the file 1982e43090eSPeter Wemm safety checks prevent sendmail from saving the dead.letter file 1992e43090eSPeter Wemm because the sender's uid and the current real uid do not match. 2002e43090eSPeter Wemm 2012e43090eSPeter Wemm* Berkeley DB 2.X race condition with fcntl() locking 2022e43090eSPeter Wemm 2032e43090eSPeter Wemm There is a race condition for Berkeley DB 2.X databases on 2042e43090eSPeter Wemm operating systems which use fcntl() style locking, such as 2052e43090eSPeter Wemm Solaris. Sendmail locks the map before calling db_open() to 2062e43090eSPeter Wemm prevent others from modifying the map while it is being opened. 2072e43090eSPeter Wemm Unfortunately, Berkeley DB opens the map, closes it, and then 2082e43090eSPeter Wemm reopens it. fcntl() locking drops the lock when any file 2092e43090eSPeter Wemm descriptor pointing to the file is closed, even if it is a 2102e43090eSPeter Wemm different file descriptor than the one used to initially lock 2112e43090eSPeter Wemm the file. As a result there is a possibility that entries in a 2122e43090eSPeter Wemm map might not be found during a map rebuild. As a workaround, 2132e43090eSPeter Wemm you can use makemap to build a map with a new name and then 2142e43090eSPeter Wemm "mv" the new db file to replace the old one. 2152e43090eSPeter Wemm 21606f25ae9SGregory Neil Shapiro Sleepycat Software has added code to avoid this race condition to 21706f25ae9SGregory Neil Shapiro Berkeley DB versions after 2.7.5. 21806f25ae9SGregory Neil Shapiro 2192e43090eSPeter Wemm* File open timeouts not available on hard mounted NFS file systems 2202e43090eSPeter Wemm 2212e43090eSPeter Wemm Since SIGALRM does not interrupt an RPC call for hard mounted 2222e43090eSPeter Wemm NFS file systems, it is impossible to implement a timeout on a file 2232e43090eSPeter Wemm open operation. Therefore, while the NFS server is not responding, 2242e43090eSPeter Wemm attempts to open a file on that server will hang. Systems with 2252e43090eSPeter Wemm local mail delivery and NFS hard mounted home directories should be 2262e43090eSPeter Wemm avoided, as attempts to open the forward files could hang. 2272e43090eSPeter Wemm 22840266059SGregory Neil Shapiro* Race condition for delivery to set-user-ID files 22906f25ae9SGregory Neil Shapiro 23006f25ae9SGregory Neil Shapiro Sendmail will deliver to a fail if the file is owned by the DefaultUser 23140266059SGregory Neil Shapiro or has the set-user-ID bit set. Unfortunately, some systems clear that bit 23206f25ae9SGregory Neil Shapiro when a file is modified. Sendmail compensates by resetting the file mode 23306f25ae9SGregory Neil Shapiro back to it's original settings. Unfortunately, there's still a 23406f25ae9SGregory Neil Shapiro permission failure race as sendmail checks the permissions before locking 23506f25ae9SGregory Neil Shapiro the file. This is unavoidable as sendmail must verify the file is safe 23606f25ae9SGregory Neil Shapiro to open before opening it. A file can not be locked until it is open. 23706f25ae9SGregory Neil Shapiro 23813bd1963SGregory Neil Shapiro* MAIL_HUB always takes precedence over LOCAL_RELAY 23913bd1963SGregory Neil Shapiro 24013bd1963SGregory Neil Shapiro Despite the information in the documentation, MAIL_HUB ($H) will always 24113bd1963SGregory Neil Shapiro be used if set instead of LOCAL_RELAY ($R). This will be fixed in a 24213bd1963SGregory Neil Shapiro future version. 24313bd1963SGregory Neil Shapiro 24413bd1963SGregory Neil Shapiro$Revision: 8.55.2.1 $, Last updated $Date: 2002/12/18 22:38:48 $ 245