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 156f9c8e5bSGregory Neil Shapiro* Header values which are too long may be truncated. 166f9c8e5bSGregory Neil Shapiro 176f9c8e5bSGregory Neil Shapiro If a value of a structured header is longer than 256 (MAXNAME) 186f9c8e5bSGregory Neil Shapiro characters then it may be truncated during output. For example, 196f9c8e5bSGregory Neil Shapiro if a single address in the To: header is longer than 256 characters 206f9c8e5bSGregory Neil Shapiro then it will be truncated which may result in a syntactically 216f9c8e5bSGregory Neil Shapiro invalid address. 226f9c8e5bSGregory Neil Shapiro 232fb4f839SGregory Neil Shapiro* Berkeley DB map locking problem with fcntl(). 242fb4f839SGregory Neil Shapiro 252fb4f839SGregory Neil Shapiro For Linux the default is to use fcntl() for file locking. However, 262fb4f839SGregory Neil Shapiro this does not work with Berkeley DB 5.x and probably later. 272fb4f839SGregory Neil Shapiro Switching to flock(), i.e., compile with -DHASFLOCK fixes this 28*d39bd2c1SGregory Neil Shapiro (however, there have been problems with flock() on some Linux 292fb4f839SGregory Neil Shapiro versions). Alternatively, use CDB or an earlier BDB version. 302fb4f839SGregory Neil Shapiro 3142e5d165SGregory Neil Shapiro* Delivery to programs that generate too much output may cause problems 3242e5d165SGregory Neil Shapiro 3342e5d165SGregory Neil Shapiro If e-mail is delivered to a program which generates too much 3442e5d165SGregory Neil Shapiro output, then sendmail may issue an error: 3542e5d165SGregory Neil Shapiro 3642e5d165SGregory Neil Shapiro timeout waiting for input from local during Draining Input 3742e5d165SGregory Neil Shapiro 3842e5d165SGregory Neil Shapiro Make sure that the program does not generate output beyond a 3942e5d165SGregory Neil Shapiro status message (corresponding to the exit status). This may 4042e5d165SGregory Neil Shapiro require a wrapper around the actual program to redirect output 4142e5d165SGregory Neil Shapiro to /dev/null. 4242e5d165SGregory Neil Shapiro 4342e5d165SGregory Neil Shapiro Such a problem has been reported for bulk_mailer. 44c2aa98e2SPeter Wemm 45c2aa98e2SPeter Wemm* Null bytes are not handled properly in headers. 46c2aa98e2SPeter Wemm 47c2aa98e2SPeter Wemm Sendmail should handle full binary data. As it stands, it handles 48d0cef73dSGregory Neil Shapiro all values in the body, but not 0x00 in the header. Changing 49d0cef73dSGregory Neil Shapiro this would require a major restructuring of the code -- for 50d0cef73dSGregory Neil Shapiro example, almost no C library support could be used to handle 51d0cef73dSGregory Neil Shapiro strings. 52c2aa98e2SPeter Wemm 5340266059SGregory Neil Shapiro* Header checks are not called if header value is too long or empty. 5413058a91SGregory Neil Shapiro 5513058a91SGregory Neil Shapiro If the value of a header is longer than 1250 (MAXNAME + MAXATOM - 6) 5613058a91SGregory Neil Shapiro characters or it contains a single word longer than 256 (MAXNAME) 5713058a91SGregory Neil Shapiro characters then no header check is done even if one is configured for 5813058a91SGregory Neil Shapiro the header. 5913058a91SGregory Neil Shapiro 60b6bacd31SGregory Neil Shapiro* Header lines which are too long will be split incorrectly. 61b6bacd31SGregory Neil Shapiro 62b6bacd31SGregory Neil Shapiro Header lines which are longer than 2045 characters will be split 63b6bacd31SGregory Neil Shapiro but some characters might be lost. Fix: obey RFC (2)822 and do not 64b6bacd31SGregory Neil Shapiro send lines that are longer than 1000 characters. 65b6bacd31SGregory Neil Shapiro 66e3793f76SGregory Neil Shapiro* milter communication fails if a single header is larger than 64K. 67e3793f76SGregory Neil Shapiro 68e3793f76SGregory Neil Shapiro If a single header is larger than 64KB (which is not possible in the 69e3793f76SGregory Neil Shapiro default configuration) then it cannot be transferred in one block to 70e3793f76SGregory Neil Shapiro libmilter and hence the communication fails. This can be avoided by 71e3793f76SGregory Neil Shapiro increasing the constant MILTER_CHUNK_SIZE in 72e3793f76SGregory Neil Shapiro include/libmilter/mfdef.h and recompiling sendmail, libmilter, and 73da7d7b9cSGregory Neil Shapiro all (statically linked) milters (or by using undocumented compile 74da7d7b9cSGregory Neil Shapiro time options: _FFR_MAXDATASIZE/_FFR_MDS_NEGOTIATE; you have to 75da7d7b9cSGregory Neil Shapiro read the source code in order to use these properly). 76e3793f76SGregory Neil Shapiro 77605302a5SGregory Neil Shapiro* Sender addresses whose domain part cause a temporary A record lookup 78605302a5SGregory Neil Shapiro failure but have a valid MX record will be temporarily rejected in 79605302a5SGregory Neil Shapiro the default configuration. Solution: fix the DNS at the sender side. 80605302a5SGregory Neil Shapiro If that's not easy to achieve, possible workarounds are: 81605302a5SGregory Neil Shapiro - add an entry to the access map: 82605302a5SGregory Neil Shapiro dom.ain OK 83605302a5SGregory Neil Shapiro - (only for advanced users) replace 84605302a5SGregory Neil Shapiro 85605302a5SGregory Neil Shapiro# Resolve map (to check if a host exists in check_mail) 86605302a5SGregory Neil ShapiroKresolve host -a<OKR> -T<TEMP> 87605302a5SGregory Neil Shapiro 88605302a5SGregory Neil Shapiro with 89605302a5SGregory Neil Shapiro 90605302a5SGregory Neil Shapiro# Resolve map (to check if a host exists in check_mail) 91605302a5SGregory Neil ShapiroKcanon host -a<OKR> -T<TEMP> 92605302a5SGregory Neil ShapiroKdnsmx dns -R MX -a<OKR> -T<TEMP> 93605302a5SGregory Neil ShapiroKresolve sequence dnsmx canon 94605302a5SGregory Neil Shapiro 95605302a5SGregory Neil Shapiro 96c2aa98e2SPeter Wemm* Duplicate error messages. 97c2aa98e2SPeter Wemm 98c2aa98e2SPeter Wemm Sometimes identical, duplicate error messages can be generated. As 99c2aa98e2SPeter Wemm near as I can tell, this is rare and relatively innocuous. 100c2aa98e2SPeter Wemm 10140266059SGregory Neil Shapiro* Misleading error messages. 102c2aa98e2SPeter Wemm 10340266059SGregory Neil Shapiro If an illegal address is specified on the command line together 10440266059SGregory Neil Shapiro with at least one valid address and PostmasterCopy is set, the 10540266059SGregory Neil Shapiro DSN does not contain the illegal address, but only the valid 10640266059SGregory Neil Shapiro address(es). 107c2aa98e2SPeter Wemm 108da7d7b9cSGregory Neil Shapiro* AuthRealm for Cyrus SASL may not work as expected. The man page 109da7d7b9cSGregory Neil Shapiro and the actual usage for sasl_server_new() seem to differ. 110da7d7b9cSGregory Neil Shapiro Feedback for the "correct" usage is welcome, a patch to match 111da7d7b9cSGregory Neil Shapiro the description of the man page is in contrib/AuthRealm.p0. 112da7d7b9cSGregory Neil Shapiro 113c2aa98e2SPeter Wemm* accept() problem on SVR4. 114c2aa98e2SPeter Wemm 115c2aa98e2SPeter Wemm Apparently, the sendmail daemon loop (doing accept()s on the network) 116c2aa98e2SPeter Wemm can get into a weird state on SVR4; it starts logging ``SYSERR: 117c2aa98e2SPeter Wemm getrequests: accept: Protocol Error''. The workaround is to kill 118c2aa98e2SPeter Wemm and restart the sendmail daemon. We don't have an SVR4 system at 119c2aa98e2SPeter Wemm Berkeley that carries more than token mail load, so I can't validate 120c2aa98e2SPeter Wemm this. It is likely to be a glitch in the sockets emulation, since 121c2aa98e2SPeter Wemm "Protocol Error" is not possible error code with Berkeley TCP/IP. 122c2aa98e2SPeter Wemm 123c2aa98e2SPeter Wemm I've also had someone report the message ``sendmail: accept: 124c2aa98e2SPeter Wemm SIOCGPGRP failed errno 22'' on an SVR4 system. This message is 125c2aa98e2SPeter Wemm not in the sendmail source code, so I assume it is also a bug 126c2aa98e2SPeter Wemm in the sockets emulation. (Errno 22 is EINVAL "Invalid Argument" 127c2aa98e2SPeter Wemm on all the systems I have available, including Solaris 2.x.) 128c2aa98e2SPeter Wemm Apparently, this problem is due to linking -lc before -lsocket; 129c2aa98e2SPeter Wemm if you are having this problem, check your Makefile. 130c2aa98e2SPeter Wemm 131c2aa98e2SPeter Wemm* accept() problem on Linux. 132c2aa98e2SPeter Wemm 133065a643dSPeter Wemm The accept() in sendmail daemon loop can return ETIMEDOUT. An 134065a643dSPeter Wemm error is reported to syslog: 135c2aa98e2SPeter Wemm 136c2aa98e2SPeter Wemm Jun 9 17:14:12 hostname sendmail[207]: NOQUEUE: SYSERR(root): 137c2aa98e2SPeter Wemm getrequests: accept: Connection timed out 138c2aa98e2SPeter Wemm 139c2aa98e2SPeter Wemm "Connection timed out" is not documented as a valid return from 140c2aa98e2SPeter Wemm accept(2) and this was believed to be a bug in the Linux kernel. 141c2aa98e2SPeter Wemm Later information from the Linux kernel group states that Linux 142c2aa98e2SPeter Wemm 2.0 kernels follow RFC1122 while sendmail follows the original BSD 143c2aa98e2SPeter Wemm (now POSIX 1003.1g draft) specification. The 2.1.X and later kernels 144c2aa98e2SPeter Wemm will follow the POSIX draft. 145c2aa98e2SPeter Wemm 146c2aa98e2SPeter Wemm* Excessive mailing list nesting can run out of file descriptors. 147c2aa98e2SPeter Wemm 148c2aa98e2SPeter Wemm If you have a mailing list that includes lots of other mailing 149c2aa98e2SPeter Wemm lists, each of which has a separate owner, you can run out of 150c2aa98e2SPeter Wemm file descriptors. Each mailing list with a separate owner uses 151c2aa98e2SPeter Wemm one open file descriptor (prior to 8.6.6 it was three open 152c2aa98e2SPeter Wemm file descriptors per list). This is particularly egregious if 153c2aa98e2SPeter Wemm you have your connection cache set to be large. 154c2aa98e2SPeter Wemm 155c2aa98e2SPeter Wemm* Connection caching breaks if you pass the port number as an argument. 156c2aa98e2SPeter Wemm 157c2aa98e2SPeter Wemm If you have a definition such as: 158c2aa98e2SPeter Wemm 159c2aa98e2SPeter Wemm Mport, P=[IPC], F=kmDFMuX, S=11/31, R=21, 160c2aa98e2SPeter Wemm M=2100000, T=DNS/RFC822/SMTP, 161c2aa98e2SPeter Wemm A=IPC [127.0.0.1] $h 162c2aa98e2SPeter Wemm 163c2aa98e2SPeter Wemm (i.e., where $h is the port number instead of the host name) the 164c2aa98e2SPeter Wemm connection caching code will break because it won't notice that 165c2aa98e2SPeter Wemm two messages addressed to different ports should use different 166c2aa98e2SPeter Wemm connections. 167c2aa98e2SPeter Wemm 168c2aa98e2SPeter Wemm* ESMTP SIZE underestimates the size of a message 169c2aa98e2SPeter Wemm 170c2aa98e2SPeter Wemm Sendmail makes no allowance for headers that it adds, nor does it 171c2aa98e2SPeter Wemm account for the SMTP on-the-wire \r\n expansion. It probably doesn't 172c2aa98e2SPeter Wemm allow for 8->7 bit MIME conversions either. 173c2aa98e2SPeter Wemm 17440266059SGregory Neil Shapiro* Client ignores SIZE parameter. 17540266059SGregory Neil Shapiro 176*d39bd2c1SGregory Neil Shapiro When sendmail acts as client and the server specifies a limit for 177*d39bd2c1SGregory Neil Shapiro the mail size, sendmail will ignore this and try to send the mail 178*d39bd2c1SGregory Neil Shapiro anyway (unless _FFR_CLIENT_SIZE is used). The server will usually 179*d39bd2c1SGregory Neil Shapiro reject the MAIL command which specifies the size of the message 180*d39bd2c1SGregory Neil Shapiro and hence this problem is not significant. 18140266059SGregory Neil Shapiro 182c2aa98e2SPeter Wemm* Paths to programs being executed and the mode of program files are 183c2aa98e2SPeter Wemm not checked. Essentially, the RunProgramInUnsafeDirPath and 184c2aa98e2SPeter Wemm RunWritableProgram bits in the DontBlameSendmail option are always 185c2aa98e2SPeter Wemm set. This is not a problem if your system is well managed (that is, 186c2aa98e2SPeter Wemm if binaries and system directories are mode 755 instead of something 187c2aa98e2SPeter Wemm foolish like 777). 188c2aa98e2SPeter Wemm 189c2aa98e2SPeter Wemm* 8-bit data in GECOS field 190c2aa98e2SPeter Wemm 191c2aa98e2SPeter Wemm If the GECOS (personal name) information in the passwd file contains 192c2aa98e2SPeter Wemm 8-bit characters, those characters can be included in the message 193c2aa98e2SPeter Wemm header, which can cause problems when sending SMTP to hosts that 194c2aa98e2SPeter Wemm only accept 7-bit characters. 195c2aa98e2SPeter Wemm 196c2aa98e2SPeter Wemm* 8->7 bit MIME conversion 197c2aa98e2SPeter Wemm 198c2aa98e2SPeter Wemm When sendmail is doing 8->7 bit MIME conversions, and the message 199c2aa98e2SPeter Wemm contains certain MIME body types that cannot be converted to 7-bit, 200d0cef73dSGregory Neil Shapiro sendmail will pass the message as 8-bit. 201c2aa98e2SPeter Wemm 202c2aa98e2SPeter Wemm* 7->8 bit MIME conversion 203c2aa98e2SPeter Wemm 204c2aa98e2SPeter Wemm If a message that is encoded as 7-bit MIME is converted to 8-bit and 205c2aa98e2SPeter Wemm that message when decoded is illegal (e.g., because of long lines or 206c2aa98e2SPeter Wemm illegal characters), sendmail can produce an illegal message. 207c2aa98e2SPeter Wemm 208c2aa98e2SPeter Wemm* MIME encoded full name phrases in the From: header 209c2aa98e2SPeter Wemm 210c2aa98e2SPeter Wemm If a full name phrase includes characters from MustQuoteChars, sendmail 211c2aa98e2SPeter Wemm will quote the entire full name phrase. If MustQuoteChars includes 212c2aa98e2SPeter Wemm characters which are not special characters according to STD 11 (RFC 213c2aa98e2SPeter Wemm 822), this quotation can interfere with MIME encoded full name phrases. 214c2aa98e2SPeter Wemm By default, sendmail includes the single quote character (') in 215c2aa98e2SPeter Wemm MustQuoteChars even though it is not listed as a special character in 216c2aa98e2SPeter Wemm STD 11. 217c2aa98e2SPeter Wemm 218065a643dSPeter Wemm* bestmx map with -z flag truncates the list of MX hosts 219c2aa98e2SPeter Wemm 220065a643dSPeter Wemm A bestmx map configured with the -z flag will truncate the list 221065a643dSPeter Wemm of MX hosts. This prevents creation of strings which are too 222065a643dSPeter Wemm long for ruleset parsing. This can have an adverse effect on the 223065a643dSPeter Wemm relay_based_on_MX feature. 224065a643dSPeter Wemm 2252e43090eSPeter Wemm* Saving to ~sender/dead.letter fails if su'ed to root 226065a643dSPeter Wemm 2272e43090eSPeter Wemm If ErrorMode is set to print and an error in sending mail occurs, 2282e43090eSPeter Wemm the normal action is to print a message to the screen and append 2292e43090eSPeter Wemm the message to a dead.letter file in the sender's home directory. 2302e43090eSPeter Wemm In the case where the sender is using su to act as root, the file 2312e43090eSPeter Wemm safety checks prevent sendmail from saving the dead.letter file 2322e43090eSPeter Wemm because the sender's uid and the current real uid do not match. 2332e43090eSPeter Wemm 2342e43090eSPeter Wemm* Berkeley DB 2.X race condition with fcntl() locking 2352e43090eSPeter Wemm 2362e43090eSPeter Wemm There is a race condition for Berkeley DB 2.X databases on 2372e43090eSPeter Wemm operating systems which use fcntl() style locking, such as 2382e43090eSPeter Wemm Solaris. Sendmail locks the map before calling db_open() to 2392e43090eSPeter Wemm prevent others from modifying the map while it is being opened. 2402e43090eSPeter Wemm Unfortunately, Berkeley DB opens the map, closes it, and then 2412e43090eSPeter Wemm reopens it. fcntl() locking drops the lock when any file 2422e43090eSPeter Wemm descriptor pointing to the file is closed, even if it is a 2432e43090eSPeter Wemm different file descriptor than the one used to initially lock 2442e43090eSPeter Wemm the file. As a result there is a possibility that entries in a 2452e43090eSPeter Wemm map might not be found during a map rebuild. As a workaround, 2462e43090eSPeter Wemm you can use makemap to build a map with a new name and then 2472e43090eSPeter Wemm "mv" the new db file to replace the old one. 2482e43090eSPeter Wemm 24906f25ae9SGregory Neil Shapiro Sleepycat Software has added code to avoid this race condition to 25006f25ae9SGregory Neil Shapiro Berkeley DB versions after 2.7.5. 25106f25ae9SGregory Neil Shapiro 2522e43090eSPeter Wemm* File open timeouts not available on hard mounted NFS file systems 2532e43090eSPeter Wemm 2542e43090eSPeter Wemm Since SIGALRM does not interrupt an RPC call for hard mounted 2552e43090eSPeter Wemm NFS file systems, it is impossible to implement a timeout on a file 2562e43090eSPeter Wemm open operation. Therefore, while the NFS server is not responding, 2572e43090eSPeter Wemm attempts to open a file on that server will hang. Systems with 2582e43090eSPeter Wemm local mail delivery and NFS hard mounted home directories should be 2592e43090eSPeter Wemm avoided, as attempts to open the forward files could hang. 2602e43090eSPeter Wemm 26140266059SGregory Neil Shapiro* Race condition for delivery to set-user-ID files 26206f25ae9SGregory Neil Shapiro 263da7d7b9cSGregory Neil Shapiro Sendmail will deliver to a file if the file is owned by the DefaultUser 26440266059SGregory Neil Shapiro or has the set-user-ID bit set. Unfortunately, some systems clear that bit 26506f25ae9SGregory Neil Shapiro when a file is modified. Sendmail compensates by resetting the file mode 26606f25ae9SGregory Neil Shapiro back to it's original settings. Unfortunately, there's still a 26706f25ae9SGregory Neil Shapiro permission failure race as sendmail checks the permissions before locking 26806f25ae9SGregory Neil Shapiro the file. This is unavoidable as sendmail must verify the file is safe 26906f25ae9SGregory Neil Shapiro to open before opening it. A file can not be locked until it is open. 27006f25ae9SGregory Neil Shapiro 27113bd1963SGregory Neil Shapiro* MAIL_HUB always takes precedence over LOCAL_RELAY 27213bd1963SGregory Neil Shapiro 27313bd1963SGregory Neil Shapiro Despite the information in the documentation, MAIL_HUB ($H) will always 27413bd1963SGregory Neil Shapiro be used if set instead of LOCAL_RELAY ($R). This will be fixed in a 27513bd1963SGregory Neil Shapiro future version. 27613bd1963SGregory Neil Shapiro 277