Q9702

Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions
Clone this wiki locally

Q9702

Question

How can I get rid of spurious ^M (carriage return) characters in messages sent from CDE dtmail?

Answer

CDE dtmail passes messages to Exim via the command line interface with lines terminated by CRLF, instead of the Unix convention of just LF. This should not be a problem if you are using Exim release 4.21 or later, as changes were made to detect CRLF line endings. In earlier versions of Exim, CR would be treated as just another data character. There was, however, a command line option called -dropcr which caused Exim to ignore all CR characters in an incoming non-SMTP message. (This option is a no-op in current releases.) If you are using a pre-4.21 version of Exim, you should configure dtmail to add this option to the command it uses to call Exim (using the path /usr/lib/sendmail). However, it has been reported that it isn't possible to change this call from dtmail by any official means. An alternative approach is to replace /usr/lib/sendmail by a filtering script that removes the spurious CRs from the input before passing it to Exim.