Problem
Mail delivered via sendmail 8.8.5 (or later) arrives with an exclamation point and carriage return inserted into lines that are over 990 characters long. That is, these long lines are split and text up to the split is first transmitted followed by the ! character; the remaining portion is transmitted as a new line.
Cause
Prior to version 8.8.5, there was no line limit specified for sendmail. With 8.8.5 and later, the line limit defaults to 990 characters. This line limit option is helpful with programs that cannot handle long lines; however, it can also cause applications expecting data in a given format to fail when the added exclamation point and carriage return are encountered.
Solution
To change or eliminate the line length limit, follow these steps:
As root, edit the /usr/lib/sendmail.cf file.Go to the SMTP mailer specification by searching for the string Msmtp. You will see the following definitions:
Msmtp, P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n,
L=990, A=IPC $h
Mesmtp, P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n,
L=990, A=IPC $h
Mrelay, P=[IPC], F=mDFMuXa, S=11/31, R=61, E=\r\n,
L=2040, A=IPC $hChange the L= equate to L=0 to remove the line length limit for any of these delivery agents. You can also change the line length limit to a value that best suits your needs.
After making the changes, save and exit the sendmail.cf file, and restart the sendmail daemon by finding the sendmail process ID with:
# ps -ef | grep sendmailThen restart the process by typing:# kill -1 <PID>where <PID> is the process ID of the sendmail process.
See also
Bryan Costales with Eric Allman, "sendmail", O'Reilly & Associates, Inc., page 528